|
From: Stephan M. <sm...@gm...> - 2005-04-20 11:41:00
|
Hi List, I'm using valgrind a lot to fix memleaks and achieved remarkable results, so thanks a lot! However, I'm wondering if I could use valgrind to track lost file descriptors. I've got a demon in thread mode here which is, thanks to valgrind, now virtually free of memleaks but it still 'leaks' file desriptors. After a certain time (not predictable yet but still more than a day) it runs out of and must be restarted. Obviously there are resources (sockets?) allocated or files opened and not properly closed after the threads have finished their (rather short and distinct) tasks. Can I track those with valgrind? Greetings... Stephan |
|
From: Julian S. <js...@ac...> - 2005-04-20 11:50:34
|
On Wednesday 20 April 2005 12:40, Stephan Menzel wrote: > Hi List, > > I'm using valgrind a lot to fix memleaks and achieved remarkable results, > so thanks a lot! > However, I'm wondering if I could use valgrind to track lost file > descriptors. I've got a demon in thread mode here which is, thanks to > valgrind, now virtually free of memleaks but it still 'leaks' file > desriptors. After a certain time (not predictable yet but still more than a > day) it runs out of and must be restarted. Obviously there are resources > (sockets?) allocated or files opened and not properly closed after the > threads have finished their (rather short and distinct) tasks. Can I track > those with valgrind? Yes, you just need to add --track-fds=yes to the command line. J |
|
From: Stephan M. <sm...@gm...> - 2005-04-20 11:53:50
|
Am Mittwoch, 20. April 2005 13:50 schrieb Julian Seward: > Yes, you just need to add --track-fds=yes to the command line. Wow! Didn't notice that one yet... Great! Thanks a lot! Stephan |
|
From: Stephan M. <sm...@gm...> - 2005-04-21 08:14:13
|
Am Mittwoch, 20. April 2005 13:53 schrieb Stephan Menzel: > > Yes, you just need to add --track-fds=yes to the command line. > > Wow! > Didn't notice that one yet... Great! Thanks a lot! It worked out extremely well. Thanks again to you valgrind guys. We would all be doomed without it. Stephan |
|
From: David E. <tw...@us...> - 2005-04-20 11:51:55
|
On Wed, 2005-04-20 at 13:40 +0200, Stephan Menzel wrote:
> Hi List,
>
> I'm using valgrind a lot to fix memleaks and achieved remarkable results, so
> thanks a lot!
> However, I'm wondering if I could use valgrind to track lost file descriptors.
> I've got a demon in thread mode here which is, thanks to valgrind, now
> virtually free of memleaks but it still 'leaks' file desriptors. After a
> certain time (not predictable yet but still more than a day) it runs out of
> and must be restarted. Obviously there are resources (sockets?) allocated or
> files opened and not properly closed after the threads have finished their
> (rather short and distinct) tasks. Can I track those with valgrind?
Don't forget that you have "strace" available...
--
Regards,
-\- David Eriksson -/-
SynCE - http://synce.sourceforge.net
ScummVM - http://scummvm.sourceforge.net
Desquirr - http://desquirr.sourceforge.net
|