[Home]

Summary:ASTERISK-20682: deadlock when servicing MWI event
Reporter:Andrew Parisio (parisioa)Labels:
Date Opened:2012-11-14 12:55:34.000-0600Date Closed:2012-12-31 11:07:08.000-0600
Priority:CriticalRegression?
Status:Closed/CompleteComponents:Channels/chan_sip/Subscriptions
Versions:SVN Frequency of
Occurrence
Occasional
Related
Issues:
Environment:1.8 svnAttachments:( 0) locks.txt
( 1) threads.txt
Description:This is a 2 or 3 week old copy of 1.8/svn.  We've had 3 or so lock ups in the last 2 weeks, have to kill -9 it.  Will gdb bt full next time it crashes (didn't know you could do it on a live instance).

Thanks!
Comments:By: Mark Michelson (mmichelson) 2012-11-14 13:50:05.542-0600

I've attached ASTERISK-20682.patch for you to try using.

It moves event subscription callbacks to a point where there is no lock being held. In addition, I've made event subscriptions ref-counted in the slim chance that the event subscription gets destroyed in between us finding the event and calling the callback.

By: Mark Michelson (mmichelson) 2012-11-14 14:45:30.446-0600

Richard Mudgett has pointed out a possibility for this patch to be dangerous since it can result in referencing a freed structure. In other words, this could turn your deadlock into a crash given the right circumstances.

I'm going to remove the patch as a result.

By: Rusty Newton (rnewton) 2012-11-15 18:39:47.683-0600

Backtrace may help further, https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace#GettingaBacktrace-GettingInformationForADeadlock  Thanks!

By: Andrew Parisio (parisioa) 2012-12-19 18:07:30.349-0600

No crashes on an SVN copy about 3 weeks old.  I think this is fixed.

Thanks!