|
From: Anlin Z. <zh_...@ho...> - 2009-03-05 19:05:43
|
Hi, We run valgrind in back ground like this: nohup valgrind --log-file=/opt/log/MyApp.val.log --error-limit=no -v /opt/bin/MyApp & The MyApp is a server handling client requests through TCP. But it sometimes crash (randomly) so we want to use valgrind to debug. But after some time the log file size stops increasing. MyApp is still running as it is still responding to the client programs' request. We haven't re-produced the crash with valgrind so far. I'm wondering if it's normal or something wrong with our setup. Thanks, Alex. _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx |
|
From: Nicholas N. <n.n...@gm...> - 2009-03-05 21:25:50
|
On Fri, Mar 6, 2009 at 6:05 AM, Anlin Zhang <zh_...@ho...> wrote: > Hi, > > We run valgrind in back ground like this: > > nohup valgrind --log-file=/opt/log/MyApp.val.log --error-limit=no -v > /opt/bin/MyApp & > > The MyApp is a server handling client requests through TCP. But it sometimes > crash (randomly) so we want to use valgrind to debug. > > But after some time the log file size stops increasing. MyApp is still > running as it is still responding to the client programs' request. We > haven't re-produced the crash with valgrind so far. > > I'm wondering if it's normal or something wrong with our setup. It's hard to know what could be wrong with this limited information. But if MyApp is still running then Valgrind must also still be running. And you're using --error-limit=no. It could just be that Valgrind isn't finding anything more worth complaining about. It might be worth addressing any Valgrind complaints that are present in the log file. Nick |
|
From: Anlin Z. <zh_...@ho...> - 2009-03-05 22:07:17
|
Hi Nick, You are right, probably there is no more error happening. The thing is, Valgrind tend to log the summary just before it exit. If the process is killed (this is what our test engineers did because there is no console for it anymore), then the summary is not writen to the log file. In order to get the summary, we have to bring the process to the foreground with the same console, and do Ctrl-C. Maybe there is a way to bring a process started with another console to the front of a new console, but I don't know the way yet. Thanks, Anlin. > Date: Fri, 6 Mar 2009 08:25:39 +1100 > Subject: Re: [Valgrind-users] Valgrind stops printing logs into log file > From: n.n...@gm... > To: zh_...@ho... > CC: val...@li... > > On Fri, Mar 6, 2009 at 6:05 AM, Anlin Zhang <zh_...@ho...> wrote: > > Hi, > > > > We run valgrind in back ground like this: > > > > nohup valgrind --log-file=/opt/log/MyApp.val.log --error-limit=no -v > > /opt/bin/MyApp & > > > > The MyApp is a server handling client requests through TCP. But it sometimes > > crash (randomly) so we want to use valgrind to debug. > > > > But after some time the log file size stops increasing. MyApp is still > > running as it is still responding to the client programs' request. We > > haven't re-produced the crash with valgrind so far. > > > > I'm wondering if it's normal or something wrong with our setup. > > It's hard to know what could be wrong with this limited information. > But if MyApp is still running then Valgrind must also still be > running. And you're using --error-limit=no. It could just be that > Valgrind isn't finding anything more worth complaining about. > > It might be worth addressing any Valgrind complaints that are present > in the log file. > > Nick _________________________________________________________________ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx |
|
From: Tom H. <to...@co...> - 2009-03-05 22:55:09
|
Anlin Zhang wrote: > The thing is, Valgrind tend to log the summary just before it exit. If > the process is killed (this is what our test engineers did because there > is no console for it anymore), then the summary is not writen to the log > file. In order to get the summary, we have to bring the process to the > foreground with the same console, and do Ctrl-C. Maybe there is a way to > bring a process started with another console to the front of a new > console, but I don't know the way yet. Doing Ctrl-C is exactly the same as sending SIGINT with kill, so if one does what you want then so should the other. Note that by default kill will send SIGTERM and I don't know without looking how valgrind will react to that - it may well depend on whether your program installs a handler for SIGTERM anyway. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |