[Home]

Summary:ASTERISK-07012: app_chanspy causes deadlock after some time of active load
Reporter:febras (febras)Labels:
Date Opened:2006-05-22 06:47:34Date Closed:2006-05-23 08:52:29
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_chanspy
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:After some time (sometimes hours, sometimes a day or so) of working, asterisk deadlocks with endless message:

chan_sip.c: Failed to grab lock, trying again...

I disabled the ChanSpy extension and it has been running ok for a few days now, no more deadlocks (that's why I assumed it was app_chanspy, however this might not be the underlying cause). The symptoms at the moment of the deadlock are very similar to ASTERISK-6936997:

- 'stop now', 'reload' don't work
- 'show agents', 'show queues', etc print nothing
- Only kill -9 works in bringing it down

I also noted that, most of the times, just before the deadlock I get 'logger.c:   == Done Spying on channel <trash>'. Sometimes you get trashed chars instead of the channel, other times the channel just doesn't get printed.

Here's a snip of the log:

May 15 12:30:27 VERBOSE[21923] logger.c:   == Manager 'admin' logged on from 127.0.0.1
May 15 12:30:27 VERBOSE[21919] logger.c:     --  dialparties.agi: Correct AMPMGRUSER and AMPMGRPASS
May 15 12:30:27 DEBUG[21923] manager.c: Manager received command 'ExtensionState'
May 15 12:30:27 DEBUG[21923] channel.c: Avoiding initial deadlock for 'SIP/217-26dc'
May 15 12:30:27 DEBUG[21923] channel.c: Avoiding initial deadlock for 'SIP/217-26dc'
May 15 12:30:27 DEBUG[21923] channel.c: Avoiding initial deadlock for 'SIP/217-26dc'
May 15 12:30:27 DEBUG[21923] channel.c: Avoiding initial deadlock for 'SIP/217-26dc'
May 15 12:30:27 DEBUG[21923] channel.c: Avoiding initial deadlock for 'SIP/217-26dc'
May 15 12:30:27 DEBUG[21923] channel.c: Avoiding initial deadlock for 'SIP/217-26dc'
May 15 12:30:27 DEBUG[21923] channel.c: Avoiding initial deadlock for 'SIP/217-26dc'
May 15 12:30:27 DEBUG[21923] channel.c: Avoiding initial deadlock for 'SIP/217-26dc'
May 15 12:30:27 DEBUG[21923] channel.c: Avoiding initial deadlock for 'SIP/217-26dc'
May 15 12:30:27 DEBUG[21923] channel.c: Avoiding initial deadlock for 'SIP/217-26dc'
May 15 12:30:27 DEBUG[21923] channel.c: Avoiding initial deadlock for 'SIP/217-26dc'
May 15 12:30:27 DEBUG[21923] channel.c: Avoiding initial deadlock for 'SIP/217-26dc'
May 15 12:30:27 WARNING[21923] channel.c: Avoided initial deadlock for '0x9a0be90', 10 retries!
May 15 12:30:27 DEBUG[21923] manager.c: Manager received command 'Logoff'
May 15 12:30:27 VERBOSE[21923] logger.c:   == Manager 'admin' logged off from 127.0.0.1
May 15 12:30:27 VERBOSE[21919] logger.c:        >  dialparties.agi: extstate: 0
May 15 12:30:27 VERBOSE[21919] logger.c:   dialparties.agi: Extension 217 is available...skipping checks
May 15 12:30:27 VERBOSE[21919] logger.c:     --  dialparties.agi: DbSet CALLTRACE/217 to 912861859
May 15 12:30:27 VERBOSE[21919] logger.c:     -- AGI Script dialparties.agi completed, returning 0
May 15 12:30:27 VERBOSE[21919] logger.c:     -- Executing Dial("Local/217@from-internal-c553,2", "SIP/217|15|tr") in new stack
May 15 12:30:27 DEBUG[21919] chan_sip.c: Setting NAT on RTP to 0
May 15 12:30:27 DEBUG[21919] chan_sip.c: Outgoing Call for 217
May 15 12:30:27 VERBOSE[21919] logger.c:     -- Called 217
May 15 12:30:27 VERBOSE[21757] logger.c:     -- Agent/624 is ringing
May 15 12:30:27 DEBUG[20311] chan_sip.c: (Provisional) Stopping retransmission (but retaining packet) on '31c1fdd14240d33c6420abd96a4de604@192.168.101.250
May 15 12:30:27 DEBUG[20311] chan_sip.c: (Provisional) Stopping retransmission (but retaining packet) on '31c1fdd14240d33c6420abd96a4de604@192.168.101.250
May 15 12:30:27 DEBUG[20296] channel.c: Avoiding initial deadlock for 'SIP/217-39a9'
May 15 12:30:27 VERBOSE[21919] logger.c:     -- SIP/217-39a9 is ringing
May 15 12:30:29 DEBUG[20311] chan_sip.c: Failed to grab lock, trying again...
May 15 12:30:29 DEBUG[20311] chan_sip.c: Failed to grab lock, trying again...
...


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

Configuration:

- PRI channel, where we receive incoming calls.
- All incoming calls from PRI go into one Queue.
- All inside phones are SIP-based.
- Agents, who log on SIP phones using AgentCallBackLogin.
Comments:By: Joshua C. Colp (jcolp) 2006-05-22 10:54:09

Can you please try with 1.2.7.1? A few bugs dealing with spies were fixed along the way from 1.2.4

By: febras (febras) 2006-05-23 03:15:02

I cannot, at this time, upgrade to or try a newer version sorry. Maybe in a couple of weeks.

By: Serge Vecher (serge-v) 2006-05-23 08:52:10

Ok, if you are able to reproduce the bug at your leisure with the most recent stable version at the time of writing, please feel free to reopen the bug.

Thanks.