Summary:ASTERISK-18103: asterisk core dump on reload
Reporter:808blogger (808blogger)Labels:
Date Opened:2011-07-08 14:50:47Date Closed:2011-08-01 16:39:25
Versions: Frequency of
Environment:Centos 5.6 23bit 2.6.18-238.12.1.el5xen #1 SMP Tue May 31 14:42:29 EDT 2011 i686 i686 i386 GNU/Linux Attachments:( 0) bt-from-freepbx-forums.txt
( 1) bt-from-freepbx-forums-2.txt
( 2) debug.rtf
( 3) jrose_ohmygoshimsorryibrokeparking.diff
Description:asterisk install by yum from digium repo
Asterisk built by root @ localhost.localdomain on a i686 running Linux on 2011-07-01 16:55:02 UTC

freepbx (i know this is not freepbx support but this is how i get this crash to repeat) Thanks guys. I hope this is a good bug report and not wasting time.

make changes in interface, click apply changes this occurs:
*** glibc detected *** /usr/sbin/asterisk: free(): invalid pointer: 0xb7e3b6d8 ***
======= Backtrace: =========
======= Memory map: ========
00110000-00122000 r-xp 00000000 ca:00 17533      /usr/lib/libz.so.1.2.3
00122000-00123000 rw-p 00011000 ca:00 17533      /usr/lib/libz.so.1.2.3
00123000-0014a000 r-xp 00000000 ca:00 34046      /lib/i686/nosegneg/libm-2.5.so
0014a000-0014b000 r--p 00026000 ca:00 34046      /lib/i686/nosegneg/libm-2.5.so
0014b000-0014c000 rw-p 00027000 ca:00 34046      /lib/i686/nosegneg/libm-2.5.so
0014c000-0014f000 r-xp 00000000 ca:00 34045      /lib/libdl-2.5.so
0014f000-00150000 r--p 00002000 ca:00 34045      /lib/libdl-2.5.so
00150000-00151000 rw-p 00003000 ca:00 34045      /lib/libdl-2.5.so
00151000-00167000 r-xp 00000000 ca:00 34049      /lib/i686/nosegneg/libpthread-2.5.so
00167000-00168000 r--p 00015000 ca:00 34049      /lib/i686/nosegneg/libpthread-2.5.so
00168000-00169000 rw-p 00016000 ca:00 34049      /lib/i686/nosegneg/libpthread-2.5.so
00169000-0016b000 rw-p 00169000 00:00 0
0016b000-00181000 r-xp 00000000 ca:00 34056      /lib/libselinux.so.1
00181000-00183000 rw-p 00015000 ca:00 34056      /lib/libselinux.so.1
00183000-001be000 r-xp 00000000 ca:00 34055      /lib/libsepol.so.1
001be000-001bf000 rw-p 0003b000 ca:00 34055      /lib/libsepol.so.1
001bf000-001c9000 rw-p 001bf000 00:00 0
001c9000-001d9000 r-xp 00000000 ca:00 70116      /usr/lib/asterisk/modules/res_agi.so
001d9000-001dd000 rw-p 0000f000 ca:00 70116      /usr/lib/asterisk/modules/res_agi.so
001dd000-001df000 r-xp 00000000 ca:00 70127      /usr/lib/asterisk/modules/res_speech.so
001df000-001e0000 rw-p 00001000 ca:00 70127      /usr/lib/asterisk/modules/res_speech.so
001e0000-001ff000 r-xp 00000000 ca:00 70115      /usr/lib/asterisk/modules/res_ael_share.so
001ff000-00200000 rw-p 0001f000 ca:00 70115      /usr/lib/asterisk/modules/res_ael_share.so
00200000-00201000 rw-p 00200000 00:00 0
00201000-0020b000 r-xp 00000000 ca:00 70123      /usr/lib/asterisk/modules/res_musiconhold.so
0020b000-0020c000 rw-p 00009000 ca:00 70123      /usr/lib/asterisk/modules/res_musiconhold.so
0020c000-0020e000 r-xp 00000000 ca:00 69986      /usr/lib/asterisk/modules/app_exec.so
0020e000-0020f000 rw-p 00001000 ca:00 69986      /usr/lib/asterisk/modules/app_exec.so
0020f000-0022b000 r-xp 00000000 ca:00 70219      /usr/
Disconnected from Asterisk server
Executing last minute cleanups
/usr/sbin/safe_asterisk: line 145:  9524 Aborted                 (core dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS}
Asterisk ended with exit status 134
Asterisk exited on signal 6.
Comments:By: 808blogger (808blogger) 2011-07-08 16:58:00.044-0500

if i install asterisk 1.4 (yum -y install asterisk asterisk-configs asterisk-voicemail asterisk-addons-mysql)
this does not occur

If i install asterisk 1.8 (yum -y install asterisk18 asterisk18-configs asterisk18-voicemail asterisk18-addons-mysql)
this issue does not occur

only when i install asterisk 1.6 (yum -y install asterisk16 asterisk16-configs asterisk16-voicemail asterisk16-addons-mysql)
Issue occurs.

By: 808blogger (808blogger) 2011-07-08 21:00:32.031-0500

I compiled from source and the issue does not occur. It *appears* to be only the provided binary.

By: Byron Smith (byronsmith) 2011-07-11 08:57:10.504-0500

I was able to reproduce this issue on compiled from source.

The process would core dump after a few reloads so not every time.

Please let me know if there is anything I can provide to help with the investigation.

FYI, I'm not running FreePBX, this is plan old Asterisk and I would issue multiple reloads from the CLI for this dump to occur.

By: Leif Madsen (lmadsen) 2011-07-11 15:06:21.415-0500

Per the Asterisk maintenance timeline page at http://www.asterisk.org/asterisk-versions maintenance (bug) support for the 1.4 and 1.6.x branches has ended. For continued maintenance support please move to the 1.8 branch which is a long term support (LTS) branch. For more information about branch support, please see https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions

By: Leif Madsen (lmadsen) 2011-07-11 15:06:37.966-0500

Closing based on feedback that this does not happen with Asterisk 1.8.

By: Vladimir Mikhelson (vmikhelson) 2011-07-18 10:17:29.518-0500


Similar if not the same behavior still observed as of with FreePBX.

See https://issues.asterisk.org/jira/browse/ASTERISK-17498


By: Mikael Carlsson (mickecarlsson) 2011-07-18 12:54:26.536-0500

This is a bt from a user at FreePBX forums running into the issue.

By: Mikael Carlsson (mickecarlsson) 2011-07-18 13:00:19.814-0500

This is from another user, same issue, same core

By: Mikael Carlsson (mickecarlsson) 2011-07-19 03:21:42.506-0500

As per advice to one of the users to install and test it I can now confirm that work as it should. So this is clearly a regression between and This ticket should be reopened.

By: leearcher (leearcher) 2011-07-20 06:00:53.375-0500

I agree, this ticket needs to be reopened as I have had this with

By: Malcolm Davenport (mdavenport) 2011-07-20 10:57:01.474-0500

Re-opening per statement here:

Segfault can be produced with stock, compiled from source, using stock configuration files, built from 'make samples,' simply by typing "reload" from the Asterisk CLI.

attached debug.rtf with backtrace.

By: Kinnith Wallace (kwallace) 2011-07-22 11:49:28.911-0500

It appears that the issue Summary should be, "asterisk core dump on reload".  (Remove "{{from freeepbx}}", based on preceding comment by [~mdavenport].)

[~808blogger] (or someone else who notices and has permissions to do so), could you edit it?

By: 808blogger (808blogger) 2011-07-22 12:21:39.076-0500


Noted and changed

By: Michael Keuter (mkeuter) 2011-07-31 07:07:35.294-0500

I see the same issue with on AstLinux (crosscompiled with buildroot) on a Soekris 5501 after exactly 2 reloads:

First reload:
Jul 31 14:00:53 pbx5501 local0.notice asterisk[26090]: NOTICE[26723]: app_queue.c:5673 in reload_queue_rules: queuerules.conf has not changed since it was last loaded. Not taking any action.

Second reload:
Jul 31 14:01:07 pbx5501 user.info kernel: asterisk[25975]: segfault at 6b726174 ip 080cb319 sp bc9fd5a0 error 4 in asterisk[8048000+13f000]
Jul 31 14:01:08 pbx5501 user.info safe_asterisk: Asterisk exited on signal 99.

By: Jason Parker (jparker) 2011-08-01 12:22:10.538-0500

For whoever picks this up:

I ran through some revisions to test, and I believe r313047 is causing this.

Edit: and when I say "I believe", I actually mean "am 100% certain".

By: Jonathan Rose (jrose) 2011-08-01 15:56:08.649-0500

Patch that should probably fix the bug and I don't think will break anything else in the process.

By: Jonathan Rose (jrose) 2011-08-01 15:57:29.959-0500

Alrighty, sorry for breaking parking in 1.6.2.  I've posted a patch which should hopefully fix the issue if any of you would be so kind as to test it for me.  It worked on my box.

Also, here is a link to the review board page for anyone who wants to review the patch: