[Home]

Summary:ASTERISK-03570: Dial with g option causes asterisk to crash after # transfer
Reporter:tobjon (tobjon)Labels:
Date Opened:2005-02-23 07:59:02.000-0600Date Closed:2008-01-15 15:26:18.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_dial
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) mydiff.txt
Description:# transfer to parking extension will make asterisk crash if Dial was started with g (go-on) option.

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

After parking asterisk will go on in the dial extension as if call had ended and then crash.

Feb 23 14:28:15 VERBOSE[327700]:     -- Stopped music on hold on Zap/1-1
Feb 23 14:28:15 VERBOSE[327700]:     -- Started music on hold, class 'default', on Zap/1-1
Feb 23 14:28:15 VERBOSE[327700]:   == Parked Zap/1-1 on 901. Will timeout back to extern-isdn,046370215,6 in 180 seconds
Feb 23 14:28:15 VERBOSE[327700]:     -- Playing 'digits/9' (language 'se')
Feb 23 14:28:16 VERBOSE[327700]:     -- Playing 'digits/0' (language 'se')
Feb 23 14:28:16 VERBOSE[327700]:     -- Playing 'digits/1' (language 'se')
Feb 23 14:28:17 VERBOSE[327700]:     -- Stopped music on hold on Zap/1-1
Feb 23 14:28:17 VERBOSE[327700]:     -- Started music on hold, class 'default', on Zap/1-1
Feb 23 14:28:17 VERBOSE[327700]:     -- Added extension '901' priority 1 to parkedcalls
Feb 23 14:28:17 VERBOSE[327700]:     -- Hungup 'Zap/4-1'
Feb 23 14:28:17 DEBUG[327700]: Exiting with DIALSTATUS=ANSWER.
Feb 23 14:28:17 DEBUG[327700]: Expression is '0'
Feb 23 14:28:17 VERBOSE[327700]:     -- Executing ESC[1;36;40mGotoIfESC[0;37;40m
("ESC[1;35;40mZap/1-1ESC[0;37;40m", "ESC[1;35;40m0?110:8ESC[0;37;40m") in new stack
Feb 23 14:28:17 VERBOSE[327700]:     -- Goto (extern-isdn,046370215,8)
Feb 23 14:28:17 DEBUG[327700]: Expression is '1'
Feb 23 14:28:17 VERBOSE[327700]:     -- Executing ESC[1;36;40mGotoIfESC[0;37;40m
("ESC[1;35;40mZap/1-1ESC[0;37;40m", "ESC[1;35;40m1?112:9ESC[0;37;40m") in new stack
Feb 23 14:28:17 VERBOSE[327700]:     -- Goto (extern-isdn,046370215,112)

Comments:By: Andrey S Pankov (casper) 2005-02-23 09:51:33.000-0600

Can you attach gdb backtrace as per Bug Posting Guidelines?

By: tobjon (tobjon) 2005-02-23 10:43:35.000-0600

The bug is that it goes on after parking, not that it crashes. ;)

The crash is not relevant since I have not tested if the crash occurs in later versions, but since you asked for it there is a backtrace from 1.0.2-BRIstuffed-0.2.0-RC2b below.

Core was generated by `asterisk -vvvg -c'.
Program terminated with signal 11, Segmentation fault.
...
#0  sched_context_destroy (con=0x907caa8) at sched.c:89
89                      s = s->next;
(gdb) bt
#0  sched_context_destroy (con=0x907caa8) at sched.c:89
#1  0x0805a50d in ast_hangup (chan=0x90aeb10) at channel.c:748
#2  0x00940ff6 in do_parking_thread (ignore=0x0) at res_features.c:728
#3  0x00b73cce in pthread_start_thread () from /lib/i686/libpthread.so.0
#4  0x001ccb3a in clone () from /lib/i686/libc.so.6

edited on: 02-23-05 10:54

By: twisted (twisted) 2005-02-23 10:56:04.000-0600

tobjon, please re-read the bug posting guidelines.  If this is from a non-standard version of asterisk, please confirm the bug exists in the version that you posted when you made your report.  Failure to comply with this will result in your bug being closed.

edited on: 02-23-05 10:56

By: tobjon (tobjon) 2005-02-23 11:22:13.000-0600

You can try it out by adding a g to your dial options and make a # transfer to parking extension. I cannot find any changes to the code in this part. As I said the bug reported is not the crash since I do not run a "standard version" but the misbehavour in Dial with option g.

By: twisted (twisted) 2005-02-23 12:28:12.000-0600

Okay then, which version of asterisk should I use?  1.0.2 or 1.0.5?  See the problem here?  You reported a bug on stable 1.0.5, and you're not even running that version.   Please try this on a non-patched asterisk, latest version.

By: tobjon (tobjon) 2005-02-23 15:38:48.000-0600

Okay, I will try 1.0.5 again and give you better information. Sorry about the confusion, this is the first bug I come across that wasn't already in mantis :)

By: tobjon (tobjon) 2005-02-24 09:25:26.000-0600

Now on 1.0.5.

   -- Executing Macro("SIP/drglu2-93db", "internanrop|SIP/tobias") in new stack
   -- Executing SetVar("SIP/drglu2-93db", "TRANSFER_CONTEXT=internankn-transfer") in new stack
   -- Executing Dial("SIP/drglu2-93db", "SIP/tobias||tTg") in new stack
   -- Called tobias
   -- SIP/tobias-52b0 is ringing
   -- SIP/tobias-52b0 answered SIP/drglu2-93db
   -- Attempting native bridge of SIP/drglu2-93db and SIP/tobias-52b0

(Here I press # 9 on SIP/tobias to transfer SIP/drglu2 to parking extension.)

   -- Started music on hold, class 'default', on SIP/drglu2-93db
   -- Stopped music on hold on SIP/drglu2-93db
   -- Started music on hold, class 'default', on SIP/drglu2-93db
 == Parked SIP/drglu2-93db on 901. Will timeout back to internankn-extall,6110,1 in 180 seconds
   -- Playing 'digits/9' (language 'se')
   -- Playing 'digits/0' (language 'se')
   -- Playing 'digits/1' (language 'se')
   -- Executing NoOp("SIP/drglu2-93db", "Internanrop ankn 6110 dialstatus=ANSWER") in new stack
   -- Executing GotoIf("SIP/drglu2-93db", "0?6:5") in new stack
   -- Goto (macro-internanrop,s,5)
   -- Executing Congestion("SIP/drglu2-93db", "") in new stack
   -- Stopped music on hold on SIP/drglu2-93db
Feb 24 16:17:31 WARNING[3219]: channel.c:1636 ast_write: Thread -157373520 Blocking 'SIP/drglu2-93db', already blocked by thread -157373520 in procedure ast_waitfor_nandfds

(Now it indicates congestion to SIP/drglu2, which of course is wrong since that channel really is parked. Here the error should be; the extension traversing should stop although the g option has been given to Dial command.)

(I will now hangup SIP/drglu2.)

 == SIP/drglu2-93db got tired of being parked
Feb 24 16:17:41 WARNING[3219]: channel.c:642 ast_channel_free: PBX may not have been terminated properly on 'SIP/drglu2-93db'
Ouch ... error while writing audio data: : Broken pipe
Segmenteringsfel (core dumped)

This segmentation fault is nothing strange since the channel is both on hold and indicating congestion on the same time, but since you asked for it earlier here is a backtrace.

#0  ast_cdr_update (c=0x86ef8a0) at cdr.c:426
426                     if(!ast_cdr_has_flag(cdr,AST_CDR_FLAG_LOCKED)) {
(gdb) bt
#0  ast_cdr_update (c=0x86ef8a0) at cdr.c:426
#1  0x08076fa2 in ast_pbx_run (c=0x86ef8a0) at pbx.c:1854
#2  0x0807d4e1 in pbx_thread (data=0x86dd6f8) at pbx.c:1985
#3  0x0076e98c in start_thread () from /lib/tls/libpthread.so.0
#4  0x006c97da in clone () from /lib/tls/libc.so.6

By: Mark Spencer (markster) 2005-02-25 22:04:20.000-0600

Fixed in CVS head.

By: Russell Bryant (russell) 2005-02-26 19:43:12.000-0600

fixed in 1.0 - will be in 1.0.6

By: Digium Subversion (svnbot) 2008-01-15 15:26:09.000-0600

Repository: asterisk
Revision: 5083

U   trunk/apps/app_dial.c
U   trunk/pbx.c

------------------------------------------------------------------------
r5083 | markster | 2008-01-15 15:26:09 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix SetVar (bug ASTERISK-3588) and g + transfer (ASTERISK-3570)

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

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

By: Digium Subversion (svnbot) 2008-01-15 15:26:18.000-0600

Repository: asterisk
Revision: 5094

U   branches/v1-0/CHANGES
U   branches/v1-0/apps/app_dial.c

------------------------------------------------------------------------
r5094 | russell | 2008-01-15 15:26:18 -0600 (Tue, 15 Jan 2008) | 2 lines

fix seg fault with combination of 'g' and # transfer (bug ASTERISK-3570)

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

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