[asterisk-bugs] [Asterisk 0011818]: Deadlock in chan_zap between zt_request and do_monitor
noreply at bugs.digium.com
noreply at bugs.digium.com
Tue Feb 5 13:29:42 CST 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=11818
======================================================================
Reported By: michael-fig
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 11818
Category: Channels/chan_zap
Reproducibility: random
Severity: major
Priority: normal
Status: feedback
Asterisk Version: 1.4.16.2
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 01-22-2008 13:17 CST
Last Modified: 02-05-2008 13:29 CST
======================================================================
Summary: Deadlock in chan_zap between zt_request and
do_monitor
Description:
We have Asterisk installed using SIP internally and a Sangoma T1 PRI card
(AFT101) to the outside world. Every once in a while, Asterisk would hang,
and when I investigated further, the deadlock detection code found a
deadlock in chan_zap.
I've attached the complete log (from the first Deadlock message to the
point when the connection hung) for you to look at. In brief, there were a
lot of messages of the form:
[Jan 21 14:36:10] ERROR[4211]:
/usr/src/asterisk-1.4.16.2/include/asterisk/lock.h:338
__ast_pthread_mutex_lock: chan_zap.c line 2722 (zt_hangup): Deadlock?
waited 10 sec for mutex '&iflock'?
[Jan 21 14:36:10] ERROR[4211]:
/usr/src/asterisk-1.4.16.2/include/asterisk/lock.h:342
__ast_pthread_mutex_lock: chan_zap.c line 6804 (do_monitor): '&iflock' was
locked here.
======================================================================
----------------------------------------------------------------------
putnopvut - 02-05-08 13:29
----------------------------------------------------------------------
I gave this a look, and what's odd is that the section of code where that
lock is locked does not have any blocking calls. The only thing within that
code section that I believe could cause problems would be if the iflist's
pointers became incorrect and caused an infinite loop.
Having said that, I found a place in the code which seems to improperly
handle a pointer and which could lead to the infinite loop I suspect is
happening. I'm going to upload a patch. Please give it a try and see if
this prevents the deadlock you are experiencing. Thanks.
Issue History
Date Modified Username Field Change
======================================================================
02-05-08 13:29 putnopvut Note Added: 0081713
======================================================================
More information about the asterisk-bugs
mailing list