Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000319 [Yate - Yet Another Telephony Engine] module minor random 2012-10-02 19:48 2012-10-02 20:13
Reporter Alexander View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version SVN
Summary 0000319: Deadlock inside module analog during Yate termination
Description Occurs very rarely, during Yate termination if there is any channel in the 'out-of-order' or 'call-ended' state.

Not sure, that fix is correct.
Additional Information
Tags No tags attached.
Attached Files txt file icon yate-deadlock-fxs-call-ended.txt [^] (2,428 bytes) 2012-10-02 19:48
? file icon module-analog-fix-deadlock.patch [^] (543 bytes) 2012-10-02 19:50

- Relationships

-  Notes
(0000476)
Alexander (reporter)
2012-10-02 20:13
edited on: 2012-10-02 20:13

Thread # 1.
1. Gets message 'engine.halt'
2. Acquires the analog module global mutex (plugin.lock())
3. ModuleGroup::destruct() acquires ModuleGroup mutex, calls clearEndpoints
- m_endpoints.counts() is 1 before calling
- m_endpoints.counts() is 0 after calling
4. ModuleGroup::destruct() releases ModuleGroup mutex
6. Cancels Analog Worker thread and waits it termination

Thread # 2.
1. Executes ModuleGroup::checkTimers
2. ModuleGroup::checkTimers acquires ModuleGroup mutex, takes the next element of m_endpoints, executes checkTimeouts
3. checkTimeouts tries to acquire the analog module global mutex (plugin.lock())

The more elements m_endpoints contains - the more likely that the deadlock will occur.


- Issue History
Date Modified Username Field Change
2012-10-02 19:48 Alexander New Issue
2012-10-02 19:48 Alexander File Added: yate-deadlock-fxs-call-ended.txt
2012-10-02 19:50 Alexander File Added: module-analog-fix-deadlock.patch
2012-10-02 19:52 Alexander Issue Monitored: Alexander
2012-10-02 20:13 Alexander Note Added: 0000476
2012-10-02 20:13 Alexander Note Edited: 0000476


Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker