Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deadlock in janus_check_sessions #210

Closed
frk2 opened this issue Apr 15, 2015 · 1 comment
Closed

Deadlock in janus_check_sessions #210

frk2 opened this issue Apr 15, 2015 · 1 comment

Comments

@frk2
Copy link

frk2 commented Apr 15, 2015

Hi,
I experienced a very predictable deadlock in janus_check_sessions: 337

The problem is quite obvious as this is a double lock on sessions_mutex. You end up with the following backtrace (and lock):
Thread 16 (Thread 0x7fc1c7fff700 (LWP 99981)):
#0 0x00007fc2118d3f2c in __lll_lock_wait () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00007fc2118cf657 in _L_lock_909 () from /lib/x86_64-linux-gnu/libpthread.so.0
#2 0x00007fc2118cf480 in pthread_mutex_lock () from /lib/x86_64-linux-gnu/libpthread.so.0
#3 0x000000000042a376 in janus_session_notify_event (session_id=3946447357, event=0x7fc1bc001b80) at janus.c:414

---Type to continue, or q to quit---
#4 0x0000000000429a87 in janus_check_sessions (user_data=0xaed1e0) at janus.c:337
#5 0x00007fc2133b9703 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6 0x00007fc2133b8ce5 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7 0x00007fc2133b9048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8 0x00007fc2133b930a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9 0x0000000000429d39 in janus_sessions_watchdog (user_data=0xaed2d0) at janus.c:367
#10 0x00007fc2133ddf05 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007fc2118cd182 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#12 0x00007fc2115fa47d in clone () from /lib/x86_64-linux-gnu/libc.so.6

I believe the culprit is the following commit:
8a7df51

@lminiero
Copy link
Member

Good catch, I'll fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants