[jitsi-dev] Deadlock between GUI and ReceiveStream


#1

Hey

I just ran into a deadlock between the GUI and a MediaStream, apparently
something with the audio level indicators. I was wondering if the method
org.jitsi.impl.neomedia.MediaStreamImpl.update needs hold the lock over the
receiveStreams-List while adding the stream to the device session?
(MediaStreamImpl lines 2430-2433 and 2463-2466)

Ingo

ReceiveStream-dealock.txt (4.4 KB)


#2

Hello, Ingo! Thank you very much for the report! I'm looking at it right now.

···

On 20.02.2014 09:39, Ingo Bauersachs wrote:

I just ran into a deadlock between the GUI and a MediaStream, apparently
something with the audio level indicators. I was wondering if the method
org.jitsi.impl.neomedia.MediaStreamImpl.update needs hold the lock over the
receiveStreams-List while adding the stream to the device session?
(MediaStreamImpl lines 2430-2433 and 2463-2466)


#3

Hello, Ingo.

I see that the deadlock is between AudioMixerMediaDevice.MediaStreamMediaDeviceSession.streamAudioLevelListenerLock and MediaDeviceSession.playbacks. Consequently, I don't think that modifying MediaStreamImpl.update to not hold a lock over the receiveStreams List will fix the issue.

Anyway, I modified the synchronization strategies of both MediaStreamImpl.receiveStreams and MediaDeviceSession.playbacks and I think the latter does address the deadlock. I'll commit it tomorrow after more testing.

Best regards,
Lyubomir

···

On 20.02.2014 09:39, Ingo Bauersachs wrote:

I was wondering if the method
org.jitsi.impl.neomedia.MediaStreamImpl.update needs hold the lock over the
receiveStreams-List while adding the stream to the device session?
(MediaStreamImpl lines 2430-2433 and 2463-2466)


#4

Hey

I was wondering if the method
org.jitsi.impl.neomedia.MediaStreamImpl.update needs hold the lock over

the

receiveStreams-List while adding the stream to the device session?
(MediaStreamImpl lines 2430-2433 and 2463-2466)

Hello, Ingo.

I see that the deadlock is between
AudioMixerMediaDevice.MediaStreamMediaDeviceSession.streamAudioLevelListe
nerL ock and MediaDeviceSession.playbacks. Consequently, I don't think
that modifying MediaStreamImpl.update to not hold a lock over the
receiveStreams List will fix the issue.

Oh sure, I was apparently confusing the two LinkedLists locked by
RTPEventHandler. Too much stuff around in the office... :frowning:

Anyway, I modified the synchronization strategies of both
MediaStreamImpl.receiveStreams and MediaDeviceSession.playbacks and I
think the latter does address the deadlock. I'll commit it tomorrow
after more testing.

Cool, thanks a lot!

Best regards,
Lyubomir

Regards,
Ingo

···

On 20.02.2014 09:39, Ingo Bauersachs wrote: