[Home]

Summary:ASTERISK-13355: 1.4.22 crash with Park
Reporter:Mark Murawski (kobaz)Labels:
Date Opened:2009-01-13 08:59:22.000-0600Date Closed:2009-01-16 16:59:44.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Resources/res_features
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) valgrind
Description:SIP/5506 Calls SIP/5501
5501 hits *1

5506 parks iteelf
timeout hits
5506 calls itself
pickup the 5506 self-call
asterisk crashes

this seems very similar to http://insects.digium.com/bug_view_advanced_page.php?bug_id=7565

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



  -- Executing [5501@basic:1] Set("SIP/5506-081de6f0", "ARGS=dialExt,5501,no") in new stack
   -- Executing [5501@basic:2] Set("SIP/5506-081de6f0", "DYNAMIC_FEATURES=park1#park2#park3#park4#park5#park6#park7#park8#park9#park10") in new stack
   -- Executing [5501@basic:3] Dial("SIP/5506-081de6f0", "SIP/5501||rM(dynamicFeatures-callee)") in new stack
   -- Called 5501
   -- SIP/5501-081ec348 is ringing
   -- SIP/5501-081ec348 answered SIP/5506-081de6f0
   -- Executing [s@macro-dynamicFeatures-callee:1] Set("SIP/5501-081ec348", "DYNAMIC_FEATURES=park1#park2#park3#park4#park5#park6#park7#park8#park9#park10") in new stack
[Jan 13 09:17:03] NOTICE[17858]: chan_iax2.c:8888 __iax2_poke_noanswer: Peer 'mdw_demo_exten' is now UNREACHABLE! Time: 0
[Jan 13 09:17:03] NOTICE[17859]: chan_iax2.c:8888 __iax2_poke_noanswer: Peer 'MDW-Demo' is now UNREACHABLE! Time: 0
   --  Feature Found: park1 exten: park1
   -- Launched AGI Script /var/lib/asterisk/agi-bin/park.agi
   -- AGI Script Executing Application: (Park) Options: ((null))
 == Parked SIP/5506-081de6f0 on 1@parkedcalls. Will timeout back to extension [basic] s, 1 in 10 seconds
   -- <SIP/5506-081de6f0> Playing 'digits/1' (language 'en')
   -- Added extension '1' priority 1 to parkedcalls
   -- Started music on hold, class 'default', on channel 'SIP/5506-081de6f0'
   -- Stopped music on hold on SIP/5506-081de6f0
   -- Registered extension context 'park-dial'
   -- Added extension 'SIP/5506' priority 1 to park-dial
 == Timeout for SIP/5506-081de6f0 parked on 1. Returning to park-dial,SIP/5506,1
[Jan 13 09:17:16] WARNING[17880]: pbx.c:2368 __ast_pbx_run: SIP/5506-081de6f0 already has PBX structure??
   -- Executing [SIP/5506@park-dial:1] Dial("SIP/5506-081de6f0", "SIP/5506|30|") in new stack
   -- Called 5506
   -- SIP/5506-081f9dc0 is ringing
   -- Started music on hold, class 'default', on channel 'SIP/5501-081ec348'
   -- SIP/5506-081f9dc0 answered SIP/5506-081de6f0
[Jan 13 09:17:18] WARNING[17880]: channel.c:3929 ast_channel_bridge: SIP/5506-081de6f0 is already in a bridge with SIP/5501-081ec348
[Jan 13 09:17:18] WARNING[17880]: res_features.c:1570 ast_bridge_call: Bridge failed on channels SIP/5506-081de6f0 and SIP/5506-081f9dc0
 == Spawn extension (park-dial, SIP/5506, 1) exited non-zero on 'SIP/5506-081de6f0'
[Jan 13 09:17:18] WARNING[17880]: channel.c:1498 ast_hangup: Hard hangup called by thread -1226712176 on SIP/5506-081de6f0, while fd is blocked by thread -1226220656 in procedure ast_waitfor_nandfds!  Expect a failure
   -- Stopped music on hold on SIP/5501-081ec348
 == Spawn extension (park-dial, SIP/5506, 1) exited non-zero on 'h'
[Jan 13 09:17:18] WARNING[17876]: channel.c:944 ast_queue_frame: Unable to write to alert pipe on h, frametype/subclass 5/0 (qlen = 0): Bad file descriptor!
Segmentation fault (core dumped)


#0  0xb7ec8438 in ?? () from /lib/libc.so.6
#1  0x0808475a in ast_hangup (chan=0x81e0cb8) at channel.c:1507
#2  0x080c5af6 in __ast_pbx_run (c=0x81e0cb8) at pbx.c:2561
#3  0x080c5cc2 in pbx_thread (data=0x81e0cb8) at pbx.c:2621
#4  0x08103597 in dummy_start (data=0x81c7b68) at utils.c:912
ASTERISK-1  0xb7f3a383 in start_thread () from /lib/libpthread.so.0
ASTERISK-2  0xb7e5463e in clone () from /lib/libc.so.6

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

features.conf
--------------
[applicationmap]
park1 => *1,callee,AGI,park.agi ;  park.agi just does Park() on the other channel
Comments:By: Leif Madsen (lmadsen) 2009-01-13 11:09:13.000-0600

Is there a reason why you aren't just using the built-in parking feature? Just curious.

By: Mark Murawski (kobaz) 2009-01-13 12:41:21.000-0600

We want a really simple park system, where each person has their own parking lot.  Station 1 can hit *1 to park in spot 1, etc.

There's also another problem (which is shown in the log).  When 5506 parks, it loses it's peer extension, and when the timeout is reached, it dials itself, rather than the extension it was bridged with.



By: Leif Madsen (lmadsen) 2009-01-14 13:36:05.000-0600

Hmmmm... could you attach your park.AGI file so I can determine if there is an issue with just the way you're doing it, or if there is an underlying issue, irrespective of your .agi file?

By: Terry Wilson (twilson) 2009-01-15 12:16:12.000-0600

Ok, I think I have this one fixed.  I will be applying the fix shortly and I'm going to go ahead and close the bug with the commit, since I have an almost identical valgrind output to yours.  If you still have the problem, please don't hesitate to reopen the ticket.

By: Digium Subversion (svnbot) 2009-01-15 12:22:51.000-0600

Repository: asterisk
Revision: 168716

U   branches/1.4/res/res_features.c

------------------------------------------------------------------------
r168716 | twilson | 2009-01-15 12:22:50 -0600 (Thu, 15 Jan 2009) | 12 lines

Convert call to park_call_full to masq_park_call_announce

Since we removed the AST_PBX_KEEPALIVE return value, we need to use masqueraded
parking, otherwise we will try to call ast_hangup() in __pbx_run() and in
do_parking_thread() and then promptly crash.
(closes issue ASTERISK-13342)
Reported by: waverly360
Tested by: otherwiseguy
(closes issue ASTERISK-13355)
Reported by: kobaz
Tested by: otherwiseguy

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

http://svn.digium.com/view/asterisk?view=rev&revision=168716

By: Digium Subversion (svnbot) 2009-01-16 16:16:23.000-0600

Repository: asterisk
Revision: 168941

_U  trunk/
U   trunk/main/features.c

------------------------------------------------------------------------
r168941 | twilson | 2009-01-16 16:16:21 -0600 (Fri, 16 Jan 2009) | 19 lines

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

........
 r168716 | twilson | 2009-01-15 12:22:49 -0600 (Thu, 15 Jan 2009) | 12 lines
 
 Convert call to park_call_full to masq_park_call_announce
 
 Since we removed the AST_PBX_KEEPALIVE return value, we need to use masqueraded
 parking, otherwise we will try to call ast_hangup() in __pbx_run() and in
 do_parking_thread() and then promptly crash.
 (closes issue ASTERISK-13342)
  Reported by: waverly360
  Tested by: otherwiseguy
 (closes issue ASTERISK-13355)
  Reported by: kobaz
  Tested by: otherwiseguy
........

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

http://svn.digium.com/view/asterisk?view=rev&revision=168941

By: Digium Subversion (svnbot) 2009-01-16 16:52:02.000-0600

Repository: asterisk
Revision: 168980

_U  branches/1.6.0/
U   branches/1.6.0/main/features.c

------------------------------------------------------------------------
r168980 | twilson | 2009-01-16 16:52:01 -0600 (Fri, 16 Jan 2009) | 26 lines

Merged revisions 168941 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r168941 | twilson | 2009-01-16 16:16:23 -0600 (Fri, 16 Jan 2009) | 19 lines
 
 Merged revisions 168716 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r168716 | twilson | 2009-01-15 12:22:49 -0600 (Thu, 15 Jan 2009) | 12 lines
   
   Convert call to park_call_full to masq_park_call_announce
   
   Since we removed the AST_PBX_KEEPALIVE return value, we need to use masqueraded
   parking, otherwise we will try to call ast_hangup() in __pbx_run() and in
   do_parking_thread() and then promptly crash.
   (closes issue ASTERISK-13342)
    Reported by: waverly360
    Tested by: otherwiseguy
   (closes issue ASTERISK-13355)
    Reported by: kobaz
    Tested by: otherwiseguy
 ........
................

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

http://svn.digium.com/view/asterisk?view=rev&revision=168980

By: Digium Subversion (svnbot) 2009-01-16 16:59:41.000-0600

Repository: asterisk
Revision: 168981

_U  branches/1.6.1/
U   branches/1.6.1/main/features.c

------------------------------------------------------------------------
r168981 | twilson | 2009-01-16 16:59:39 -0600 (Fri, 16 Jan 2009) | 26 lines

Merged revisions 168941 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r168941 | twilson | 2009-01-16 16:16:23 -0600 (Fri, 16 Jan 2009) | 19 lines
 
 Merged revisions 168716 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r168716 | twilson | 2009-01-15 12:22:49 -0600 (Thu, 15 Jan 2009) | 12 lines
   
   Convert call to park_call_full to masq_park_call_announce
   
   Since we removed the AST_PBX_KEEPALIVE return value, we need to use masqueraded
   parking, otherwise we will try to call ast_hangup() in __pbx_run() and in
   do_parking_thread() and then promptly crash.
   (closes issue ASTERISK-13342)
    Reported by: waverly360
    Tested by: otherwiseguy
   (closes issue ASTERISK-13355)
    Reported by: kobaz
    Tested by: otherwiseguy
 ........
................

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

http://svn.digium.com/view/asterisk?view=rev&revision=168981