[Home]

Summary:ASTERISK-15605: [patch] ParkAndAnnounce Core dumps asterisk
Reporter:Ahmad S. Darweesh (asd1815)Labels:
Date Opened:2010-02-10 16:32:54.000-0600Date Closed:2010-03-08 14:05:11.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Applications/app_parkandannounce
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) already-merged.patch
( 1) cli.txt
( 2) gdb.txt
( 3) gdb-2.txt
Description:I am running Asterisk 1.6.0.21 on FreeBSD AMD 64 running inside a VM. The VM does not have a sound card.

I have a simple extension

exten => 777,1,ParkAndAnnounce(pbx-transfer:PARKED,45,console/dsp)
exten => 777,n,Hangup

when I dial 777 asterisk crashes with this message

Accepting AUTHENTICATED call from IP:
      > requested format = gsm,
      > requested prefs = (),
      > actual format = ulaw,
      > host prefs = (ulaw|gsm),
      > priority = mine
Segmentation fault (core dumped)
Comments:By: Leif Madsen (lmadsen) 2010-02-11 11:04:21.000-0600

There is absolutely not enough information to do anything useful here.

Please provide the following:

* console output prior to the crash with debug level logging enabled from logger.conf
* core set verbose 10
* core set debug 10
* provide a backtrace per the instructions in doc/backtrace.txt of your Asterisk source

By: Ahmad S. Darweesh (asd1815) 2010-02-11 12:03:29.000-0600

I will attach the requested documents.
1) I created
$cat /etc/asterisk.makeopts
COMPILER_FLAGS=DONT_OPTIMIZE

2) I rebuilt asterisk
3) I enabled logging and debug in logger.conf
4) I ran asterisk -g -d -v -c
5) I called extn 777 and it core dumps again


Side note, It seems it has nothing to do with console/dsp
I also tried:

exten => 777,1,ParkAndAnnounce(pbx-transfer:PARKED,45,Local/s@fasthangup)
exten => 777,n,Hangup

[fasthangup]
exten => s,1,Answer
exten => s,2,Hangup

By: Ahmad S. Darweesh (asd1815) 2010-02-11 12:07:08.000-0600

I tested this on 1.4.26.2_1 and it works fine. It seems it is a 1.6 issue

By: Colin Cuthbertson (colinc) 2010-02-15 14:41:29.000-0600

I had this problem on Asterisk 1.6.2.1. We got a segmentation fault every time we used the ParkAndAnnounce() application.

I tracked this down to the masq_park_call function of features.c and in particular the following piece of code;

       /*
       if (!play_announcement && args == &park_args) {
               args->orig_chan_name = ast_strdupa(peer->name);
       }
       */

It seems to be the evaluation of the if statement that is causing the segfault.

So I commented this out and re-compiled and all works fine.

This system is in the UK using chan_dahdi and E1 lines.

[I have another system running 1.6.2.0 that doesn't have this problem. I have only tested this with IAX Trunks]

By: snuffy (snuffy) 2010-02-25 17:06:23.000-0600

Your backtrace does not look like you enabled the 'dont optimize' flag in the menuselect compile options menu.

By: Ahmad S. Darweesh (asd1815) 2010-02-27 20:24:32.000-0600

I cannot access the menu direct using ports so what I did was:
adding COMPILER_FLAGS=DONT_OPTIMIZE to /etc/asterisk.makeopts

I looked at the log when I rebuilt that port it seems that menu select looked at /etc/asterisk.makeopts

gmake[1]: Leaving directory `/usr/ports/net/asterisk16/work/asterisk-1.6.0.21/menuselect
Generating input for menuselect ...
menuselect/menuselect --check-deps menuselect.makeopts
menuselect/menuselect --check-deps menuselect.makeopts /etc/asterisk.makeopts
Generating embedded module rules ...

I will figure out a way to access menuselect directly and reupload the bt

By: Ahmad S. Darweesh (asd1815) 2010-02-27 20:49:39.000-0600

I added MENUSELECT_CFLAGS now

cat /etc/asterisk.makeopts
MENUSELECT_CFLAGS=DONT_OPTIMIZE
COMPILER_FLAGS=DONT_OPTIMIZE

and I manually edited makeopts in work direct after running make configure
I added the following and commented out some stuff

# CONFIG_CFLAGS=-O2 -pipe -fno-strict-aliasing
CFLAGS=DONT_OPTIMIZE
COMPILER_FLAGS=DONT_OPTIMIZE
CONFIG_LDFLAGS=-L/usr/local/lib


I am uploading new gdb bt. I hope this one works

By: Jeff Peeler (jpeeler) 2010-03-04 17:23:21.000-0600

If the code location pointed out by colinc is the source of the crash, I believe this was solved in 238835 and will be in the next set of releases. It would be great if you could test a checkout from the branch and confirm.

By: nicolasg (nicolasg) 2010-03-08 09:46:22.000-0600

Same crash happens on Asterisk 1.4.29.1. Commenting the block pointed by colinc fixes the issue.

By: Jeff Peeler (jpeeler) 2010-03-08 10:53:33.000-0600

How about if you either test the latest 1.4.30 rc or the attached patch?

By: Ahmad S. Darweesh (asd1815) 2010-03-08 11:44:48.000-0600

The report I submitted was for 1.6.0 branch but the patch you provided was for 1.4 branch. Anyhow, I manually edited main/features.c to reflect your changes.

I tested the previous reproducible core dump and now the problem is solved.

Thanks! Everything is working smoothly now.

By: Leif Madsen (lmadsen) 2010-03-08 11:51:59.000-0600

Actually, this looks like jpeeler is asking someone to test the latest release candidates or from the branches directly to determine if the merges he's already put in have resolved the issue.

The patch submitted here looks like it didn't need to be applied, but rather could have been obtained with a later version of Asterisk.

Regardless, I think I will close this issue soon (if jpeeler doesn't) as the feedback here seems to indicate this is now resolved.

By: nicolasg (nicolasg) 2010-03-08 13:40:00.000-0600

In Asterisk 1.4 is resolved since this release:

http://svnview.digium.com/svn/asterisk/branches/1.4/res/res_features.c?revision=238834&pathrev=238835

By: Leif Madsen (lmadsen) 2010-03-08 14:05:10.000-0600

I'm closing this issue as already resolved by a merge to the 1.4 branch.