lynckia / licode

Open Source Communication Provider based on WebRTC and Cloud technologies
http://lynckia.com/licode
MIT License
3.09k stars 1.02k forks source link

Deadlock #811

Open shahrukh330 opened 7 years ago

shahrukh330 commented 7 years ago

Hi,

I think i found a deadlock, I am attaching stacktrace as follows. It occurs when there are more then 12 users in the room and all try to join simultaneously.

__lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 135 in ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (gdb) backtrace

0 __lll_lock_wait ()

at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135

1 0x00007fd1ed9b668d in _L_lock_1082 ()

from /lib/x86_64-linux-gnu/libpthread.so.0

2 0x00007fd1ed9b6607 in __GI___pthread_mutex_lock (mutex=0x3fbb9c0)

at ../nptl/pthread_mutex_lock.c:134

3 0x00007fd1ea71c981 in g_mutex_lock ()

from /lib/x86_64-linux-gnu/libglib-2.0.so.0

4 0x00007fd1e9df5aec in agent_lock () at agent.c:139

5 0x00007fd1e9df5b9c in nice_agent_set_property (object=0x7b1ade0,

property_id=5, value=0x7ffe4c5c32e0, pspec=0x3fb88a0) at agent.c:957

6 0x00007fd1ea4596e3 in g_object_set_property ()

from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0

7 0x00007fd1ead47014 in erizo::NiceConnection::start (this=0x7b19040)

at /home/licode/fixLicode/licode/erizo/src/erizo/NiceConnection.cpp:166

8 0x00007fd1ead26931 in erizo::DtlsTransport::start (this=0x7b17520)

at /home/licode/fixLicode/licode/erizo/src/erizo/DtlsTransport.cpp:124

9 0x00007fd1ead7e7c6 in erizo::WebRtcConnection::setRemoteSdp (

this=0x722b570,
sdp="v=0\r\no=- 2581438428766876647 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio video\r\na=msid-semantic: WMS\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 "...)
at /home/licode/fixLicode/licode/erizo/src/erizo/WebRtcConnection.cpp:203
cracker0dks commented 7 years ago

are you running on more than one core ? Have you enabled more than one core for licode?

jcague commented 7 years ago

why do you think this is a deadlock?

shahrukh330 commented 7 years ago

@jcague maybe iam wrong but a quick search about __lll_lock_wait tells me its a deadlock. This is a rare case and comes when users are consistently joining and exiting a room.

jcague commented 7 years ago

IMO it's just a mutex inside libnice, but it could be a deadlock if multiple threads are stuck at the same mutex and they don't advance. Can you test if that thread remains waiting the same lock please?

shahrukh330 commented 7 years ago

@jcague I ll try to reproduce and let you know.