[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
Tue Aug 26 16:50:38 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13213 
====================================================================== 
Reported By:                bbryant
Assigned To:                dbailey
====================================================================== 
Project:                    Asterisk
Issue ID:                   13213
Category:                   Channels/chan_dahdi
Reproducibility:            sometimes
Severity:                   minor
Priority:                   normal
Status:                     assigned
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-26 16:50 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).
====================================================================== 

---------------------------------------------------------------------- 
 (0091764) svnbot (reporter) - 2008-08-26 16:50
 http://bugs.digium.com/view.php?id=13213#c91764 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 140246

U   trunk/channels/chan_dahdi.c

------------------------------------------------------------------------
r140246 | dbailey | 2008-08-26 16:50:37 -0500 (Tue, 26 Aug 2008) | 5 lines

Move the mwi send thread functionality back into the do_monitor thread so
that it is easier to manage CID spill resources when do_monitor needs to be
killed. 
(closes issue http://bugs.digium.com/view.php?id=13213)
Reported by: bbryant


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=140246 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-26 16:50 svnbot         Checkin                                      
2008-08-26 16:50 svnbot         Note Added: 0091764                          
======================================================================




More information about the asterisk-bugs mailing list