Bug 659380 - RFE: run everything under valgrind
RFE: run everything under valgrind
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
rawhide
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
: Triaged
Depends On:
Blocks: systemd-RFE
  Show dependency treegraph
 
Reported: 2010-12-02 12:01 EST by Dave Malcolm
Modified: 2013-08-08 00:41 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-08 00:41:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Dave Malcolm 2010-12-02 12:01:14 EST
This is probably a crazy idea, but here goes...

Would it be possible to run systemd under valgrind (with --trace-children=yes), so that the entire user-space can be traced? (and PID 1 becomes "valgrind").

Or have an option to run all of a "unit" under valgrind?

It might make for a useful way for Fedora contributors with fast machines to help find bugs in the software they use.

(This would probably need to be combined with packaging suppression files for various packages across the distribution, to minimize the known false positives: though it strikes me that the disks storing the suppression files might not be mounted yet when errors happen...)
Comment 1 Dave Malcolm 2010-12-02 12:03:01 EST
(I suspect this can't work without somehow embedding valgrind into a single binary with minimal dependencies; my recollection of the boot process is hazy)
Comment 2 Lennart Poettering 2011-01-04 18:40:14 EST
Hmm, I don't think there is a real good reason why this should not be possible to do, however this probably needs a bit of work. And you'd probably get completely swamped by false positives... ;-)
Comment 3 Fedora Admin XMLRPC Client 2011-10-20 12:26:08 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 4 Jóhann B. Guðmundsson 2012-02-27 06:14:51 EST
Ping what's the current status on this?
Comment 5 Zbigniew Jędrzejewski-Szmek 2013-06-09 21:42:07 EDT
I'd be inclined to close this (as FIXED RESOLVED).

A solution which serves the requested purpose is provided by gcc 4.8: recompile systemd package with -fsanitize=address -fno-omit-frame-pointer in CFLAGS.

Running systemd itself under valgrind would require emedding valgrind in systemd... Let's not go there. Running individual services under valgrind is possible and easy by adding an override with a .d conf snippet for ExecStart. Running *everything* under valgrind doesn't really make much sense, one usually runs one just one thing under valgrind and deals with the fallout. Also valgrind is memory expensive, so enabling it for *everything* is quite expensive.
Comment 6 Zbigniew Jędrzejewski-Szmek 2013-08-08 00:41:10 EDT
Closing now.

(To expand on my previous comment: those processes do not share memory, so running one under valgrind, and then a second one, gives the same results as running both simultaneously under valgrind. And as soon a bash or python is used during the boot process, false positives overwhelm. So one really wants to run just select things under valgrind, not the whole system.)

Note You need to log in before you can comment on or make changes to this bug.