[OpenSIPS-Devel] [ opensips-Bugs-3606832 ] OpenSIPS terminates when calling dlg_db_sync

SourceForge.net noreply at sourceforge.net
Tue Mar 5 15:47:08 CET 2013


Bugs item #3606832, was opened at 2013-03-04 17:24
Message generated for change (Comment added) made by vladut-paiu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3606832&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: 1.9.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Chen-Che Huang (csmicrox)
Assigned to: Vladut-Stefan Paiu (vladut-paiu)
Summary: OpenSIPS terminates when calling dlg_db_sync

Initial Comment:
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.

----------------------------------------------------------------------

>Comment By: Vladut-Stefan Paiu (vladut-paiu)
Date: 2013-03-05 06:47

Message:
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

----------------------------------------------------------------------

Comment By: Chen-Che Huang (csmicrox)
Date: 2013-03-05 04:01

Message:
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

----------------------------------------------------------------------

Comment By: Vladut-Stefan Paiu (vladut-paiu)
Date: 2013-03-05 03:14

Message:
Hello,

Please try the attached patch ( dlg_db_sync.patch ), should fix your
issue.

Regards,
Vlad

----------------------------------------------------------------------

Comment By: Vladut-Stefan Paiu (vladut-paiu)
Date: 2013-03-05 02:12

Message:
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

----------------------------------------------------------------------

Comment By: Chen-Che Huang (csmicrox)
Date: 2013-03-04 23:24

Message:
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

----------------------------------------------------------------------

Comment By: Nick Altmann (nikbyte)
Date: 2013-03-04 22:12

Message:
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


----------------------------------------------------------------------

Comment By: Nick Altmann (nikbyte)
Date: 2013-03-04 22:11

Message:
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).


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3606832&group_id=232389



More information about the Devel mailing list