Summary:ASTERISK-18349: Asterisk Crash, with backtrace
Reporter:Robert Ristroph (rgr)Labels:
Date Opened:2011-08-25 22:59:48Date Closed:2011-09-19 14:59:50
Versions: Frequency of
Environment:Ubuntu lucid server - uname -a is "Linux hp-proliant 2.6.32-24-server #43-Ubuntu SMP Thu Sep 16 16:05:42 UTC 2010 x86_64 GNU/Linux" - asterisk is compliled from sourceAttachments:( 0) ast-backtrace.2011-08-25.1.txt
( 1) ast-backtrace.2011-08-26.1.txt
( 2) ast-backtrace.2011-08-31.1.txt
( 3) ast-backtrace.2011-08-31.1.txt
( 4) ast-backtrace.2011-08-31.2.txt
( 5) ast-cli.2011-08-31.3.txt
( 6) ast-full-log.2011-08-31.3.txt
Description:This is a small office PBX system; it has been regularly crashing and requiring a restart of the asterisk daemon.  I have tried various things and the problem has persisted through several versions of asterisk and upgrades.  (In addition to the daemon crashing, it sometimes just freezes in a weird state, such as routing all incoming calls to extension 1's voicemail.)  I recompiled asterisk with DEBUG_THREADS and DONT_OPTIMIZE and got it to give a core, from which I extracted the attached backtrace.  It crashed within a minute or two of being started, after the 3d call joined a conference number.

Edit:  I also found this in /var/log/messages:

Aug 25 22:28:22 hp-proliant kernel: [2762196.025963] asterisk[31710]: segfault at 30 ip 00000000004e5192 sp 00007f0ca1677c50 error 4 in asterisk[400000+205000]
Comments:By: Robert Ristroph (rgr) 2011-08-25 23:00:58.215-0500

This is a backtrace from, happening on the 3d call joining a conference line.

By: Robert Ristroph (rgr) 2011-08-26 16:31:28.838-0500

This is another backtrace from the same system a few hours later.  In this case it happened as a conference call ended and everyone was hanging up.

By: Robert Ristroph (rgr) 2011-08-31 10:55:59.651-0500

I collected another core file and pulled another backtrace.

This one is also associated with conference line activity, although I am not sure exactly what triggered it - possibly multiple people joining at the same time.  On the advice of people from the #asterisk IRC channel I am going to re-work our dialplan to use MeetMe instead of ConfBridge.

That crash produced this in /var/log/messages:

Aug 31 09:43:47 hp-proliant kernel: [3233774.157669] asterisk[22848]: segfault at 30 ip 00000000004e5192 sp 00007f5ed6a98c50 error 4 in asterisk[400000+205000]

and nothing noteworthy in the asterisk logs.

By: Robert Ristroph (rgr) 2011-08-31 15:17:21.233-0500

ast-backtrace.2011-08-31.2.txt is another crash, also conference call related

By: Robert Ristroph (rgr) 2011-08-31 15:19:02.845-0500

ast-cli.2011-08-31.3.txt and ast-full-log.2011-08-31.3.txt are from a conference call related incident that did not fully crash, but some calls in went dead, and then asterisk had to be restarted.

By: Leif Madsen (lmadsen) 2011-09-14 14:45:34.655-0500

Looks like you might be using res_timing_pthread -- you definitely shouldn't be using that module as it has known issues.

For versions prior to Asterisk the only real option is res_timing_dahdi. As of res_timing_timerfd should be fixed to the point that you can use it.

Please change to using res_timing_dahdi instead and report back if you're still getting crashes. If so, provide backtraces.

By: Robert Ristroph (rgr) 2011-09-18 20:41:04.057-0500

Hi Leif,

 I have not had these crashes since I changed from using ConfBridge to using MeetMe.  However, that change made it necessary to re-compile asterisk, and when I did that I made sure dahdi was being used ( it was not before ).

 I have not upgraded my asterisk since then, I wanted to see the results of this change first.  I am satisfied that it is currently stable.


By: Leif Madsen (lmadsen) 2011-09-19 14:59:40.903-0500

Oh yes, sorry I didn't recognize the name for some reason :) I'm going to close this issue for now, but if you switch back to using ConfBridge() with res_timing_dahdi and experience the crash, please do open a new issue. Thanks!