I'm running valgrind memcheck on a program that spawns thousands of other threads.
The other threads do not generate errors, and I don't care what happens to them.
However, Valgrind insists on opening a named pipe in /tmp every time a new thread spawns. Not only is this wasteful, it actually breaks valgrind. Sometimes valgrind doesn't clean up after itself, and then future children with the same pid (active at a later time) fail to spawn because valgrind can't make a pipe with the right name (it already exists).
How can I prevent Valgrind from making all these pipes!?!
EDIT: Flags I have already tried:
--child-silent-after-fork=yes
and things I have already ruled out:
--track-children=no (default value is no).
Overview. DRD is a Valgrind tool for detecting errors in multithreaded C and C++ programs. The tool works for any program that uses the POSIX threading primitives or that uses threading concepts built on top of the POSIX threading primitives.
Valgrind doesn't schedule the threads itself. It merely ensures that only one thread runs at once, using a simple locking scheme.
The GNU Debugger (GDB) allows you to pause a running program and inspect its state. Valgrind's memcheck monitors a program's memory accesses and prints warnings if the program accesses invalid locations or attempts to read values that the program never set (initialized).
Preparation. To be most effective valgrind requires that debugging information be present in the binaries that are being instrumented, although a full debug build is not required.
Sorry to answer my own question. Just for documentation purposes.
Running with the flag:
--vgdb=no
This is not properly documented in the man pages, since it doesn't tell you that it's going to spew pipes everywhere without the flag, but that's why it does it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With