Bug 659380 - RFE: run everything under valgrind
Summary: RFE: run everything under valgrind
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: systemd-RFE
TreeView+ depends on / blocked
 
Reported: 2010-12-02 17:01 UTC by Dave Malcolm
Modified: 2013-08-08 04:41 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-08-08 04:41:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dave Malcolm 2010-12-02 17:01:14 UTC
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 17:03:01 UTC
(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 23:40:14 UTC
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 16:26:08 UTC
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 11:14:51 UTC
Ping what's the current status on this?

Comment 5 Zbigniew Jędrzejewski-Szmek 2013-06-10 01:42:07 UTC
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 04:41:10 UTC
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.