[asterisk-bugs] [Asterisk 0013213]: [patch] DAHDI mwi thread race conditions, sometimes crash or output wierd noises on the call
Asterisk Bug Tracker
noreply at bugs.digium.com
Fri Aug 1 15:37:28 CDT 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=13213
======================================================================
Reported By: bbryant
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 13213
Category: Channels/chan_dahdi
Reproducibility: sometimes
Severity: minor
Priority: normal
Status: new
Asterisk Version: SVN
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!): 134352
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 2008-07-31 18:04 CDT
Last Modified: 2008-08-01 15:37 CDT
======================================================================
Summary: [patch] DAHDI mwi thread race conditions, sometimes
crash or output wierd noises on the call
Description:
DAHDI appears to have a race condition in do_monitor where it can spawn two
instances of mwi_send_data for the same dahdi_pvt structure if the ioctl
for DAHDI_MWT fails around line 7922.
Attached is a backtrace of a crash that can occur with this issue.
My test environment is asterisk trunk r134352 and dahdi r4590 with a 4
port analog card. The test was just picking up the analog phone, and having
it drop into an immediate context that just played back a file.
Here are the debug messages, accompanied by 'dialup like' noises on the
analog phone:
[Jul 31 18:09:53] DEBUG[25958]: chan_dahdi.c:7914 do_monitor: Unable to
control message waiting led on channel 4: Inappropriate ioctl for device
[Jul 31 18:09:53] DEBUG[25963]: chan_dahdi.c:5558 dahdi_write: Dropping
frame since I've still got a callerid spill
[Jul 31 18:09:54] DEBUG[25963]: chan_dahdi.c:5558 dahdi_write: Dropping
frame since I've still got a callerid spill
[Jul 31 18:09:54] DEBUG[25963]: chan_dahdi.c:5558 dahdi_write: Dropping
frame since I've still got a callerid spill
[Jul 31 18:09:54] DEBUG[25963]: chan_dahdi.c:5558 dahdi_write: Dropping
frame since I've still got a callerid spill
[Jul 31 18:09:54] DEBUG[25963]: chan_dahdi.c:5558 dahdi_write: Dropping
frame since I've still got a callerid spill
[Jul 31 18:09:54] DEBUG[25963]: chan_dahdi.c:1954 restore_conference:
Restored conferencing
[Jul 31 18:09:54] WARNING[25962]: chan_dahdi.c:7543 mwi_send_thread: MWI
Send Write failed: Invalid argument
I've attempted a few wierd ways to fix it, but I think the patch just
creatively masking the problem instead of fixing it (still, I've attached
the patch because it makes it work).
======================================================================
----------------------------------------------------------------------
(0091001) dbailey (administrator) - 2008-08-01 15:37
http://bugs.digium.com/view.php?id=13213#c91001
----------------------------------------------------------------------
I doubt that there are two instances of the mwi_send_thread colliding but
instead is the mwi_send_thread colliding with other code that uses the cid
variables.
The patch's utilization of local variables instead of using those in the
dahdi_pvt is a big improvement.
I will look for collisions in handling the cid variables to see where
mwi_send_thread is treading.
Issue History
Date Modified Username Field Change
======================================================================
2008-08-01 15:37 dbailey Note Added: 0091001
======================================================================
More information about the asterisk-bugs
mailing list