Bug 191069 - Exiting due to signal not reported in XML output
Summary: Exiting due to signal not reported in XML output
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.4.0
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: Philippe Waroquiers
URL:
Keywords:
: 200544 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-29 20:39 UTC by Elliott Baron
Modified: 2015-12-13 16:55 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Print fatal signal also in xml (3.26 KB, patch)
2015-04-26 19:08 UTC, Matthias Schwarzott
Details
Print fatal signals more often (v2) (7.59 KB, patch)
2015-05-11 19:12 UTC, Matthias Schwarzott
Details
Print fatal signals more often (v3) (11.24 KB, patch)
2015-05-14 19:26 UTC, Matthias Schwarzott
Details
print fatal signal in xml (5.63 KB, patch)
2015-05-17 19:11 UTC, Matthias Schwarzott
Details
Print fatal signal in xml - V2 (7.49 KB, patch)
2015-09-07 17:53 UTC, Matthias Schwarzott
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Elliott Baron 2009-04-29 20:39:01 UTC
Version:           3.4.0 (using KDE 4.2.1)
OS:                Linux
Installed from:    Fedora RPMs

Valgrind reports a program exiting from a signal such as SEGV, FPE, etc. along with a cause. It would be nice if XML output reported these errors also.
Comment 1 Dan Kegel 2009-07-23 00:16:37 UTC
Add exec() to the list of app-terminating events
it'd be nice to handle more nicely in xml.
One of Timur's fork() patches does that.
Comment 2 Timur Iskhodzhanov 2009-07-23 08:12:36 UTC
The patch Dan is talking about is attached here https://bugs.kde.org/show_bug.cgi?id=162848
Comment 3 Timur Iskhodzhanov 2009-07-23 08:16:54 UTC
*** Bug 200544 has been marked as a duplicate of this bug. ***
Comment 4 Matthias Schwarzott 2015-04-26 19:08:38 UTC
Created attachment 92237 [details]
Print fatal signal also in xml

This patch prints fatal (terminating) signals also in xml output.
Comment 5 Matthias Schwarzott 2015-05-11 19:12:13 UTC
Created attachment 92548 [details]
Print fatal signals more often (v2)

Print fatal signal info also in xml output

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.
Comment 6 Matthias Schwarzott 2015-05-14 19:26:21 UTC
Created attachment 92598 [details]
Print fatal signals more often (v3)

Check that is_signal_from_kernel thinks it is not from kernel.
Then compare si_pid against the pid values of all threads. This one also catches tgkill calls from other threads.
Extend test gone.c to have arguments abortchild and abortparent.

TODO: Document the resulting xml.
Comment 7 Matthias Schwarzott 2015-05-17 19:11:30 UTC
Created attachment 92666 [details]
print fatal signal in xml

Add updated patch (based on trunk rev. 15252) that only adds printing the signal callstack to xml.
Comment 8 Matthias Schwarzott 2015-09-07 17:53:16 UTC
Created attachment 94456 [details]
Print fatal signal in xml - V2

The core is changed to write the callstack to xml when a fatal signal happens.
It adds a testcase and also documents the extended xml format.
Comment 9 Matthias Schwarzott 2015-12-01 08:06:13 UTC
can this be commited?
Comment 10 Philippe Waroquiers 2015-12-13 16:55:27 UTC
Committed (slightly modified)  in revision 15747

Thanks for the patch, sorry for the long time taken to look and commit it.