[asterisk-bugs] [Asterisk 0014057]: Deadlock chan_dahdi.c and channel.c
Asterisk Bug Tracker
noreply at bugs.digium.com
Mon Dec 22 15:08:00 CST 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=14057
======================================================================
Reported By: rtrauntvein
Assigned To: putnopvut
======================================================================
Project: Asterisk
Issue ID: 14057
Category: Channels/chan_dahdi
Reproducibility: random
Severity: crash
Priority: normal
Status: closed
Asterisk Version: 1.4.22
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Disclaimer on File?: N/A
Request Review:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 2008-12-10 17:13 CST
Last Modified: 2008-12-22 15:07 CST
======================================================================
Summary: Deadlock chan_dahdi.c and channel.c
Description:
I have an asterisk system that has been deadlocking on a weekly basis at
least once, and we cant seem to reliably reproduce it. It is a production
system with about 25 users that is being constantly used.
Running zaptel 1.4.12.1 with a TE220 card.
(Planning on installing the DAHDI release over the weekend as next
troubleshooting step)
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0013935 Calls are not beeing disconnected
======================================================================
----------------------------------------------------------------------
(0096844) svnbot (reporter) - 2008-12-22 15:07
http://bugs.digium.com/view.php?id=14057#c96844
----------------------------------------------------------------------
Repository: asterisk
Revision: 166382
_U trunk/
U trunk/channels/chan_dahdi.c
------------------------------------------------------------------------
r166382 | mmichelson | 2008-12-22 15:07:59 -0600 (Mon, 22 Dec 2008) | 44
lines
Merged revisions 166380 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r166380 | mmichelson | 2008-12-22 14:56:29 -0600 (Mon, 22 Dec 2008) | 36
lines
Fix a deadlock relating to channel locks and autoservice
It has been discovered that if a channel is locked prior
to a call to ast_autoservice_stop, then it is likely that
a deadlock will occur. The reason is that the call to
ast_autoservice_stop has a check built into it to be sure
that the thread running autoservice is not currently trying
to manipulate the channel we are about to pull out of
autoservice.
The autoservice thread, however, cannot advance beyond where
it currently is, though, because it is trying to acquire
the lock of the channel for which autoservice is attempting
to be stopped.
The gist of all this is that a channel MUST NOT be locked
when attempting to stop autoservice on the channel.
In this particular case, the channel was locked by a call
to ast_read. A call to ast_exists_extension led to autoservice
being started and stopped due to the existence of dialplan
switches.
It may be that there are future commits which handle the same
symptoms but in a different location, but based on my looks through
the code, it is very rare to see a construct such as this one.
(closes issue http://bugs.digium.com/view.php?id=14057)
Reported by: rtrauntvein
Patches:
14057v3.patch uploaded by putnopvut (license 60)
Tested by: rtrauntvein
Review: http://reviewboard.digium.com/r/107/
........
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=166382
Issue History
Date Modified Username Field Change
======================================================================
2008-12-22 15:07 svnbot Checkin
2008-12-22 15:07 svnbot Note Added: 0096844
======================================================================
More information about the asterisk-bugs
mailing list