file descriptor leak in 5.2-RC

Poul-Henning Kamp phk at phk.freebsd.dk
Sat Dec 27 13:51:54 PST 2003


In message <20031227205000.GG86308 at e-Gitt.NET>, Oliver Brandmueller writes:

>Do you mean, there's something in the place where a daemonized process 
>exits?

I really don't know...

The most suspect places are calls to dup(2)/dup2(2), close(2), exec(2)
[for close on exec filedescriptors], exit(2) processing and finally
filedescriptor-passing via sockets.

I have only followed this on the sideline, so I don't have all the
details at hand and I can't really say how I would go about debugging
it, probably by trying to reproduce it in single-user and then
pouring printfs all over the kernel where filedescriptors gets
created/destroyed, and try to figure out which one doesn't get there.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-current mailing list