[asterisk-bugs] [Asterisk 0015151]: [patch] Deadlock On One-legged Transfer [SIP / REPLACES] (Call Pickup)
Asterisk Bug Tracker
noreply at bugs.digium.com
Tue Jul 14 13:02:48 CDT 2009
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=15151
======================================================================
Reported By: irroot
Assigned To: file
======================================================================
Project: Asterisk
Issue ID: 15151
Category: Channels/chan_sip/Transfers
Reproducibility: always
Severity: crash
Priority: normal
Status: feedback
Target Version: 1.4.27
Asterisk Version: 1.4.24
Regression: No
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2009-05-19 08:31 CDT
Last Modified: 2009-07-14 13:02 CDT
======================================================================
Summary: [patch] Deadlock On One-legged Transfer [SIP /
REPLACES] (Call Pickup)
Description:
Hi there here is a nasty deadlock on a one legged transfer [SIP /
REPLACES].
the solution is trivial but took me a few hours to pickup the patch is a
patch against clean 1.4.24.1.
the bellow lock dump is from a patched version.
BTW the this is a bit of a joke as im a amputee so me colegues had a field
day.
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0015143 [patch] Deadlock on chan_sip
======================================================================
----------------------------------------------------------------------
(0107726) loris (reporter) - 2009-07-14 13:02
https://issues.asterisk.org/view.php?id=15151#c107726
----------------------------------------------------------------------
We've been having the same problem as Irroot. Using 15151.diff seems to
cure that problem but it seems to have problems of its own.
Compiling asterisk 1.2.25.1 with DONT OPTIMIZE, DEBUG THREADS, DEBUG
LOCKS, making a call and then generating a Call Pickup (Invite with
replaces), leads to the following messages in the logs:
[Jul 14 13:23:13] ERROR[21679]
/home/loris/rpmbuild/BUILD/asterisk-1.4.25.1/include/asterisk/lock.h:
chan_sip.c line 7544 (transmit_state_notify): mutex '&chan->lock' freed
more times than we've locked!
[Jul 14 13:23:13] ERROR[21679]
/home/loris/rpmbuild/BUILD/asterisk-1.4.25.1/include/asterisk/lock.h:
chan_sip.c line 7544 (transmit_state_notify): Error releasing mutex:
Operation not permitted
[Jul 14 13:23:20] ERROR[21702]
/home/loris/rpmbuild/BUILD/asterisk-1.4.25.1/include/asterisk/lock.h:
chan_sip.c line 16367 (sipsock_read): mutex '(channel lock)' freed more
times than we've locked!
[Jul 14 13:23:20] ERROR[21702]
/home/loris/rpmbuild/BUILD/asterisk-1.4.25.1/include/asterisk/lock.h:
chan_sip.c line 16367 (sipsock_read): Error releasing mutex: Operation not
permitted
[Jul 14 13:23:20] ERROR[21702]
/home/loris/rpmbuild/BUILD/asterisk-1.4.25.1/include/asterisk/lock.h:
chan_sip.c line 3259 (__sip_destroy): Error destroying mutex &p->lock:
Device or resource busy
and then the following lock is generated:
=======================================================================
=== Currently Held Locks ==============================================
=======================================================================
===
=== <file> <line num> <function> <lock name> <lock addr> (times locked)
===
=== Thread ID: 1081186624 (do_monitor started at [16636]
chan_sip.c restart_monitor())
=== ---> Lock https://issues.asterisk.org/view.php?id=0 (chan_sip.c): MUTEX 9336
get_sip_pvt_byid_locked
&sip_pvt_ptr->lock 0x3f8aad0 (1)
=== -------------------------------------------------------------------
===
=======================================================================
if one removes the second hunk of the patch (the double unlock), the
following messages are generated:
ERROR[10199]
/usr/src/redhat/BUILD/asterisk-1.4.25.1/include/asterisk/lock.h: chan_sip.c
line 16365 (s
ipsock_read): mutex '&p->owner->lock' freed more times than we've locked!
[Jul 14 11:14:58] ERROR[10199]
/usr/src/redhat/BUILD/asterisk-1.4.25.1/include/asterisk/lock.h: chan_sip.c
line 16365 (s
ipsock_read): Error releasing mutex: Operation not permitted
this time no lock builds up inmediately, but after two or three hours of
medium traffic the lock appears, and then is enough to execute "show
channels" to have asterisk deadlock.
Issue History
Date Modified Username Field Change
======================================================================
2009-07-14 13:02 loris Note Added: 0107726
======================================================================
More information about the asterisk-bugs
mailing list