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).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
Best regard,
Chen-Che
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
item page.
Best wishes,
Chen-Che
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
Yours sincerely,
Chen-Che
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
core_dump_for_dlg_db_sync
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. :-(
Index: modules/dialog/dlg_db_handler.c
--- 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"));
else
Hi nikbyte,
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.
Best regard,
Chen-Che
Hello,
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
Best Regards,
Vlad
Hello,
Please try the attached patch ( dlg_db_sync.patch ), should fix your issue.
Regards,
Vlad
Hi Vlad,
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
item page.
Best wishes,
Chen-Che
Hi,
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.
Best Regards,
Vlad
Hi,
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.
Yours sincerely,
Chen-Che
Hello,
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.
Best Regards,
Vlad