[OpenSER-Devel] [ openser-Bugs-1838923 ] dialog: crash on server restart if dialog db is dbtext

SourceForge.net noreply at sourceforge.net
Fri Nov 30 14:53:16 UTC 2007


Bugs item #1838923, was opened at 2007-11-26 14:31
Message generated for change (Comment added) made by osas
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1838923&group_id=139143

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: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ovidiu Sas (osas)
Assigned to: Daniel-Constantin Mierla (miconda)
Summary: dialog: crash on server restart if dialog db is dbtext

Initial Comment:
If dialog module is using the dbtext database as a backend storage, on restart it will crash the server.

It seems that the issue is related to the callee_cseq(string) field.

# openserctl fifo dlg_list
database engine 'DBTEXT' loaded
Control engine 'FIFO' loaded
entering fifo_cmd dlg_list
dialog::  hash=777:1199660830
	state:: 4
	timestart:: 10
	timeout:: 130
	callid:: 5d4bfc7e7b789251d130deb0d5cd2fd6
	from_uri:: sip:4165863567 at 10.11.10.63
	from_tag:: e761d53
	caller_contact:: sip:4165863567 at 10.11.128.129
	caller_cseq:: 100
	caller_route_set:: 
	caller_bind_addr:: udp:10.11.10.63:5060
	to_uri:: sip:4169771414 at 10.11.10.63
	to_tag:: AFF02000-797
	callee_contact:: sip:4169771414 at 10.111.3.241:5060
	callee_cseq:: 100
	callee_route_set:: 
	callee_bind_addr:: udp:10.11.10.63:5060
FIFO command was:
:dlg_list:openser_receiver_21824


and on the db we have:
id(int,auto) hash_entry(int) hash_id(int) callid(string) from_uri(string) from_tag(string) to_uri(string) to_tag(string) caller_cseq(string) callee_cseq(string) caller_route_set(string,null) callee_route_set(string,null) caller_contact(string) callee_contact(string) caller_sock(string) callee_sock(string) state(int) start_time(int) timeout(int)
1:777:1199660830:5d4bfc7e7b789251d130deb0d5cd2fd6:sip\:4165863567 at 10.11.10.63:e761d53:sip\:4169771414 at 10.11.10.63:AFF02000-797:100:1005060\r:::sip\:4165863567 at 10.11.128.129:sip\:4169771414 at 10.111.3.241\:5060:udp\:10.11.10.63\:5060:udp\:10.11.10.63\:5060:4:10:1196107993


The value of callee_cseq(string) seems to be wrong:
callee_cseq(string) -> 1005060\r


Here's the backtrace:
(gdb) bt
#0  0x40235541 in load_dialog_info_from_db () from /usr/local/lib/openser/modules/dialog.so
#1  0x40234362 in init_dlg_db () from /usr/local/lib/openser/modules/dialog.so
#2  0x4023343f in mod_init () from /usr/local/lib/openser/modules/dialog.so
#3  0x0809940f in init_mod ()
#4  0x08099356 in init_mod ()
#5  0x08099356 in init_mod ()
#6  0x08099717 in init_modules ()
#7  0x08064e18 in main ()


Regards,
Ovidiu Sas

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

>Comment By: Ovidiu Sas (osas)
Date: 2007-11-30 09:53

Message:
Logged In: YES 
user_id=1395524
Originator: YES

Hi Daniel,

I tested the patch ok.  openser is no longer crashing on restart.
I will need to investigate more why the callee_cseq(string) is malformed
when saved into the db.

Regards,
Ovidiu Sas

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

Comment By: Daniel-Constantin Mierla (miconda)
Date: 2007-11-30 05:22

Message:
Logged In: YES 
user_id=1246013
Originator: NO

Could you try the attached patch? Let's see if there are other side
effects before committing.
File Added: dialog-getstrvar.diff

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

Comment By: Ovidiu Sas (osas)
Date: 2007-11-29 11:17

Message:
Logged In: YES 
user_id=1395524
Originator: YES

small update:

as soon as I inserted some bigus values into the db for route_set it is no
longer crashing:
caller_route_set(string,null) callee_route_set(string,null)
:1:2:

So this crash is related to the null value of
caller_route_set(string,null) callee_route_set(string,null) inside the
dbtext.

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

Comment By: Ovidiu Sas (osas)
Date: 2007-11-29 11:07

Message:
Logged In: YES 
user_id=1395524
Originator: YES

Hi Daniel,

It is crashing on load_dialog_info_from_db:
GET_STR_VALUE(rroute1, values, 12);
while it is trying to get an empty value from the db:
caller_route_set(string,null) callee_route_set(string,null)
:::

The db_mode param doesn't seem to affect the beahaviour (we have a crash
with both modes).

It is strange, I don't do any stripping and my modules are stripped (this
is a debian box and I do `make install').  I will investigate more on this
issue.

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

Comment By: Daniel-Constantin Mierla (miconda)
Date: 2007-11-29 06:33

Message:
Logged In: YES 
user_id=1246013
Originator: NO

Might be related to dbtext storage engine, can you get the core with
debugging info, so we see exactly the line in files where it crashes and
investigate more of the core file?

How dbtext was configured? cached or non-cached mode?

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1838923&group_id=139143



More information about the Devel mailing list