<p>George Joseph has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6919">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ast_coredumper: Add gzipping of binaries and display of signal info<br><br>The --tarball-coredump option now creates a gzipped tarball of<br>coredumps processed, their results txt files and copies of<br>/etc/os-release, /usr/sbin/asterisk, /usr/lib(64)/libasterisk* and<br>/usr/lib(64)/asterisk as those files are needed to properly examine<br>the coredump. The file will be named<br>/tmp/asterisk.<timestamp>.coredumps.tar.gz or<br>/tmp/asterisk-<uniqueid>.coredumps.tar.gz if --tarball-uniqueid was<br>specified.<br><br>Added dumps of *_siginfo to the top of the txt files so you can<br>tell what signal was invoked.<br><br>Change-Id: Ib9ee6d83592d4b1bc90cb3419a05376a88d1ded9<br>---<br>M contrib/scripts/ast_coredumper<br>1 file changed, 34 insertions(+), 7 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/19/6919/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/contrib/scripts/ast_coredumper b/contrib/scripts/ast_coredumper<br>index 81e94e9..e5fc44e 100755<br>--- a/contrib/scripts/ast_coredumper<br>+++ b/contrib/scripts/ast_coredumper<br>@@ -63,9 +63,15 @@<br> from the existing coredumps.<br> <br> --tarball-coredumps<br>- Creates a gzipped tarball of all coredumps processed.<br>- The tarball name will be:<br>- /tmp/asterisk.<timestamp>.coredumps.tar.gz<br>+ Creates a gzipped tarball of coredumps processed, their<br>+ results txt files and copies of /etc/os-release,<br>+ /usr/sbin/asterisk, /usr/lib(64)/libasterisk* and<br>+ /usr/lib(64)/asterisk as those files are needed to properly<br>+ examine the coredump. The file will be named<br>+ /tmp/asterisk.<timestamp>.coredumps.tar.gz or<br>+ /tmp/asterisk-<uniqueid>.coredumps.tar.gz if<br>+ --tarball-uniqueid was specified.<br>+ WARNING: This file could 1gb in size!<br> <br> --delete-coredumps-after<br> Deletes all processed coredumps regardless of whether<br>@@ -377,12 +383,25 @@<br> done<br> <br> if $tarball_coredumps ; then<br>- tf=/tmp/asterisk-$df.coredumps.tar<br>- echo "Creating $tf.gz"<br>+ tf=/tmp/asterisk-$df.coredumps.tar.gz<br>+ echo "Creating $tf"<br>+ dest=/tmp/asterisk-$df<br>+ rm -rf $dest 2>/dev/null || :<br>+ libdir=usr/lib<br>+ [ -d /usr/lib64 ] && libdir+=64<br>+ mkdir -p $dest/tmp $dest/$libdir/asterisk $dest/etc $dest/usr/sbin<br> for i in ${!COREDUMPS[@]} ; do<br>- tar -uvf $tf "${COREDUMPS[@]}" 2>/dev/null<br>+ ln -s "${COREDUMPS[@]}" $dest/"${COREDUMPS[@]}"<br>+ cp "${COREDUMPS[@]}"*.txt $dest/tmp/<br> done<br>- gzip $tf<br>+ cp /etc/os-release $dest/etc/<br>+ cp -a /$libdir/libasterisk* $dest/$libdir/<br>+ cp -a /$libdir/asterisk/* $dest/$libdir/asterisk/<br>+ cp -a /usr/sbin/asterisk $dest/usr/sbin<br>+ rm -rf $tf<br>+ tar -chzf $tf --transform="s/^[.]/$df/" -C $dest .<br>+ rm -rf $dest<br>+ echo "Created $tf"<br> fi<br> <br> if $delete_coredumps_after ; then<br>@@ -431,21 +450,29 @@<br> pass<br> print("!@!@!@! thread1.txt !@!@!@!\n")<br> try:<br>+ gdb.execute("p $_siginfo", from_tty)<br>+ gdb.execute("info signal $_siginfo.si_signo")<br> gdb.execute("thread apply 1 bt full", from_tty)<br> except:<br> pass<br> print("!@!@!@! brief.txt !@!@!@!\n")<br> try:<br>+ gdb.execute("p $_siginfo", from_tty)<br>+ gdb.execute("info signal $_siginfo.si_signo")<br> gdb.execute("thread apply all bt", from_tty)<br> except:<br> pass<br> print("!@!@!@! full.txt !@!@!@!\n")<br> try:<br>+ gdb.execute("p $_siginfo", from_tty)<br>+ gdb.execute("info signal $_siginfo.si_signo")<br> gdb.execute("thread apply all bt full", from_tty)<br> except:<br> pass<br> print("!@!@!@! locks.txt !@!@!@!\n")<br> try:<br>+ gdb.execute("p $_siginfo", from_tty)<br>+ gdb.execute("info signal $_siginfo.si_signo")<br> gdb.execute("show_locks", from_tty)<br> except:<br> pass<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6919">change 6919</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/6919"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ib9ee6d83592d4b1bc90cb3419a05376a88d1ded9 </div>
<div style="display:none"> Gerrit-Change-Number: 6919 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>