Skip to content

Instantly share code, notes, and snippets.

@mqp
Created December 7, 2017 00:20
Show Gist options
  • Save mqp/7c935aad1a831bff21d9e1ae7c92e7c0 to your computer and use it in GitHub Desktop.
Save mqp/7c935aad1a831bff21d9e1ae7c92e7c0 to your computer and use it in GitHub Desktop.
Valgrind output for ICE handle free race
==19910== Thread 8:
==19910== Invalid read of size 4
==19910== at 0x6B581A4: pthread_mutex_lock (pthread_mutex_lock.c:81)
==19910== by 0x16EFE6: janus_plugin_handle_sdp (janus.c:2818)
==19910== by 0x16C5AC: janus_plugin_push_event (janus.c:2657)
==19910== by 0x14467F4C: janus_plugin_sfu::push_response (in /opt/janus/lib/janus/plugins/libjanus_plugin_sfu.so)
==19910== by 0x1446BB09: janus_plugin_sfu::handle_message_async (in /opt/janus/lib/janus/plugins/libjanus_plugin_sfu.so)
==19910== by 0x1444EA23: std::sys_common::backtrace::__rust_begin_short_backtrace (in /opt/janus/lib/janus/plugins/libjanus_plugin_sfu.so)
==19910== by 0x1444FD22: std::panicking::try::do_call (in /opt/janus/lib/janus/plugins/libjanus_plugin_sfu.so)
==19910== by 0x1449DB1C: __rust_maybe_catch_panic (lib.rs:99)
==19910== by 0x1445757B: <F as alloc::boxed::FnBox<A>>::call_box (in /opt/janus/lib/janus/plugins/libjanus_plugin_sfu.so)
==19910== by 0x144964BB: call_once<(),()> (boxed.rs:692)
==19910== by 0x144964BB: start_thread (thread.rs:21)
==19910== by 0x144964BB: std::sys::imp::thread::Thread::new::thread_start (thread.rs:84)
==19910== by 0x6B557FB: start_thread (pthread_create.c:465)
==19910== by 0x6E81B0E: clone (clone.S:95)
==19910== Address 0x1b9320c0 is 272 bytes inside a block of size 328 free'd
==19910== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19910== by 0x1396AF: janus_ice_free (ice.c:1085)
==19910== by 0x159085: janus_ice_handle_dereference (janus.c:425)
==19910== by 0x530F863: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5400.1)
==19910== by 0x15B0F6: janus_session_handles_clear (janus.c:616)
==19910== by 0x15A8D6: janus_session_destroy (janus.c:566)
==19910== by 0x16BAFD: janus_transport_gone (janus.c:2538)
==19910== by 0x15A3969C: janus_websockets_destroy_client (janus_websockets.c:720)
==19910== by 0x15A3D60F: janus_websockets_common_callback (janus_websockets.c:1062)
==19910== by 0x15A3DD76: janus_websockets_callback (janus_websockets.c:1089)
==19910== by 0x15C48B34: lws_close_free_wsi (in /usr/lib/libwebsockets.so.8)
==19910== by 0x15C49F3A: lws_service_fd_tsi (in /usr/lib/libwebsockets.so.8)
==19910== Block was alloc'd at
==19910== at 0x4C31B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==19910== by 0x53275D0: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5400.1)
==19910== by 0x136FD8: janus_ice_handle_create (ice.c:923)
==19910== by 0x15F663: janus_process_incoming_request (janus.c:1078)
==19910== by 0x16C093: janus_transport_task (janus.c:2587)
==19910== by 0x534A00F: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5400.1)
==19910== by 0x5349644: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.5400.1)
==19910== by 0x6B557FB: start_thread (pthread_create.c:465)
==19910== by 0x6E81B0E: clone (clone.S:95)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment