Summary:ASTERISK-16438: [patch] suggested documentation update to doc/backtrace.txt
Reporter:Kenneth Shumard (kshumard)Labels:
Date Opened:2010-07-26 15:25:02Date Closed:2010-12-09 13:30:48.000-0600
Versions:Frequency of
Environment:Attachments:( 0) doc.backtrace.txt.diff
Description:I encountered the same issue as 0017704, and before I saw that it had already been filed I walked through doc/backtrace.txt to refresh my memory of that process. The attached includes suggested changes to that documentation file, primarily seeking to match up the doc with actual behavior.

One of the biggest changes I saw is that the core file is now just called "core" instead of core.<asterisk pid> and that it apparently gets dumped in pwd instead of /tmp/ -- or is my system strange?

Standard `gdb -v` output was also updated, and there are a few grammar fixes.
Comments:By: David Woolley (davidw) 2010-07-27 03:54:26

The location of the core file is a function of the OS, not Asterisk.  Traditional Unix used core, but the CentOS we use appends the process ID.  Moreover, if you use safe_asterisk, that renames it to include the date (I'm not sure if it would find it if it didn't have the process ID).

By: Leif Madsen (lmadsen) 2010-07-27 12:25:56

-In the event that there are multiple core files present (as in the
-above example), it is important to look at the file timestamps in
-order to determine which one you really intend to look at.
+After Asterisk crashes, a file named "core" will be dumped in the
+present working directory of the Linux shell from which Asterisk
+was started.

Per davidw that line should probably be modified to have a "footer" or reference like [1] placed next to the word "core" to state that the file name is dependent upon OS implementation, and that the use of safe_asterisk will place the core file in /tmp by default (as set by the ${DUMPDROP} variable in safe_asterisk).

The name of the core file will be renamed as well (per davidw):

                      PID=`cat ${ASTPIDFILE}`
                       DATE=`date "+%Y-%m-%dT%H:%M:%S%z"`
                       if test -f /tmp/core.${PID} ; then
                               mv /tmp/core.${PID} ${DUMPDROP}/core.`hostname`-$DATE &
                       elif test -f /tmp/core ; then
                               mv /tmp/core ${DUMPDROP}/core.`hostname`-$DATE &

By: Leif Madsen (lmadsen) 2010-07-27 12:27:17

Assigned to myself so I can watch this.

By: Leif Madsen (lmadsen) 2010-08-31 14:19:32

malcolm: might be a good addition for your new project. Find me offline to discuss.

By: Malcolm Davenport (mdavenport) 2010-12-09 11:27:14.000-0600