Red Hat Bugzilla – Bug 659380
RFE: run everything under valgrind
Last modified: 2013-08-08 00:41:10 EDT
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...)
(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)
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... ;-)
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
Ping what's the current status on this?
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.
(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.)