Repository: meetecho/janus-gateway

Issue #283: Crash in Audiobridge plugin
Created: 2015-07-14T18:06:15Z
There is an issue related to handle access. Here's the stack trace from the most recent version of Janus:
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `--config /opt/janus/etc/janus/janus.cfg --configs-folder=/opt/janus/etc/janus -'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000043cda5 in janus_push_event (handle=0x9c090090026f80, 
    plugin=0x7fa49059f320 <janus_audiobridge_plugin>, transaction=0x0, 
    message=0x7fa48c176160 "{\n   \"audiobridge\": \"destroyed\",\n   \"room\": 1471505503\n}", 
    sdp_type=0x0, sdp=0x0) at janus.c:3499
3499            if(!handle || handle->stopped)
(gdb) bt
#0  0x000000000043cda5 in janus_push_event (handle=0x9c090090026f80, 
    plugin=0x7fa49059f320 <janus_audiobridge_plugin>, transaction=0x0, 
    message=0x7fa48c176160 "{\n   \"audiobridge\": \"destroyed\",\n   \"room\": 1471505503\n}", 
    sdp_type=0x0, sdp=0x0) at janus.c:3499
#1  0x00007fa490394b18 in janus_audiobridge_handle_message (handle=<optimized out>, 
    transaction=0x7fa48c0c6500 "", 
    message=0x7fa48c09b230 "{\n   \"request\": \"destroy\",\n   \"room\": 1471505503\n}", 
    sdp_type=0x0, sdp=0x0) at plugins/janus_audiobridge.c:1222
#2  0x0000000000434d72 in janus_process_incoming_request (source=source@entry=0x7fa4667f3970, 
    root=root@entry=0x7fa48c1a4790) at janus.c:1513
#3  0x0000000000439279 in janus_ws_handler (cls=<optimized out>, connection=0x7fa48c051a00, 
    url=0x7fa48c000bd5 "/janus/1/2447247724", method=0x7fa48c000bd0 "POST", 
    version=<optimized out>, upload_data=0x0, upload_data_size=0x7fa4667f3b98, 
    ptr=0x7fa48c051a58) at janus.c:848
#4  0x00007fa4a44a683d in ?? () from /usr/lib/x86_64-linux-gnu/libmicrohttpd.so.10
#5  0x00007fa4a44a7a40 in ?? () from /usr/lib/x86_64-linux-gnu/libmicrohttpd.so.10
#6  0x00007fa4a44aa44b in ?? () from /usr/lib/x86_64-linux-gnu/libmicrohttpd.so.10
#7  0x00007fa4a2bf4182 in start_thread (arg=0x7fa4667f4700) at pthread_create.c:312
#8  0x00007fa4a292147d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Not sure what's causing it, but it's definitely a blocking issue for us.

Duplicate issue #284: Crash in ICE handler
Created: 2015-07-14T22:03:33Z
Something to do with reading a Janus flag?
Backtrace:
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `--config /opt/janus/etc/janus/janus.cfg --configs-folder=/opt/janus/etc/janus -'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00000000004508cb in janus_flags_is_set (flags=flags@entry=0xfcb6006e02920069, 
    flag=flag@entry=8) at utils.c:84
84                      return (bit != 0);
(gdb) bt
#0  0x00000000004508cb in janus_flags_is_set (flags=flags@entry=0xfcb6006e02920069, 
    flag=flag@entry=8) at utils.c:84
#1  0x000000000043cddb in janus_push_event (handle=0x1dfdf40, 
    plugin=0x7f47f1599320 <janus_audiobridge_plugin>, transaction=0x0, 
    message=0x1fb5400 "{\n   \"audiobridge\": \"event\",\n   \"room\": 1781896281,\n   \"leaving\": 488698383\n}", sdp_type=0x0, sdp=0x0) at janus.c:3502
#2  0x00007f47f138f8ea in janus_audiobridge_hangup_media (handle=<optimized out>)
    at plugins/janus_audiobridge.c:1558
#3  0x0000000000414f6e in janus_dtls_callback (ssl=<optimized out>, ret=<optimized out>, 
    where=<optimized out>) at dtls.c:573
#4  0x00007f48068aa47f in ?? () from /lib/x86_64-linux-gnu/libssl.so.1.0.0
#5  0x00007f48068971d4 in ?? () from /lib/x86_64-linux-gnu/libssl.so.1.0.0
#6  0x0000000000417e00 in janus_dtls_srtp_incoming_msg (dtls=0x14073c0, 
    buf=buf@entry=0x7f47a3795b40 "\025\376\377", len=len@entry=61) at dtls.c:314
#7  0x0000000000428a5c in janus_ice_cb_nice_recv (agent=<optimized out>, 
    stream_id=<optimized out>, component_id=1, len=61, buf=0x7f47a3795b40 "\025\376\377", 
    ice=0x13c6bd0) at ice.c:1543
#8  0x00007f480745d996 in ?? () from /usr/lib/x86_64-linux-gnu/libnice.so.10
#9  0x00007f4804d671d3 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#10 0x00007f4806f42ce5 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007f4806f43048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007f4806f4330a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x0000000000423ad2 in janus_ice_thread (data=0x1448d00) at ice.c:1573
#14 0x00007f4806f67f05 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#15 0x00007f4805435182 in start_thread (arg=0x7f47a37a6700) at pthread_create.c:312
#16 0x00007f480516247d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Closing comment (2015-07-15T07:47:04Z): Most likely a duplicate of #283, as flags are part of a handle structure.