[Home]

Summary:ASTERISK-17498: Asterisk Creates Core Dump on 'core stop gracefully'
Reporter:Vladimir Mikhelson (vmikhelson)Labels:
Date Opened:2011-03-02 22:51:40.000-0600Date Closed:2015-04-08 22:24:46
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:1.8.3 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) backtrace.2151.txt
( 1) backtrace.txt
( 2) mmlog
( 3) valgrind.txt
( 4) valgrind2.txt
Description:Sometimes when 'amportal restart' is executed in FreePBX Asterisk creates core dump.

Amportal stops Asterisk by 'asterisk -rx "core stop gracefully"'

Backtraces were created per https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace


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

Backtrace.txt and Backtrace2151.txt were composed from 2 dumps created today. The last one is different from the first one as in the last one Asterisk instance had res_timing_pthread.so preloaded in modules.conf in the course of troubleshooting issue ASTERISK-17396.
Comments:By: Vladimir Mikhelson (vmikhelson) 2011-03-02 23:20:55.000-0600

Please let me know if I need to recompile with no optimization.

By: David Woolley (davidw) 2011-03-03 04:29:43.000-0600

It is a memory corruption problem so you will need to run under valgrind and/or look in the logs for illegal operations on locks.

By: Leif Madsen (lmadsen) 2011-03-03 14:08:06.000-0600

Per davidw you need to provide the valgrind output. See the debugging page on the Asterisk wiki for more information on how to provide that information.

By: Vladimir Mikhelson (vmikhelson) 2011-03-04 00:02:35.000-0600

This is the best I could do on my system.

memcheck utilized all available resources and put the system to a complete halt.

I was unable to stop asterisk either by 'core stop gracefully' or 'core stop now.'  I ended up killing the process.  The whole exercise took about 1.5 hours.  This is just to give an idea what I mean by "utilized all resources."

By: Vladimir Mikhelson (vmikhelson) 2011-03-04 00:42:42.000-0600

After I killed memcheck Asterisk restarted, this time faster, and was able to start and stop it gracefully.

Please find another valgrind.txt and mmlog attached.

By: Vladimir Mikhelson (vmikhelson) 2011-11-06 23:27:52.358-0600

The problem is still here as of version 1.8.7.0.  The seg. fault happens intermittently, but if it does hit once it repeats itself multiple times. Often times Asterisk seg. faults 5 - 6 times in a row.

Last lines posted to the log prior to the seg. fault are always similar to the following:

[Nov  6 20:21:34] VERBOSE[19470] app.c:     -- Message check requested for mailbox 481@default/folder INBOX but voicemail not loaded.
[Nov  6 20:21:34] VERBOSE[19470] app.c:     -- Message check requested for mailbox 456@default/folder INBOX but voicemail not loaded.
[Nov  6 20:21:34] VERBOSE[19470] app.c:     -- Message check requested for mailbox 450@default/folder INBOX but voicemail not loaded.
[Nov  6 20:21:34] VERBOSE[19470] app.c:     -- Message count requested for mailbox 443@default but voicemail not loaded.
[Nov  6 20:21:34] VERBOSE[19470] app.c:     -- Message count requested for mailbox 6000@device but voicemail not loaded.
[Nov  6 20:21:34] VERBOSE[19470] app.c:     -- Message count requested for mailbox 6003@device but voicemail not loaded.
[Nov  6 20:21:35] VERBOSE[19493] app.c:     -- Message check requested for mailbox 422@default/folder INBOX but voicemail not loaded.

Please let me know if new valgrind output is needed.

Thank you,
Vladimir


By: Corey Farrell (coreyfarrell) 2015-04-08 20:54:34.703-0500

There have been many fixes to shutdown processes since this ticket was last touched.  Is this still an issue in the latest version of 11 or 13?  If so please attach new valgrind output and let us know which version.

Note Asterisk 1.8 is now receiving security fixes only.  See [Asterisk Versions|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions] for information on support for different versions.

By: Vladimir Mikhelson (vmikhelson) 2015-04-08 22:17:32.160-0500

Corey,

Asterisk has been stable in that respect for quite a while for me.  Probably SWP-3339 Matt referenced in his comment fixed the issue.

Ever since you guys switched to JIRA notifications are coming intermittently.  That was the reason I never knew of Matt's comment and never reported back.

Thank you,
Vladimir