#617 crash while querying list_tcp_conns

trunk
closed-fixed
core (110)
5
2013-02-27
2013-02-27
Ovidiu Sas
No

If opensips is running in UDP only mode (with tcp disabled) and the list_tcp_conns mi command is executed, opensips will crash.
It seems that the tcpconn_lock is not initialized and a lock is executed on a NULL pointer: tcp_main.c +1909

#0 0x00000000004b1ee5 in tsl (cmd=<value optimized out>, param=<value optimized out>) at fastlock.h:88
#1 get_lock (cmd=<value optimized out>, param=<value optimized out>) at fastlock.h:178
#2 mi_list_tcp_conns (cmd=<value optimized out>, param=<value optimized out>) at tcp_main.c:1909
#3 0x00007f6895039bd9 in run_mi_cmd (mod=<value optimized out>, cmd=<value optimized out>, arg=0x7fff3f2ff530, page=0x7fff3f2ff620, buffer=0x7f689716bb70,
async_hdl=0x7fff3f2ff550) at ../../mi/mi.h:109
(gdb) print lock
$1 = (volatile int *) 0x0

Regards,
Ovidiu Sas

Discussion

  • Thanks for report, bug fixed on SVN trunk and 1.9 .

    Regards,
    Bogdan

     
    • assigned_to: nobody --> bogdan_iancu
    • status: open --> closed-fixed