|
From: Avery F. <av...@po...> - 2005-05-05 22:11:35
|
Hi, I'm trying to use valgrind 2.4.0 on Debian to fix some memory problems. When I run my program, everything appears ok, but when the program exits nothing happens. Nothing is printed and in the case of massif, no files are generated. I know that valgrind works on other programs (I tried ls at least). The following is all I ever get: ==11136== Massif, a space profiler for x86-linux. ==11136== Copyright (C) 2003, Nicholas Nethercote ==11136== Using valgrind-2.4.0, a program supervision framework for x86-linux. ==11136== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al. ==11136== For more details, rerun with: -v ==11136== And then nothing. Any idea what could be causing this? I'm running valgrind on a daemon, so I'm guessing it might have to do with the way it's exiting. Can I just run kill on the pid? I'm not subscribe so please CC any replies. Thanks, Avery |
|
From: Nicholas N. <nj...@cs...> - 2005-05-06 13:00:09
|
On Thu, 5 May 2005, Avery Fay wrote: > I'm trying to use valgrind 2.4.0 on Debian to fix some memory problems. > When I run my program, everything appears ok, but when the program exits > nothing happens. Nothing is printed and in the case of massif, no files > are generated. I know that valgrind works on other programs (I tried ls > at least). The following is all I ever get: > > ==11136== Massif, a space profiler for x86-linux. > ==11136== Copyright (C) 2003, Nicholas Nethercote > ==11136== Using valgrind-2.4.0, a program supervision framework for > x86-linux. > ==11136== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et > al. > ==11136== For more details, rerun with: -v > ==11136== > > And then nothing. Any idea what could be causing this? I'm running > valgrind on a daemon, so I'm guessing it might have to do with the way > it's exiting. Can I just run kill on the pid? That output looks like the program has not yet exited, or Valgrind didn't detect that it exited. Has the program definitely exited? Is Valgrind still running? I know people have used Valgrind on daemons before, so I'm not aware of any issues there. Is the program spawning any children -- does it make any difference if you run with --trace-children=yes ? N |
|
From: Avery F. <av...@po...> - 2005-05-06 16:06:43
|
On Fri, 2005-05-06 at 08:00 -0500, Nicholas Nethercote wrote: > > That output looks like the program has not yet exited, or Valgrind didn't > detect that it exited. Has the program definitely exited? Is Valgrind > still running? > > I know people have used Valgrind on daemons before, so I'm not aware of > any issues there. Is the program spawning any children -- does it make > any difference if you run with --trace-children=yes ? > > N It turns out the program was forking (I didn't think it was at first because it is largely threaded). valgrind was only watching the original process and not the one doing all the work. I've changed it around and gotten valgrind working now. Thanks, Avery |