yakutozcan / doubango

Automatically exported from code.google.com/p/doubango
0 stars 0 forks source link

webrtc2sip crashed by libtinySAK #380

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. webrtc2sip with sipml5 client and asterisk client
2. during the call, the webrtc2sip will crash
3. core dump generated

What is the expected output? What do you see instead?

from backtrace:

(gdb) backtrace full
#0  0x00002b10b3b108e5 in raise () from /lib64/libc.so.6
No symbol table info available.
#1  0x00002b10b3b120c5 in abort () from /lib64/libc.so.6
No symbol table info available.
#2  0x00002b10b3b4e7f7 in __libc_message () from /lib64/libc.so.6
No symbol table info available.
#3  0x00002b10b3b54126 in malloc_printerr () from /lib64/libc.so.6
No symbol table info available.
#4  0x00002b10b113f4a7 in tsk_object_unref (self=<value optimized out>) at 
src/tsk_object.c:188
        objhdr = <value optimized out>
#5  0x00002b10b113d68f in tsk_list_item_dtor (self=0x2b10c0000ff0) at 
src/tsk_list.c:579
        item = 0x2b10c0000ff0
        __FUNCTION__ = "tsk_list_item_dtor"
#6  0x00002b10b113f3b9 in tsk_object_delete (self=<value optimized out>) at 
src/tsk_object.c:220
        objdef = <value optimized out>
        __FUNCTION__ = "tsk_object_delete"
#7  0x00002b10b113f4a7 in tsk_object_unref (self=<value optimized out>) at 
src/tsk_object.c:188
        objhdr = <value optimized out>
#8  0x00002b10b113da48 in tsk_list_remove_item_by_data (list=<value optimized 
out>, tskobj=<value optimized out>) at src/tsk_list.c:173
        item = <value optimized out>
#9  0x00002b10b114489f in __tsk_timer_manager_mainthread (param=0x1665fb10) at 
src/tsk_timer.c:329
        timer = 0x0
        ret = <value optimized out>
        curr = 0x2b10c0001b20
        now = <value optimized out>
        manager = 0x1665fb10
        __FUNCTION__ = "__tsk_timer_manager_mainthread"
#10 0x00002b10b3127851 in start_thread () from /lib64/libpthread.so.0
No symbol table info available.

What version of the product are you using? On what operating system?
latest from git

Please provide any additional information below.

Original issue reported on code.google.com by johnsofteng@gmail.com on 14 May 2014 at 8:19

GoogleCodeExporter commented 9 years ago
In file doubango/tinySAK/src/tsk_list.c

do we need check "if (item && item->data)" instead of "if (item)" ? such as:

static tsk_object_t* tsk_list_item_dtor(tsk_object_t *self)
{
        tsk_list_item_t *item = (tsk_list_item_t*)self;
        if(item && item->data){
                item->data = tsk_object_unref(item->data);
        }
        else{
                TSK_DEBUG_WARN("Cannot free an uninitialized item");
        }
        return item;
}

Original comment by johnsofteng@gmail.com on 14 May 2014 at 8:24

GoogleCodeExporter commented 9 years ago
This is the log during webrtc2sip crash:

*INFO: setActualSndCardRecordParams(ptime=20, rate=8000, channels=1)
*INFO: Create audio resampler(opus Codec) for producer: rate=8000->48000, 
channels=1->1, bytesPerSample=2
*INFO: Decoded VP8 IDR
*INFO: IDR frame decoded
*INFO: producer size = (0, 0)
*INFO: Initializing new FFmpeg Video Converter src=(0x0@10) dst=(640x480@10)
*INFO: State machine: No matching state found.
*** glibc detected *** ./webrtc2sip: double free or corruption (fasttop): 
0x00002b10c0001b20 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x76126)[0x2b10b3b54126]
/usr/local/lib/libtinySAK.so.0(tsk_object_unref+0x47)[0x2b10b113f4a7]
/usr/local/lib/libtinySAK.so.0(+0x868f)[0x2b10b113d68f]
/usr/local/lib/libtinySAK.so.0(tsk_object_delete+0x19)[0x2b10b113f3b9]
/usr/local/lib/libtinySAK.so.0(tsk_object_unref+0x47)[0x2b10b113f4a7]
/usr/local/lib/libtinySAK.so.0(tsk_list_remove_item_by_data+0x18)[0x2b10b113da48
]
/usr/local/lib/libtinySAK.so.0(+0xf89f)[0x2b10b114489f]
/lib64/libpthread.so.0(+0x7851)[0x2b10b3127851]
/lib64/libc.so.6(clone+0x6d)[0x2b10b3bc694d]
======= Memory map: ========
00400000-004e6000 r-xp 00000000 00:a3 24713100                           
/opt/webrtc2sip/sbin/webrtc2sip
006e6000-006e9000 rw-p 000e6000 00:a3 24713100                           
/opt/webrtc2sip/sbin/webrtc2sip
006e9000-006ea000 rw-p 006e9000 00:00 0 
1663f000-166a3000 rw-p 1663f000 00:00 0                                  [heap]
2b10b0f13000-2b10b0f33000 r-xp 00000000 00:a3 22474914                   
/lib64/ld-2.12.so
2b10b0f33000-2b10b1036000 rw-p 2b10b0f33000 00:00 0 
2b10b1132000-2b10b1133000 r--p 0001f000 00:a3 22474914                   
/lib64/ld-2.12.so
2b10b1133000-2b10b1134000 rw-p 00020000 00:a3 22474914                   
/lib64/ld-2.12.so
2b10b1134000-2b10b1135000 rw-p 2b10b1134000 00:00 0 
2b10b1135000-2b10b114a000 r-xp 00000000 00:a3 15994791                   
/usr/local/lib/libtinySAK.so.0.0.0
2b10b114a000-2b10b134a000 ---p 00015000 00:a3 15994791                   
/usr/local/lib/libtinySAK.so.0.0.0
2b10b134a000-2b10b134b000 rw-p 00015000 00:a3 15994791                   
/usr/local/lib/libtinySAK.so.0.0.0
2b10b134b000-2b10b1397000 r-xp 00000000 00:a3 15994795                   
/usr/local/lib/libtinyNET.so.0.0.0
2b10b1397000-2b10b1597000 ---p 0004c000 00:a3 15994795                   
/usr/local/lib/libtinyNET.so.0.0.0
2b10b1597000-2b10b1599000 rw-p 0004c000 00:a3 15994795                   
/usr/local/lib/libtinyNET.so.0.0.0
2b10b1599000-2b10b159a000 rw-p 2b10b1599000 00:00 0 
2b10b159a000-2b10b15e2000 r-xp 00000000 00:a3 15994799                   
/usr/local/lib/libtinyHTTP.so.0.0.0
2b10b15e2000-2b10b17e1000 ---p 00048000 00:a3 15994799                   
/usr/local/lib/libtinyHTTP.so.0.0.0
2b10b17e1000-2b10b17e2000 rw-p 00047000 00:a3 15994799                   
/usr/local/lib/libtinyHTTP.so.0.0.0
2b10b17e2000-2b10b1892000 r-xp 00000000 00:a3 15994903                   
/usr/local/lib/libtinySIP.so.0.0.0

Original comment by johnsofteng@gmail.com on 14 May 2014 at 8:38

GoogleCodeExporter commented 9 years ago
Try latest revision

Original comment by boss...@yahoo.fr on 14 May 2014 at 11:32

GoogleCodeExporter commented 9 years ago
Closed by r1096.

Original comment by boss...@yahoo.fr on 15 May 2014 at 2:11