[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
Thu Oct 28 04:55:30 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-28 04:55 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
======================================================================
----------------------------------------------------------------------
(0128436) knkcn (reporter) - 2010-10-28 04:55
https://issues.asterisk.org/view.php?id=18204#c128436
----------------------------------------------------------------------
static int add_header_max_forwards(struct sip_pvt *dialog, struct
sip_request *req)
{
/* char clen[10];
const char *max = NULL;
while (dialog->owner && ast_channel_trylock(dialog->owner)) {
sip_pvt_unlock(dialog);
usleep(1);
sip_pvt_lock(dialog);
}
if (dialog->owner) {
max = pbx_builtin_getvar_helper(dialog->owner,
"SIP_MAX_FORWARDS");
ast_channel_unlock(dialog->owner);
}
if (max == NULL) {
snprintf(clen, sizeof(clen), "%d", dialog->maxforwards);
}
return add_header(req, "Max-Forwards", max != NULL ? max : clen);
*/
return add_header(req, "Max-Forwards", "70");
}
This works well under 4 times trial today. Should dialog be unlocked
before return?
Issue History
Date Modified Username Field Change
======================================================================
2010-10-28 04:55 knkcn Note Added: 0128436
======================================================================
More information about the asterisk-bugs
mailing list