Only one call is in session. That is, only one dialog is in the DB.
I call dlg_db_sync and then the SIP server terminates.
This bug only reproduced when db_mode=0 because we try to free uinitialized db-handler in sync_dlg_db_mem after select_entire_dialog_table() in error: label.
Here is the patch to disable dlg_db_sync fifo cmd when db_mode = 0.
You cannot use db_sync in no_db mode (db_mode=0).
I have no access to attach files. :-(
--- modules/dialog/dlg_db_handler.c (revision 9854)
+++ modules/dialog/dlg_db_handler.c (working copy)
@@ -1804,6 +1804,8 @@
struct mi_root* mi_sync_db_dlg(struct mi_root *cmd, void *param)
+ if (dlg_db_mode == 0)
+ return init_mi_tree( 400, MI_SSTR("Cannot sync in no-db mode"));
if (sync_dlg_db_mem() < 0)
return init_mi_tree( 400, MI_SSTR("Sync mem with DB failed"));
Very grateful for your quick response. However, I set db_mode to 1 rather than 0 (modparam("dialog', "db_mode", 1)).
I'll try your patch. Thanks so much.
csmicrox, which OpenSIPS version are you using ? Also, can you please post the output of 'bt full' from GDB ?
Nick, thanks for the patch, applied on trunk, 1.9 and 1.8
Please try the attached patch ( dlg_db_sync.patch ), should fix your issue.
I use version-1.9.0 and the "bt full" information was attached when I report this bug.
You should be able to download the core_dump_for_dlg_db_sync.txt from the attached files on this
Yes, saw the core dump after I replied :)
See the patch I've attached below, apply it and give it another go, should be fine now.
After applying your patch, when calling dlg_db_sync, the following information are shown.
dlg_db_sync: 400 Sync mem with DB failed
SIP server: Error:dialog:sync_dlg_db_mem: inconsistent hash data in the dialog database: you restarted opensips using a different hash_size: please erase dialog database and restart
I have followed the instruction and the problem remains. I also reinstall OpenSIPS and create a new database, but
have the same result. Please look into this issue. I'm very grateful to your help.
Indeed, sorry for this, there was another leftover bug. I have just committed the fix on 1.9 and trunk.
Please remove the patch I've sent you and update your sources from the stable 1.9 branch.
Log in to post a comment.