|
From: Christian P. <tr...@ge...> - 2005-08-11 00:06:33
|
Heya, I'm having a server application that communicates to the requesting clients= =20 via TCP/IPv4, actually, when I'm connecting the usual way it just works fin= e,=20 however, when performing some regression tests (via a dedicated bot) it=20 obviousely leaks consequently file descriptors, which is, why my daemon is= =20 failing to accept new client requests (when fd limit is reached); A look at the output of lsof shows me lines like below: [...] sock 0,4 68198 can't identify protocol These lines counted are about 90% of all the descriptors currently in use; Why lsof is *NOT* telling me what (fscking) kind of sockets he pretents I h= ave=20 created I thought maybe valgrind can help me in finding out; I know, memcheck is a memory checker and can find out memory leaks; But is there any way in getting the backtraces when certain file descriptor= s=20 got reserved/created; just like the (unidentified) one above? Any help is appreciated, Thanks, Christian Parpart. =2D-=20 01:59:23 up 140 days, 15:07, 0 users, load average: 0.12, 0.19, 0.18 |
|
From: Tom H. <to...@co...> - 2005-08-11 06:13:37
|
In message <200...@ge...>
Christian Parpart <tr...@ge...> wrote:
> I know, memcheck is a memory checker and can find out memory leaks;
>
> But is there any way in getting the backtraces when certain file descriptors
> got reserved/created; just like the (unidentified) one above?
--track-fds=yes
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Igmar P. <mai...@jd...> - 2005-08-11 14:15:06
|
> A look at the output of lsof shows me lines like below: > > [...] sock 0,4 68198 can't identify protocol Can't strace tell you ? Grepping out all the socket() calls shouldn't be that hard, and recent strace version mostly tell accurate what is happening. --track-fds=yes when using valgrind might also help. Regards, Igmar |