Summary:ASTERISK-12945: Avoiding deadlock for channel problem
Reporter:Martynas Spokas (chivilis)Labels:
Date Opened:2008-10-21 13:50:24Date Closed:2011-06-07 14:02:49
Versions:Frequency of
Environment:Attachments:( 0) asterisk-20081021-avoid-bug.zip

I have HP Proliant server with 1 E1 and 8 BRI Sangoma cards installed. I have noticed that in period of one day I have and error, when user calls, hears 'ringing' alert, agent answers, but user still hears 'ringing' tone.

I set debug mode in logger.conf and I noticed that when calls enters the queue, and starts ringing 'Avoinding deadlock for channel' errors appears and repeats many times.

All debug information is attached.
Comments:By: Martynas Spokas (chivilis) 2008-10-21 14:10:14

Also, I want to add that the call was processed from ISDN BRI incoming number 8415523710, to queue, and answering SIP extension was 215.

By: Mark Michelson (mmichelson) 2008-10-22 14:49:29

Thanks for reporting the problem. This sounds like a deadlock is happening. The best way to go about diagnosing one of these is to run `make menuselect` and enable the DONT_OPTIMIZE and DEBUG_THREADS options. Then recompile Asterisk. When the problem starts occurring (the "Avoiding deadlock" messages appear), run the command "core show locks." Upload the output of that command as well as the rest of the console output from that failure.

Thanks again!

By: Martynas Spokas (chivilis) 2008-10-22 15:00:30

The problem appears only on some calls. It is about 1 call per day. Is there any way to get information in log's about current locks? Scheduling cron every one minute to execute /usr/sbin/asterisk -rx "core show locks" >> /var/log/locks would help?

By: Mark Michelson (mmichelson) 2008-10-22 15:07:56

You certainly could do that, but the problem is that the output is really only helpful when the problem is occurring. Of course, I suppose that if you set up a cron job to get that output every minute, then you will likely also get the output while the problem is occurring, too. You'll just likely also have a lot of output that won't be very helpful, though.

By: Russell Bryant (russell) 2008-12-11 16:28:27.000-0600

I'm closing this out due to lack of response from the reporter.

Feel free to reopen this if you can get the "core show locks" output that shows the problem.