[Home]

Summary:ASTERISK-00097: Chan_sip gets stuck in a loop when congestion is indicated.
Reporter:oliver (oliver)Labels:
Date Opened:2003-08-13 17:29:30Date Closed:2007-07-20 12:04:22
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Since today's extensive changes in CVS, chan_sip hangs after congestion is indicated to a caller from chan_sip, flooding the console with this message:

DEBUG[98311]: File chan_sip.c, Line 4922 (sipsock_read): Failed to grab lock, trying again...

From `asterisk -r', "show channels" shows something similar to the following in such a case:

       Channel  (Context    Extension    Pri )   State Appl.         Data      
SIP/fwd.pulver.com-68b1  (context 08000289387  4   )    Ring Congestion    (Empty)
1 active channel(s)

It's not exclusive to FWD, as I'm also able to reproduce it with other SIP-clients, calling a local test-extension like this:

exten => 1234,1,Congestion

The problem seems to have started here after today's extensive changes to CVS.  I haven't seen it before.

****** ADDITIONAL INFORMATION ******

"up2date" RH9 with custom 2.4.21-kernel.
Asterisk CVS-08/13/03-23:46:27.

SIP-config (site-specific info removed / changed):

;
; SIP Configuration for Asterisk
;
[general]
port = 5060                     ; Port to bind to
bindaddr = x.x.x.x  ;Address to bind to
callerid=0
context = default-context
disallow=all
allow=ulaw


[4321]
type=friend
callerid="Test User" <4321>
context=context
dtmfmode=inband
host=x.x.x.x
Comments:By: oliver (oliver) 2003-08-13 17:48:00

Note the similarity to bug ID "0000083".

Also note that if I comment the block of code around line 4922 in "chan_sip.c", which is responsible for trying the lock, all seems to work fine as before.

By: Mark Spencer (markster) 2003-08-14 14:42:49

Fixed in CVS as of 8/14/03

By: oliver (oliver) 2003-08-14 15:02:20

Hey Mark,

Sorry, but the problem still occurs here.  I just verified it with the CVS-version as of a few minutes ago.  Exactly the same error-message.

By: Mark Spencer (markster) 2003-08-14 15:10:40

Run with thread debug and post results here.  Look for an error printed to stdout or stderr that says something about a locking issue

By: oliver (oliver) 2003-08-14 17:16:22

Hey Mark,

I just cvs updated again and now can't seem to reproduce it anymore.  Either one of your changes from the last hour or so (unintentionally) fixed it, or there's some other condition required to reproduce it.  Tomorrow, I can try reproducing it from a SIP-phone, where it always happened previously.  I'll then report if it's gone and this ticket can be closed again.

Did you change anything in CVS since 08-14-03 14:42 that could have fixed it?

By: Mark Spencer (markster) 2003-08-14 23:46:05

Yes, that's what i thought would have fixed it.

By: oliver (oliver) 2003-08-15 10:42:33

Hey Mark,

I just tried with that SIP-phone and the problem, unfortunately, still occured.  I've just sent you the requested output with thread-debugging enabled, via email.

By: Mark Spencer (markster) 2003-08-15 16:26:19

Have not seen your e-mail.  Can you paste here as an attachment?

By: oliver (oliver) 2003-08-15 18:05:35

Hey Mark,

The essence of the dump was the following:

-- Executing Congestion("SIP/3000-29e3", "") in new stack                
channel.c line 588 (ast_softhangup): Error obtaining mutex: Success
channel.c line 1156 (ast_indicate): Error releasing mutex: Operation not permitted

It might be intresting to note that the loop doesn't occur when Asterisk is compiled with thread-debugging.  Instead, I see the above 2 errors only.

edited on: 08-15-03 17:56

By: Mark Spencer (markster) 2003-08-15 21:44:32

Got it this time

By: Digium Subversion (svnbot) 2007-07-20 11:53:18

Repository: asterisk
Revision: 76067

------------------------------------------------------------------------
r76067 | file | 2007-07-20 11:53:17 -0500 (Fri, 20 Jul 2007) | 6 lines

(closes issue ASTERISK-9910)
Reported by: fkasumovic
Patches:
     res_conver.patch uploaded by fkasumovic (license ASTERISK-97)
Use the last occurance of . to find the extension, not the first occurance.

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

By: Digium Subversion (svnbot) 2007-07-20 11:54:37

Repository: asterisk
Revision: 76070

------------------------------------------------------------------------
r76070 | file | 2007-07-20 11:54:37 -0500 (Fri, 20 Jul 2007) | 14 lines

Merged revisions 76067 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r76067 | file | 2007-07-20 14:10:17 -0300 (Fri, 20 Jul 2007) | 6 lines

(closes issue ASTERISK-9910)
Reported by: fkasumovic
Patches:
     res_conver.patch uploaded by fkasumovic (license ASTERISK-97)
Use the last occurance of . to find the extension, not the first occurance.

........

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

By: Digium Subversion (svnbot) 2007-07-20 11:59:47

Repository: asterisk
Revision: 76080

------------------------------------------------------------------------
r76080 | file | 2007-07-20 11:59:46 -0500 (Fri, 20 Jul 2007) | 6 lines

(closes issue ASTERISK-9911)
Reported by: fkasumovic
Patches:
     chan_sip.patch uploaded by fkasumovic (license ASTERISK-97)
Drop any peer realm authentication entries when reloading so multiple entries do not get added to the peer.

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

By: Digium Subversion (svnbot) 2007-07-20 12:03:07

Repository: asterisk
Revision: 76087

------------------------------------------------------------------------
r76087 | file | 2007-07-20 12:03:06 -0500 (Fri, 20 Jul 2007) | 14 lines

Merged revisions 76080 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r76080 | file | 2007-07-20 14:16:48 -0300 (Fri, 20 Jul 2007) | 6 lines

(closes issue ASTERISK-9911)
Reported by: fkasumovic
Patches:
     chan_sip.patch uploaded by fkasumovic (license ASTERISK-97)
Drop any peer realm authentication entries when reloading so multiple entries do not get added to the peer.

........

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

By: Digium Subversion (svnbot) 2007-07-20 12:04:22

Repository: asterisk
Revision: 76091

------------------------------------------------------------------------
r76091 | file | 2007-07-20 12:04:22 -0500 (Fri, 20 Jul 2007) | 22 lines

Merged revisions 76087 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r76087 | file | 2007-07-20 14:20:09 -0300 (Fri, 20 Jul 2007) | 14 lines

Merged revisions 76080 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r76080 | file | 2007-07-20 14:16:48 -0300 (Fri, 20 Jul 2007) | 6 lines

(closes issue ASTERISK-9911)
Reported by: fkasumovic
Patches:
     chan_sip.patch uploaded by fkasumovic (license ASTERISK-97)
Drop any peer realm authentication entries when reloading so multiple entries do not get added to the peer.

........

................

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