[Home]

Summary:ASTERISK-02381: ast_channel_walk_locked avoiding a deadlock causes breaks in audio
Reporter:Matthew Nicholson (mnicholson)Labels:
Date Opened:2004-09-10 12:02:19Date Closed:2011-06-07 14:05:20
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:During a call I was running 'show channels' on the asterisk console and one of the times the audio dropped out and was some what garbled as well for about two seconds.  At the same time this error was printed on the console.

Sep 10 09:55:26 DEBUG[1113623344]: channel.c:493 ast_channel_walk_locked: Avoiding deadlock for 'SIP/20-21ec'
Sep 10 09:55:26 DEBUG[1113623344]: channel.c:493 ast_channel_walk_locked: Avoiding deadlock for 'SIP/20-21ec'
Sep 10 09:55:26 DEBUG[1113623344]: channel.c:493 ast_channel_walk_locked: Avoiding deadlock for 'SIP/20-21ec'
Sep 10 09:55:26 DEBUG[1113623344]: channel.c:493 ast_channel_walk_locked: Avoiding deadlock for 'SIP/20-21ec'
Sep 10 09:55:26 DEBUG[1113623344]: channel.c:493 ast_channel_walk_locked: Avoiding deadlock for 'SIP/20-21ec'
Sep 10 09:55:26 DEBUG[1113623344]: channel.c:493 ast_channel_walk_locked: Avoiding deadlock for 'SIP/20-21ec'
Sep 10 09:55:27 DEBUG[1113623344]: channel.c:493 ast_channel_walk_locked: Avoiding deadlock for 'SIP/20-21ec'
Sep 10 09:55:27 DEBUG[1113623344]: channel.c:493 ast_channel_walk_locked: Avoiding deadlock for 'SIP/20-21ec'
Sep 10 09:55:27 DEBUG[1113623344]: channel.c:493 ast_channel_walk_locked: Avoiding deadlock for 'SIP/20-21ec'
Sep 10 09:55:27 DEBUG[1113623344]: channel.c:493 ast_channel_walk_locked: Avoiding deadlock for 'SIP/20-21ec'
Sep 10 09:55:27 WARNING[1113623344]: channel.c:495 ast_channel_walk_locked: Avoided deadlock for 'SIP/20-21ec', 10 retries!


Sep 10 09:55:29 DEBUG[1115724592]: rtp.c:1096 ast_rtp_raw_write: Difference is 26072, ms is 3279
Sep 10 09:55:29 DEBUG[1117825840]: rtp.c:1096 ast_rtp_raw_write: Difference is 26072, ms is 3279
Sep 10 09:55:29 DEBUG[1119927088]: rtp.c:1096 ast_rtp_raw_write: Difference is 26232, ms is 3299
Sep 10 09:55:29 DEBUG[1122028336]: rtp.c:1096 ast_rtp_raw_write: Difference is 26088, ms is 3281
Sep 10 09:55:29 DEBUG[1132477232]: rtp.c:1096 ast_rtp_raw_write: Difference is 26088, ms is 3281

(not sure if that rtp stuff is related)

Aparently when 'show channels' (reall like cli_chanlist or something) calls ast_channel_walk_locked and it avoids a deadlock there are audio drop outs.  I was unable to reproduce this, although I have seen it before on a customer's system.  This may have something to do with the manager interface.
Comments:By: Mark Spencer (markster) 2004-09-10 14:11:53

You've got things very much backwards.  The audio dropout is likely caused by something which is holding a lock for a long time.  The "avoided deadlock" is a side effect of the lock being held, and not the cause.  You will have to attach gdb while the lock is stuck in order to find anything useful.