[Home]

Summary:ASTERISK-03761: chanspy crash asterisk
Reporter:adria vidal (adriavidal)Labels:
Date Opened:2005-03-24 18:28:44.000-0600Date Closed:2005-04-05 23:22:19
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Applications/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:when i try to "spy", asterisk crash, only have get chanspy working 1 time.

== Spying on channel SIP/300-930c
Mar 25 00:56:41 WARNING[6104]: app_chanspy.c:280 start_spying: Attaching SIP/299-753c to SIP/300-930c

Asterisk crashes.....

blueG3*CLI>
Disconnected from Asterisk server


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

exten => 516,1,ChanSpy(SIP|)
exten => 516,2,Hangup
Comments:By: Clod Patry (junky) 2005-03-24 19:31:51.000-0600

Please attach a bt from gdb please.
Also, i suspect something from ASTERISK-3803836 .

edited on: 03-24-05 19:32

By: Brian West (bkw918) 2005-03-24 19:49:04.000-0600

make clean

By: geo_mm (geo_mm) 2005-03-24 20:32:42.000-0600

is there any new chanspy patch available for 1.0.6?

By: Mark Spencer (markster) 2005-03-24 22:56:52.000-0600

please do:

rm -rf /usr/lib/asterisk/modules
make clean
make install

then see if you still have the problem.  Thanks.

By: adria vidal (adriavidal) 2005-03-25 08:49:33.000-0600

Hi. mark.
rm -rf all modules and make * again, give me the same crash.

Called 350
   -- SIP/350-1c19 is ringing
   -- SIP/350-1c19 is ringing
   -- SIP/350-1c19 is ringing
   -- SIP/350-1c19 is ringing
   -- SIP/350-1c19 answered SIP/300-13ba
   -- Attempting native bridge of SIP/300-13ba and SIP/350-1c19
   -- Executing ChanSpy("SIP/299-f687", "SIP|") in new stack
   -- Playing 'beep' (language 'en')
   -- Playing 'sip' (language 'en')
   -- Playing 'digits/3' (language 'en')
   -- Playing 'digits/5' (language 'en')
   -- Playing 'digits/0' (language 'en')
 == Spying on channel SIP/350-1c19
Mar 25 15:45:12 WARNING[24996]: app_chanspy.c:280 start_spying: Attaching SIP/299-f687 to SIP/350-1c19
Segmentation fault
[root@blueG3 asterisk-addons]# Ouch ... error while writing audio data: : Broken pipe
Ouch ... error while writing audio data: : Broken pipe
Ouch ... error while writing audio data: : Broken pipe
Could not resync/reset buffers: No such process
Skipped ID3 Tag!

By: Brian West (bkw918) 2005-03-25 09:05:44.000-0600

can you get a backtrace?

/b

By: adria vidal (adriavidal) 2005-03-25 10:09:32.000-0600

yes, can explain me how?

asterisk -vvvgc
gdb ???

By: Mark Spencer (markster) 2005-03-25 15:00:20.000-0600

gdb ./asterisk <core file>
(gdb) bt full

By: Tilghman Lesher (tilghman) 2005-03-25 16:59:31.000-0600

I note that your machine is called blueG3, which would seem to indicate a big-endian machine, whereas x86 is little-endian (where most stuff gets tested).  Perhaps relevant?

By: Anthony Minessale (anthm) 2005-03-25 20:45:35.000-0600

I'm unable to reproduce, awaiting the backrace!

By: adria vidal (adriavidal) 2005-03-26 13:05:00.000-0600

Core was generated by `asterisk -vvvvvvvvvvvvvvvvvvvvvvvvvvvvgc'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000000 in ?? ()
(gdb) bt full
#0  0x00000000 in ?? ()
No symbol table info available.
(gdb)

By: Clod Patry (junky) 2005-03-27 10:05:38.000-0600

It's cause you didnt make valgrind i think.
You should recompile your asterisk like:
# cd /usr/src/asterisk/
# make clean; make valgrind; make install

Then restart your asterisk with -g option , and do the same procedure, you would obtain the backtrace.

By: Tilghman Lesher (tilghman) 2005-03-27 10:57:09.000-0600

Valgrind is irrelevant, here.  I suspect the original poster turned off the DEBUG line in his Makefile.  That's the one that looks like:

DEBUG=-g #-pg

because there are no symbol table entries in his backtrace, which makes me suspect they're all turned off.  He'll need to ensure this line is turned on (better yet, check out a CLEAN copy of CVS HEAD), have NO patches applied, and repeat the procedure of removing /usr/lib/asterisk/modules, then 'make clean install'

By: adria vidal (adriavidal) 2005-03-28 07:28:58.000-0600

i recompiled * again from fresh CVS download (i hadn't turned off degug into makefile).

same short trace.

(gdb) bt full
#0  0x00000000 in ?? ()
No symbol table info available.

By: nick (nick) 2005-03-28 10:30:35.000-0600

adriavidal, you might try finding somebody in #asterisk-bugs or #asterisk-dev who can help you get a proper core file.

Nick

By: Mark Spencer (markster) 2005-03-29 00:29:57.000-0600

Please find anthm or myself on IRC to help debug this.  Please note we will need root access to your machine via ssh.

By: adria vidal (adriavidal) 2005-03-29 01:42:31.000-0600

Thanks Mark. will try to be on IRC

By: Mark Spencer (markster) 2005-03-30 00:54:34.000-0600

Any luck working with anthm?

By: adria vidal (adriavidal) 2005-03-30 02:46:11.000-0600

not so much luck,anthm logged into my machine, but chanspying a user that is hearing MOH, crash ever.
chanspy a usual call (2 sip users) crash time to time. i really don't neet at 1005 chanspy so it's not a big problem for me, but it's a great app i would like to use in other asterisk boxes i'm building.
thanks mark!!!

By: matiasg (matiasg) 2005-03-30 07:22:38.000-0600

I'm having more or less the same problem (crash when using chanspy) it happens every it's not a random thing. I traced (up to where I'm able to) the problem... And * crashes in
(channel_spy line 359) "res = ast_waitfordigit(chan, 100)" -> (channel.c line 1197) "f = ast_read(c)" -> (channel.c line 1482) "generate = chan->generator->generate"

I'm willing to help (I need it working...) I have just registered to NickServ. My nick is matiasg and I can give you root access to one box which is not in production (Asterisk CVS-HEAD-03/29/05-20:03:15 ) I have done the rm /usr/lib/modules and I have tried all I could with no luck. Debian woody (3.0 rc 3) on a PIV 2.4 Ghz with a TE110P card and 512 mb....

edited on: 03-30-05 07:59

By: Anthony Minessale (anthm) 2005-03-30 16:16:17.000-0600

Try the newest CVS and re-evaluate, I made several commits today.

By: David Davies (davidd) 2005-03-30 16:41:26.000-0600

I have been trying to use chanspy and have had a few crashes and im sure thats taken care of with this bug, However I wanted to add a comment.
using Asterisk CVS-HEAD-03/30/05-22:32:00
with a cisco 7960 (g729)<> * <> snom190 g729 the audio is very very choppy.
box has genuine x100p for timing

   -- Playing 'beep' (language 'en')
   -- Playing 'sip' (language 'en')
   -- Playing 'digits/1' (language 'en')
   -- Playing 'digits/0' (language 'en')
   -- Playing 'digits/0' (language 'en')
   -- Playing 'digits/7' (language 'en')
 == Spying on channel SIP/1007-d5b6
Mar 30 23:36:24 WARNING[17970]: app_chanspy.c:299 start_spying: Attaching SIP/1003-c286 to SIP/1007-d5b6
Mar 30 23:36:28 ERROR[17970]: channel.c:737 ast_queue_spy_frame: Too Many frames queued at once, flushing cache.
Mar 30 23:36:28 ERROR[17970]: channel.c:737 ast_queue_spy_frame: Too Many frames queued at once, flushing cache.
Mar 30 23:36:31 ERROR[17970]: channel.c:737 ast_queue_spy_frame: Too Many frames queued at once, flushing cache.
Mar 30 23:36:31 ERROR[17970]: channel.c:737 ast_queue_spy_frame: Too Many frames queued at once, flushing cache.
Mar 30 23:36:34 ERROR[17970]: channel.c:737 ast_queue_spy_frame: Too Many frames queued at once, flushing cache.
Mar 30 23:36:34 ERROR[17970]: channel.c:737 ast_queue_spy_frame: Too Many frames queued at once, flushing cache.
 == Done Spying on channel SIP/1007-d5b6

d

By: Anthony Minessale (anthm) 2005-03-30 17:11:26.000-0600

Try very newest CVS (very newest like now's) like I mentioned in the last note.

By: adria vidal (adriavidal) 2005-03-30 17:44:47.000-0600

Great!!!!! anthm. last cvs run vvvvvvverrry wellll.
chanspy even MOH, sip channels, and now sound quality is much better.

None crash playing all kind of channels. even without q preference at chanspy

exten => 516,1,ChanSpy(SIP|); was ChanSpy(SIP|q)
exten => 516,2,Hangup


Thanks a lot, very good work.
P.d. Have one beer paid if you come to spain, barcelona. even astricon madrid....

AdriĆ 

By: Clod Patry (junky) 2005-03-30 18:45:50.000-0600

Now, davidd  and MatiasG can give feedbacks so we can close that bug.

By: matiasg (matiasg) 2005-03-30 19:33:21.000-0600

I have just finished testing the same test I run before and everything went fine... I haven't tested chanspy heavily but the same tests that used to crash my * run fine and the choppy sound issue is gone (for good). It seems that finally Chanspy is back! thanks everyone (specially anthm)

By: David Davies (davidd) 2005-03-31 02:13:03.000-0600

Thats great.
Working with
Connected to Asterisk CVS-HEAD-03/31/05-08:51:34

Thanks

By: David Davies (davidd) 2005-03-31 03:37:12.000-0600

Sorry guys I spoke 2 soon, what do you want me to do to assist

   -- Accepting UNAUTHENTICATED call from 217.14.132.185:
      > requested format = alaw,
      > requested prefs = (gsm|ulaw|alaw|g729|ilbc),
      > actual format = gsm,
      > host prefs = (gsm|g729|alaw|ulaw),
      > priority = mine
   -- Executing Goto("IAX2/02075551234@217.14.132.185:4569-11", "tekserveincoming|s|1") in new stack
   -- Goto (tekserveincoming,s,1)
   -- Executing Wait("IAX2/02075551234@217.14.132.185:4569-11", "1") in new stack
   -- Executing Answer("IAX2/02075551234@217.14.132.185:4569-11", "") in new stack
   -- Executing SetMusicOnHold("IAX2/02075551234@217.14.132.185:4569-11", "default") in new stack
   -- Executing DigitTimeout("IAX2/02075551234@217.14.132.185:4569-11", "3") in new stack
   -- Set Digit Timeout to 3
   -- Executing ResponseTimeout("IAX2/02075551234@217.14.132.185:4569-11", "6") in new stack
   -- Set Response Timeout to 6
   -- Executing GotoIfTime("IAX2/02075551234@217.14.132.185:4569-11", "18:01-08:59|mon-fri|*|*?tekserve_closed|s|1") in new stack
   -- Executing BackGround("IAX2/02075551234@217.14.132.185:4569-11", "tekservemainmenu") in new stack
   -- Playing 'tekservemainmenu' (language 'en')
   -- Executing Authenticate("SIP/1001-55d3", "8888") in new stack
   -- Playing 'agent-pass' (language 'en')
   -- Playing 'auth-thankyou' (language 'en')
   -- Executing ChanSpy("SIP/1001-55d3", "SIP|") in new stack
   -- Playing 'beep' (language 'en')
   -- Playing 'beep' (language 'en')
   -- Executing BackGround("IAX2/02075551234@217.14.132.185:4569-11", "wait7") in new stack
   -- Playing 'wait7' (language 'en')
   -- Playing 'beep' (language 'en')
   -- Executing Dial("IAX2/02075551234@217.14.132.185:4569-11", "SIP/400&SIP/401|20|m") in new stack
   -- Called 400
   -- Called 401
   -- Started music on hold, class 'default', on IAX2/02075551234@217.14.132.185:4569-11
   -- Got SIP response 480 "Temporarily Unavailable" back from phonesip
   -- SIP/401-8797 is circuit-busy
   -- SIP/400-1655 is ringing
   -- SIP/400-1655 is ringing
   -- SIP/400-1655 is ringing
   -- Playing 'sip' (language 'en')
   -- SIP/400-1655 is ringing
   -- Playing 'digits/4' (language 'en')
   -- Playing 'digits/0' (language 'en')
   -- Playing 'digits/0' (language 'en')
 == Spying on channel SIP/400-1655
Mar 31 10:27:52 WARNING[10062]: app_chanspy.c:299 start_spying: Attaching SIP/1001-55d3 to SIP/400-1655
   -- SIP/400-1655 is ringing
   -- SIP/400-1655 answered IAX2/02075551234@217.14.132.185:4569-11
   -- Stopped music on hold on IAX2/02075551234@217.14.132.185:4569-11
ipv6*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
[root@ipv6 asterisk]# /etc/rc.d/init.d/asterisk restart
Shutting Asterisk PBX:                                     [FAILED]
Starting Asterisk PBX:                                     [  OK  ]

edited on: 03-31-05 03:37

By: Clod Patry (junky) 2005-03-31 06:52:25.000-0600

davidd: each time your * crashes, please attach your gdb backtrace.
Thanks.

By: David Davies (davidd) 2005-03-31 07:22:46.000-0600

Will do my best to get you one, hopefully catch someone on irc

Having caught junky on irc I have done
make clean; make valgrind; make install and run * with -g
will post results when i have them

edited on: 03-31-05 08:25

By: Anthony Minessale (anthm) 2005-03-31 08:34:55.000-0600

davidd,

look in app_chanspy.c for
#define CS_BUFLEN 640

Try setting it to a bigger value, say 1024, recompile and retest and let me know if it makes any difference.

By: David Davies (davidd) 2005-03-31 10:30:21.000-0600

further to some irc dialog
have set #define CS_BUFLEN 640 to 1024
* hasnt crashed on me but drops frames in ulaw-ulaw and g729-g729 is mr roboto.
Thanks

fyi

Mar 31 17:19:04 ERROR[7070]: channel.c:737 ast_queue_spy_frame: Too Many frames queued at once, flushing cache.

edited on: 03-31-05 10:31

By: Anthony Minessale (anthm) 2005-04-01 10:17:30.000-0600

Please CVS update and try the latest edition!

By: David Davies (davidd) 2005-04-04 19:15:44

Sorry had to move back to stable as dtmf on iax went wobbly.
last check chanspy was not crashing my * but g729 was choppy.
Sorry cant help futher

By: Kevin P. Fleming (kpfleming) 2005-04-04 23:52:15

Are we ready to close this bug now? The only remaining reporter of problems can no longer provide traces, since he is no longer using CVS HEAD.

By: Anthony Minessale (anthm) 2005-04-05 09:26:29

I think so, I know I fixed the problem already so if it does crash anymore it would be a new bug.

By: zoa (zoa) 2005-04-05 09:56:53

reopen if problem comes back....