[asterisk-bugs] [Asterisk 0018204]: deadlock on 1.8.0-rc2 and crash on 1.8.0 with multipule sip channels

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Oct 27 15:10:47 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18204 
====================================================================== 
Reported By:                knkcn
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18204
Category:                   Core/Channels
Reproducibility:            sometimes
Severity:                   crash
Priority:                   normal
Status:                     new
Asterisk Version:           1.8.0 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-10-25 02:30 CDT
Last Modified:              2010-10-27 15:10 CDT
====================================================================== 
Summary:                    deadlock on 1.8.0-rc2 and crash on 1.8.0 with
multipule sip channels
Description: 
Asterisk 1.8.0-rc2 as a call center server run well with 1 or 2 concurrent
lines. We did about 50 concurrent lines lab test with sipp and it run well
too. But under a more than 20 lines field trial, the Asterisk deadlocked.
After deadlocked I found many rtp channels and udp5060 had a large number
on Recv-Q. At the same time "core show channels" showed nothing and many
cli commands hang random. I collected some information using "gdb
/usr/sbin/asterisk <pid>" but I have not enough time to debug what locked
it before restarted it.

After that I upgraded the server to 1.8.0 with "DONT_OPTIMIZE" and
"DEBUG_THREADS", then I did the test again. But this time it crashed when
10 phones were calling in.

BTW, after the "DEBUG_THREADS" is enabled, every time the "bridge"
application is executed the following error will be reported.
[Oct 25 15:03:04] ERROR[25661] lock.c: features.c line 5551 (bridge_exec):
mutex 'current_dest_chan' freed more times than we've loc
ked!
[Oct 25 15:03:04] ERROR[25661] lock.c: features.c line 5551 (bridge_exec):
Error releasing mutex: Operation not permitted
====================================================================== 

---------------------------------------------------------------------- 
 (0128427) knkcn (reporter) - 2010-10-27 15:10
 https://issues.asterisk.org/view.php?id=18204#c128427 
---------------------------------------------------------------------- 
Understand the last deadlock.

Lock thread 2: handle_incoming locks SIP/outbound-00000309's pvt in
add_header_max_forwards and trys to lock channels container.

Lock thread 4: bridge_exec for SIP/outbound-0000309 and
SIP/inbound-00000306 locks channel SIP/outbound-00000309 and trys to lock
SIP/outbound-00000309's pvt.

Lock thread 5: Channel SIP/inbound-00000311 hangup event locks channels
container, but the cel_check_retire_linkdid function trys to lock channel
SIP/outbound-0000309.

Then it becomes deadlock. But the first deadlock and the crash log have
not cel_check_retire_linkdid, all the issues seem have relationship with
bridge. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-10-27 15:10 knkcn          Note Added: 0128427                          
======================================================================




More information about the asterisk-bugs mailing list