linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] mutex deadlocks


From: Troy Cauble
Subject: [Linphone-developers] mutex deadlocks
Date: Tue, 06 Jul 2004 11:52:43 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113


The maintainers probably won't care because they're porting
to eXosip, but...

There appears to be ample opportunity for mutex deadlocks
in linphone.  The osipua lib and the coreapi module each
have mutexes.

The thread handling inbound SIP messages grabs the osipua
mutex then the coreapi mutex.  While the thread handling
user events grabs them in the opposite order.


Example:  Simultaneous hangup.

Processing the inbound BYE, osipua_distribute_event() grabs
the osipua mutex and results in a callback to bye_cb() which
tries for the linphone_core_lock().

But, the UI thread has already called linphone_core_terminate_dialog()
which has done linphone_core_lock() and osip_dialog_bye().
osip_dialog_bye() will result in ua_transaction_execute() which
tries for the osipua mutex.



I've hit this deadlock in my use of osipua with another UA (not linphone). I don't know why no one has complained about the problem
in osipua.  I guess a lot depends on the system load, luck, and the
scheduler used.  (I'm using the real time scheduler in Hardhat Linux.)

-troy





reply via email to

[Prev in Thread] Current Thread [Next in Thread]