Summary:ASTERISK-04596: Asterisk locks when ChanIsAvailable used with an IAX channel & SIP channel
Reporter:Joe Antkowiak (antkojm1)Labels:
Date Opened:2005-07-15 02:01:15Date Closed:2011-06-07 14:02:59
Versions:Frequency of
Environment:Attachments:( 0) gdb_dump.15770
Description:I haven't figured out how to fix it yet but whenever chanisavail is used with an iax2 channel and sip channel, no matter whether the iax2 or sip channel is available or not, it just hangs asterisk for the most part.  some commands will execute but provide only blank output (ie iax2 show registry even though that list is normally several pages)

I've reverted back to cvs from 05/07 to get it to work again.  

the box just sits there in this state for hours and hours:

switch1*CLI> show channels
       Channel  (Context    Extension    Pri )   State Appl.         Data
       Zap/2-1  (functions  7501         1000)      Up ChanIsAvail   IAX2/jsci@4108894667/4108894667&SIP/4108894667
       Zap/1-1  (functions  7501         1000)      Up ChanIsAvail   IAX2/jsci@4435246540/4435246540&SIP/4435246540
2 active channels
2 active calls
switch1*CLI> iax2 show registry
Host                  Username    Perceived             Refresh  State
Don't know what to do if second ROSE component is of type 0x6
Jul 15 02:37:52 WARNING[12381]: chan_zap.c:8063 pri_dchannel: Ring requested on channel 0/1 already in use on span 1.  Hanging up owner.
Don't know what to do if second ROSE component is of type 0x6
Jul 15 02:37:52 WARNING[12381]: chan_zap.c:8063 pri_dchannel: Ring requested on channel 0/2 already in use on span 1.  Hanging up owner.
   -- B-channel 0/2 restarted on span 1
Comments:By: Kevin P. Fleming (kpfleming) 2005-07-15 12:19:20

I cannot reproduce this problem on my system.

Please get your system set up to provide a coredump when the deadlock is happening, and then do a 'thread apply all bt full' of the core file. If you don't know how to get that done, get on #asterisk on IRC and one of the bug marshals will help you.

By: Joe Antkowiak (antkojm1) 2005-07-16 19:33:19

output gdb file of ast_grab_core attached

By: Joe Antkowiak (antkojm1) 2005-07-19 01:53:02

$100 bounty to whoever fixes this with a patch that makes it into cvs

By: Kevin P. Fleming (kpfleming) 2005-07-19 19:52:19

This should already be corrected in CVS HEAD with the recent chan_sip deadlock fix that went in. Please retest with up-to-date code and see if you can still produce the deadlock.

By: Joe Antkowiak (antkojm1) 2005-07-26 14:59:12

When was the fix put in to CVS?

By: Joe Antkowiak (antkojm1) 2005-07-28 03:20:42

cvs head from 7/27/05 does not appear to be having this issue.  Will confirm later this week.

By: Joe Antkowiak (antkojm1) 2005-07-28 13:08:56

I was wrong, still an issue in cvs head

By: Joe Antkowiak (antkojm1) 2005-07-28 13:10:47

can you take a look at this again?  

By: Michael Jerris (mikej) 2005-07-28 13:33:33

antkojm1, we will need the bt as kevin described in the first note.

By: Joe Antkowiak (antkojm1) 2005-07-28 18:15:27

I did what was requested, asked in #asterisk and attached that file to the bug.  If you need something different, please tell me what that is/how to get it, I've already done what bug marshals in #asterisk told me to do.

By: Michael Jerris (mikej) 2005-07-29 09:01:53

Sorry, I misread the comments and the dates.  Can you please provide an updated bt, just like the first one you created, with current cvs so we can look at if there is any difference after the fix kevin mentioned.  Thanks for your help.

By: Joe Antkowiak (antkojm1) 2005-08-08 00:39:34

so far we've only seen it happen once since the upgrade, and we can't reproduce it.  I guess we can close the bug for now and reopen if it happens again...

By: Mark Spencer (markster) 2005-08-08 02:32:40

Suspending pending duplication