[Home]

Summary:ASTERISK-01144: Asterisk crashes when a call originated from an AGI is parked
Reporter:jmerlino (jmerlino)Labels:
Date Opened:2004-03-03 13:58:23.000-0600Date Closed:2004-09-25 02:54:42
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:When an extension is dialed from an AGI script and the originating call is then transferred to a parking extension asterisk crashes with segmentation fault

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

Backtrace:
(gdb) bt
#0  0x0805a88e in ast_hangup (chan=0x8188220) at channel.c:604
#1  0x4225324a in do_parking_thread (ignore=0x0) at res_parking.c:471
#2  0x4002c600 in pthread_detach () from /lib/i686/libpthread.so.0


Console output:
 == Parked MGCP/aaln/2@mgcp01-1 on 701
   -- Playing 'digits/7' (language 'uy')
   -- Playing 'digits/0' (language 'uy')
   -- Playing 'digits/1' (language 'uy')
   -- AGI Script dummydial.agi completed, returning 0
Mar  3 15:40:37 WARNING[180236]: channel.c:1364 ast_write: Thread 180236 Blocking 'MGCP/aaln/2@mgcp01-1', already blocked by thread 180236 in procedure ast_waitfor_nandfds
Mar  3 15:40:37 WARNING[180236]: channel.c:1364 ast_write: Thread 180236 Blocking 'MGCP/aaln/2@mgcp01-1', already blocked by thread 180236 in procedure ast_waitfor_nandfds
Mar  3 15:40:37 WARNING[180236]: channel.c:1364 ast_write: Thread 180236 Blocking 'MGCP/aaln/2@mgcp01-1', already blocked by thread 180236 in procedure ast_waitfor_nandfds
Mar  3 15:40:37 WARNING[180236]: channel.c:1364 ast_write: Thread 180236 Blocking 'MGCP/aaln/2@mgcp01-1', already blocked by thread 180236 in procedure ast_waitfor_nandfds
Mar  3 15:40:37 WARNING[180236]: channel.c:1364 ast_write: Thread 180236 Blocking 'MGCP/aaln/2@mgcp01-1', already blocked by thread 180236 in procedure ast_waitfor_nandfds
Mar  3 15:40:37 WARNING[180236]: channel.c:1364 ast_write: Thread 180236 Blocking 'MGCP/aaln/2@mgcp01-1', already blocked by thread 507933 in procedure ast_waitfor_nandfds
Mar  3 15:40:37 WARNING[180236]: channel.c:1364 ast_write: Thread 180236 Blocking 'MGCP/aaln/2@mgcp01-1', already blocked by thread 180236 in procedure ast_waitfor_nandfds
Mar  3 15:40:37 WARNING[507933]: rtp.c:375 ast_rtp_read: RTP Read error: Resource temporarily unavailable
Mar  3 15:40:38 WARNING[180236]: channel.c:1364 ast_write: Thread 180236 Blocking 'MGCP/aaln/2@mgcp01-1', already blocked by thread 180236 in procedure ast_waitfor_nandfds
Mar  3 15:40:38 WARNING[180236]: channel.c:1364 ast_write: Thread 180236 Blocking 'MGCP/aaln/2@mgcp01-1', already blocked by thread 180236 in procedure ast_waitfor_nandfds
Mar  3 15:40:38 WARNING[180236]: rtp.c:375 ast_rtp_read: RTP Read error: Resource temporarily unavailable
Mar  3 15:40:38 WARNING[507933]: rtp.c:375 ast_rtp_read: RTP Read error: Resource temporarily unavailable
Mar  3 15:40:38 WARNING[180236]: channel.c:1364 ast_write: Thread 180236 Blocking 'MGCP/aaln/2@mgcp01-1', already blocked by thread 507933 in procedure ast_waitfor_nandfds
Mar  3 15:40:38 WARNING[180236]: channel.c:1364 ast_write: Thread 180236 Blocking 'MGCP/aaln/2@mgcp01-1', already blocked by thread 180236 in procedure ast_waitfor_nandfds
Mar  3 15:40:38 WARNING[507933]: rtp.c:375 ast_rtp_read: RTP Read error: Resource temporarily unavailable
Mar  3 15:40:38 WARNING[180236]: channel.c:1364 ast_write: Thread 180236 Blocking 'MGCP/aaln/2@mgcp01-1', already blocked by thread 507933 in procedure ast_waitfor_nandfds
Mar  3 15:40:38 WARNING[507933]: rtp.c:375 ast_rtp_read: RTP Read error: Resource temporarily unavailable
Mar  3 15:40:38 WARNING[180236]: rtp.c:375 ast_rtp_read: RTP Read error: Resource temporarily unavailable
Mar  3 15:40:38 WARNING[180236]: channel.c:1364 ast_write: Thread 180236 Blocking 'MGCP/aaln/2@mgcp01-1', already blocked by thread 180236 in procedure ast_waitfor_nandfds
   -- Endpoint 'aaln/4@mgcp01-1' observed 'hu'
   -- MGCP handle_request(aaln/4@mgcp01-1) ast_channel already destroyed
   -- MGCP handle_request(aaln/4@mgcp01) set vmwi(-)
   -- Endpoint 'aaln/2@mgcp01-1' observed 'hu'
   -- Stopped music on hold on MGCP/aaln/2@mgcp01-1
   -- Executing GotoIf("MGCP/aaln/2@mgcp01-1", "1?4") in new stack
   -- Goto (local,h,4)
   -- Executing NoOp("MGCP/aaln/2@mgcp01-1", "") in new stack
 == MGCP/aaln/2@mgcp01-1 got tired of being parked
Ouch ... error while writing audio data: : Broken pipe
Segmentation fault
Comments:By: Mark Spencer (markster) 2004-03-05 09:22:26.000-0600

This trace suggests there are two threads trying to operate on the channel at one time, which is definitely a recipe for disaster.  Is your AGI executing the "dial" application or what?

By: Mark Spencer (markster) 2004-03-05 09:33:32.000-0600

Okay, I think i've got this one nailed.  We have to abandon the AGI on a AST_PBX_KEEPALIVE value just as we would on a hangup.  Just make sure this really fixes it, thanks!