[sr-dev] SER crash : Segmentation fault

inge inge at legos.fr
Thu Sep 24 15:49:32 CEST 2009


Hi Andrei,

Thanks for the 0.9.8 release.
We upgraded our proxy yesterday with sucess.

But we had another crash of SER in this morning.
The cause seem to be defferent than the previous one.

Attached is a backtrace from the coredump.
Is there a bug related to that in the last 0.9.x version ?

Sincerely,

Nicolas

Le jeudi 17 septembre 2009 à 13:45 +0200, Andrei Pelinescu-Onciul a
écrit :
> On Sep 17, 2009 at 12:38, Andrei Pelinescu-Onciul <andrei at iptel.org> wrote:
> > On Sep 16, 2009 at 21:48, Andrei Pelinescu-Onciul <andrei at iptel.org> wrote:
> > [...]
> > > 
> > > > This has not been modified in t_lookup.c from v0.9.7 nor v2.0 (attached)
> > > 
> > > Yes, but the problem is not in the place where it crashes, it's somewhere
> > > else.
> > > Both 0.9.7 and 0.9.4 are very old and I don't really remember all the
> > > fixes that went in (the cvs log is helpful, but does not tell the whole
> > > story). I wouldn't want to spend a lot of time debugging 0.9.4, just to
> > > find out in the end that the bug was fixed in 0.9.7, especially since
> > > there were non-trivial tm changes between the two.
> > 
> > I think I found the problem. It is fixed in 0.9.7.
> > Could you either try the attached patch, or upgrading?
> > 
> > If you upgrade, try the latest rel_0_9_0 branch, it has 3 additional
> > fixes for 0.9.7 (one being a fixed "fix" from 0.9.6). I'll add a 0.9.8
> > tag shortly, just to avoid confusion.
> 
> In the meantime, I've uploaded a tar.gz, so you could also get
> http://ftp.iptel.org/pub/ser/0.9.8/src/ser-0.9.8_src.tar.gz
> or use the v_0_9_8 tag with cvs.
> 
> Andrei
-------------- next part --------------
[root at solo ~]# gdb ser /core.4790
GNU gdb Red Hat Linux (6.3.0.0-1.63rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

Core was generated by `/usr/local/sbin/ser'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/tls/libc.so.6...done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/local/lib/ser/modules/mysql.so...done.
Loaded symbols for /usr/local/lib/ser/modules/mysql.so
Reading symbols from /usr/local/lib/ser/modules/sl.so...done.
Loaded symbols for /usr/local/lib/ser/modules/sl.so
Reading symbols from /usr/local/lib/ser/modules/tm.so...done.
Loaded symbols for /usr/local/lib/ser/modules/tm.so
Reading symbols from /usr/local/lib/ser/modules/rr.so...done.
Loaded symbols for /usr/local/lib/ser/modules/rr.so
Reading symbols from /usr/local/lib/ser/modules/maxfwd.so...done.
Loaded symbols for /usr/local/lib/ser/modules/maxfwd.so
Reading symbols from /usr/local/lib/ser/modules/usrloc.so...done.
Loaded symbols for /usr/local/lib/ser/modules/usrloc.so
Reading symbols from /usr/local/lib/ser/modules/registrar.so...done.
Loaded symbols for /usr/local/lib/ser/modules/registrar.so
Reading symbols from /usr/local/lib/ser/modules/auth.so...done.
Loaded symbols for /usr/local/lib/ser/modules/auth.so
Reading symbols from /usr/local/lib/ser/modules/auth_db.so...done.
Loaded symbols for /usr/local/lib/ser/modules/auth_db.so
Reading symbols from /usr/local/lib/ser/modules/acc.so...done.
Loaded symbols for /usr/local/lib/ser/modules/acc.so
Reading symbols from /usr/local/lib/ser/modules/exec.so...done.
Loaded symbols for /usr/local/lib/ser/modules/exec.so
Reading symbols from /usr/local/lib/ser/modules/group.so...done.
Loaded symbols for /usr/local/lib/ser/modules/group.so
Reading symbols from /usr/local/lib/ser/modules/print.so...done.
Loaded symbols for /usr/local/lib/ser/modules/print.so
Reading symbols from /usr/local/lib/ser/modules/textops.so...done.
Loaded symbols for /usr/local/lib/ser/modules/textops.so
Reading symbols from /usr/local/lib/ser/modules/nathelper.so...done.
Loaded symbols for /usr/local/lib/ser/modules/nathelper.so
Reading symbols from /usr/local/lib/ser/modules/uri.so...done.
Loaded symbols for /usr/local/lib/ser/modules/uri.so
Reading symbols from /usr/local/lib/ser/modules/uri_db.so...done.
Loaded symbols for /usr/local/lib/ser/modules/uri_db.so
Reading symbols from /usr/local/lib/ser/modules/domain.so...done.
Loaded symbols for /usr/local/lib/ser/modules/domain.so
Reading symbols from /usr/local/lib/ser/modules/permissions.so...done.
Loaded symbols for /usr/local/lib/ser/modules/permissions.so
Reading symbols from /usr/local/lib/ser/modules/xlog.so...done.
Loaded symbols for /usr/local/lib/ser/modules/xlog.so
Reading symbols from /usr/local/lib/ser/modules/avpops.so...done.
Loaded symbols for /usr/local/lib/ser/modules/avpops.so
Reading symbols from /usr/local/lib/ser/modules/check_ua.so...done.
Loaded symbols for /usr/local/lib/ser/modules/check_ua.so
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /lib/libnss_dns.so.2...done.
Loaded symbols for /lib/libnss_dns.so.2
#0  free_result (_r=0xffffffff) at res.c:187
187             if (RES_NAMES(_r)) pkg_free(RES_NAMES(_r));

(gdb) bt
#0  free_result (_r=0xffffffff) at res.c:187
#1  0x0059f001 in db_free_result (_h=0x8160f40, _r=0xffffffff) at dbase.c:344
#2  0x00f5dd37 in authorize (_m=0x8162918, _realm=Variable "_realm" is not available.
) at authorize.c:268
#3  0x0804fca1 in do_action (a=0x811a698, msg=0x8162918) at action.c:610
#4  0x080509bd in run_actions (a=0x811a698, msg=0x8162918) at action.c:718
#5  0x08074038 in eval_elem (e=0x811a6c0, msg=0x8162918) at route.c:605
#6  0x080744c2 in eval_expr (e=0x811a6c0, msg=0x8162918) at route.c:654
#7  0x080744fe in eval_expr (e=0x811a998, msg=0x8162918) at route.c:670
#8  0x0804ecb5 in do_action (a=0x811b1d0, msg=0x8162918) at action.c:586
#9  0x080509bd in run_actions (a=0x811b1d0, msg=0x8162918) at action.c:718
#10 0x0804ecf3 in do_action (a=0x811b2a8, msg=0x8162918) at action.c:603
#11 0x080509bd in run_actions (a=0x811b2a8, msg=0x8162918) at action.c:718
#12 0x0804ffff in do_action (a=0x8114d80, msg=0x8162918) at action.c:375
#13 0x080509bd in run_actions (a=0x8114d80, msg=0x8162918) at action.c:718
#14 0x0804ecf3 in do_action (a=0x8115010, msg=0x8162918) at action.c:603
#15 0x080509bd in run_actions (a=0x8115010, msg=0x8162918) at action.c:718
#16 0x0804ecf3 in do_action (a=0x8115038, msg=0x8162918) at action.c:603
#17 0x080509bd in run_actions (a=0x8115038, msg=0x8162918) at action.c:718
#18 0x0804ecf3 in do_action (a=0x8115060, msg=0x8162918) at action.c:603
#19 0x080509bd in run_actions (a=0x810fe88, msg=0x8162918) at action.c:718
#20 0x0806d132 in receive_msg (
    buf=0x80d61e0 "INVITE sip:0973002227 at sip.legos.fr SIP/2.0\r\nRecord-Route: <sip:87.237.184.104;ftag=95ffcd055e0f78f7d5d397020e89288d8fed44d2;lr=on>\r\nVia: SIP/2.0/UDP 87.237.184.104;branch=z9hG4bKc8b6.c6889dd3.0\r\nVia: "..., len=1286, rcv_info=0xbfe22f10) at receive.c:165
#21 0x0808450c in udp_rcv_loop () at udp_server.c:472
#22 0x0805ce2f in main_loop () at main.c:1057
#23 0x0805e3fb in main (argc=1, argv=0xbfe230d4) at main.c:1596

(gdb) frame 2
#2  0x00f5dd37 in authorize (_m=0x8162918, _realm=Variable "_realm" is not available.
) at authorize.c:268
268             auth_dbf.free_result(db_handle, result);

(gdb) print result
$1 = {s = 0x1 "", len = 2123204}

(gdb) print cred->digest->username
$3 = {whole = {
    s = 0x80d6535 "\", realm=\"sip.legos.fr\", nonce=\"4abb31afdfcdbdc931eec9660d1358e27ce7ea3a\", response=\"3ed11caee55b13abeaea3aa2b812f86d\", algorithm=MD5, uri=\"sip:87.237.184.104\"\r\nContent-Type: application/sdp\r\nContent-"..., len = 0}, user = {
    s = 0x80d6535 "\", realm=\"sip.legos.fr\", nonce=\"4abb31afdfcdbdc931eec9660d1358e27ce7ea3a\", response=\"3ed11caee55b13abeaea3aa2b812f86d\", algorithm=MD5, uri=\"sip:87.237.184.104\"\r\nContent-Type: application/sdp\r\nContent-"..., len = 0}, domain = {s = 0x0, len = 0}}

(gdb) print cred->digest->username->user
$4 = {
  s = 0x80d6535 "\", realm=\"sip.legos.fr\", nonce=\"4abb31afdfcdbdc931eec9660d1358e27ce7ea3a\", response=\"3ed11caee55b13abeaea3aa2b812f86d\", algorithm=MD5, uri=\"sip:87.237.184.104\"\r\nContent-Type: application/sdp\r\nContent-"..., len = 0}

 


More information about the sr-dev mailing list