#92 OpenSIPS latest trunk libmysqlclient segfault

trunk
closed-fixed
modules (454)
9
2009-03-05
2009-02-17
Om Bikram Thapa
No

OpenSIPS latest trunk on Debian Lenny/AMD64 dies with libmysqlclient segfault after a MySQL restart. The event that triggers this crash is registration related database query immediately after a MySQL restart. Once OpenSIPS is restarted after a crash, everything runs fine until next MySQL restart.

The log shows:

"opensips[16769]: segfault at 4c8 ip 7f36728bf283 sp 7fff7ba11a90 error 4 in libmysqlclient.so.15.0.0[7f3672862000+1bf000]"

and gdb bt gives following results:

---------------
Program terminated with signal 11, Segmentation fault.
[New process 16769]
#0 0x00007f36728bf283 in mysql_stmt_result_metadata ()
from /usr/lib/libmysqlclient.so.15
(gdb) bt
#0 0x00007f36728bf283 in mysql_stmt_result_metadata ()
from /usr/lib/libmysqlclient.so.15
#1 0x00007f3672c707b7 in db_mysql_do_prepared_query (conn=0x78b278,
query=<value optimized out>, v=0x7fff7ba11d20, n=1, uv=0x0, un=0)
at dbase.c:363
#2 0x00007f3672c72e1f in db_mysql_query (_h=0x78b278,
_k=<value optimized out>, _op=<value optimized out>, _v=0x7fff7ba11d20,
_c=<value optimized out>, _n=1, _nc=2, _o=0x0, _r=0x7fff7ba11dc0)
at dbase.c:591
#3 0x00007f366f3f0398 in authorize (_m=0x78fe98,
_realm=<value optimized out>, _table=<value optimized out>,
_hftype=<value optimized out>) at authorize.c:107
#4 0x000000000040f869 in do_action (a=0x780a48, msg=0x78fe98) at action.c:961
#5 0x000000000040e7e5 in run_action_list (a=<value optimized out>,
msg=0x78fe98) at action.c:139
#6 0x000000000046f194 in eval_elem (e=0x780b18, msg=0x78fe98, val=0x0)
at route.c:1189
#7 0x00000000004708ed in eval_expr (e=0x120b1e0, msg=0x78fe98, val=0x0)
at route.c:1486
#8 0x000000000047089c in eval_expr (e=0x780b60, msg=0x78fe98, val=0x0)
at route.c:1502
#9 0x00000000004708c5 in eval_expr (e=0x780ba8, msg=0x78fe98, val=0x0)
at route.c:1507
---Type <return> to continue, or q <return> to quit---
#10 0x000000000040f91c in do_action (a=0x780f40, msg=0x78fe98) at action.c:688
#11 0x000000000040e7e5 in run_action_list (a=<value optimized out>,
msg=0x78fe98) at action.c:139
#12 0x00000000004114d3 in do_action (a=0x781eb0, msg=0x78fe98) at action.c:705
#13 0x000000000040e7e5 in run_action_list (a=<value optimized out>,
msg=0x78fe98) at action.c:139
#14 0x0000000000410e07 in do_action (a=0x77ee88, msg=0x78fe98) at action.c:119
#15 0x000000000040e7e5 in run_action_list (a=<value optimized out>,
msg=0x78fe98) at action.c:139
#16 0x00000000004114d3 in do_action (a=0x77f028, msg=0x78fe98) at action.c:705
#17 0x000000000040e7e5 in run_action_list (a=<value optimized out>,
msg=0x78fe98) at action.c:139
#18 0x00000000004125fe in run_top_route (a=0x777e78, msg=0x78fe98)
at action.c:119
#19 0x000000000045e898 in receive_msg (
buf=0x749180 "REGISTER sip:x.x.x.x SIP/2.0\r\nCSeq: 2 REGISTER\r\nVia: SIP/2.0/UDP x.x.x.x:5061;branch=z9hG4bK60f1b2dd-57fa-dd11-9401-0015c5404858;rport\r\nUser-Agent: Ekiga/2.0.12\r\nAuthorization: Dige"...,
len=749, rcv_info=0x7fff7ba13530) at receive.c:165
#20 0x000000000049d3a6 in udp_rcv_loop () at udp_server.c:449
#21 0x00000000004291fb in main (argc=<value optimized out>,
argv=0x7fff7ba13718) at main.c:778
----------------

Discussion

<< < 1 2 (Page 2 of 2)
    • priority: 8 --> 9
     
  • finally fixed and confirmed.

    Thanks a lot to Om for helping with testing and debugging.

     
    • status: open-fixed --> closed-fixed
     
<< < 1 2 (Page 2 of 2)