|
From: Matthias S. <zz...@ge...> - 2015-04-12 18:54:01
|
Hi there!
When executing valgrind automatically on a server, I sometimes wonder if
a process did finish successfully or did call abort (or was killed in
some other way).
when running valgrind with option "-v" it prints this:
==10481== Process terminating with default action of signal 6 (SIGABRT)
==10481== at 0x5085137: kill (syscall-template.S:81)
==10481== by 0x40081B: main (gone.c:26)
But "-v" is too verbose for normal runs :)
So I suggest to always write this and additionally to also do it for xml
output.
I did some experiments. What do you think about something like this in
the xml file:
<fatal_signal>
<tid>1</tid>
<signo>6</signo>
<signame>SIGABRT</signame>
<stack>
<frame>
<ip>0x5084137</ip>
<obj>/lib64/libc-2.20.so</obj>
<fn>kill</fn>
<dir>/var/tmp/portage/sys-libs/glibc-2.20-r2/work/glibc-2.20/signal/../sysdeps/unix</dir>
<file>syscall-template.S</file>
<line>81</line>
</frame>
<frame>
<ip>0x40081B</ip>
<obj>/home/matze/development/valgrind.git/gdbserver_tests/gone</obj>
<fn>main</fn>
<dir>/home/matze/development/valgrind.git/gdbserver_tests</dir>
<file>gone.c</file>
<line>26</line>
</frame>
</stack>
</fatal_signal>
Regards
Matthias
|
|
From: Matthias S. <zz...@ge...> - 2015-04-26 19:12:23
|
On 12.04.2015 20:53, Matthias Schwarzott wrote: > Hi there! > > When executing valgrind automatically on a server, I sometimes wonder if > a process did finish successfully or did call abort (or was killed in > some other way). > I modified valgrind to always print the info about a terminating signal to the xml output. Patch is attached here: https://bugs.kde.org/show_bug.cgi?id=191069 About always printing the signal to normal stderr: Maybe there should be a cmdline option to enable this. Regards Matthias |
|
From: Matthias S. <zz...@ge...> - 2015-05-02 11:43:52
|
On 26.04.2015 21:12, Matthias Schwarzott wrote: > On 12.04.2015 20:53, Matthias Schwarzott wrote: >> Hi there! >> >> When executing valgrind automatically on a server, I sometimes wonder if >> a process did finish successfully or did call abort (or was killed in >> some other way). >> > > I modified valgrind to always print the info about a terminating signal > to the xml output. > > Patch is attached here: > https://bugs.kde.org/show_bug.cgi?id=191069 > > About always printing the signal to normal stderr: Maybe there should be > a cmdline option to enable this. > Hi, I suggest this behaviour: For xml and text output should always report callstack of fatal signal. Maybe xml output could also contain the exitcode in case of a normal exit. Currently a callstack is shown if the signal is from kernel and only for text output. But I think a SIGABRT should be reported always, but it does not count as kernel-generated. It might be caused by a call to abort or assert(false) and that is interesting for me. Regards Matthias |
|
From: Matthias S. <zz...@ge...> - 2015-05-11 19:15:14
|
Hi! I updated the patch to now behave like this. The callstack is printed for: * xml output * verbose output * if signal is from kernel and the signal can trigger a coredump * if signal is from the thread itself (calling raise) This will support debugging by making calls to abort visible in valgrind output. https://bugs.kde.org/show_bug.cgi?id=191069 The patch: https://bugsfiles.kde.org/attachment.cgi?id=92548 Regards Matthias |