On 12/09/2019 14:00, Eliot Moss wrote:
On 9/12/2019 5:45 AM, Pallavi Shinde wrote:

We ran valgrind on ndmp by inserting the valgrind command within /etc/init.d/ndmpd, the script that starts ndmpd.

valgrind did indeed run on ndmpd and we did get a memory check report, but it didn't keep itself attached to ndmpd. valgrind dumps the memory check log and exits. The exit status is '1'. Don't know how to 'keep valgrind attached' to ndmpd.

Would there be any guidance on how to keep valgrind attached to ndmp?

What do you mean by "keep itself attached"?

 From what you say, it sounds as if ndmpd ran and finished, so naturally
valgrind finished.  Everything went as you asked.

As I explained at some length in my previous email what almost
certainly happened is that ndmpd did what most daemons do, and
forked itself into the background with the original process then
exiting.

Now because valgrind follows fork (but not exec) by default it
would normally still follow the other process so I'm guessing
that it actually re-execed, or execed some other program.

Pallavi is the one debugging ndmpd though so I would hope he
knows more abut how it starts up than we do!

So, to repeat myself, either find a way to stop it forking
like that, or find what it is execing and run that directly, or
try --trace-children=yes to make valgrind follow exec.

Tom

--
Tom Hughes (t...@compton.nu)
http://compton.nu/


_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to