file descriptor leak in 5.2-RC

Jonathan Lennox lennox at cs.columbia.edu
Thu Dec 18 11:42:46 PST 2003


Michal Mertl writes:
> For several weeks now I see my -current (now RELENG_5_2 to help test the
> release) machine seems to be leaking file descriptors. After some time all
> files (up to kern.maxfiles) are consumed.

Do you have any statically-linked programs that use pthreads?  There's a FD
leak in gethostbyname(3) in multithreaded programs (actually, in the uthread
wrapper for kevent(2), but gethostbyname(3) is the most common reason you'd
see it) which was fixed in -CURRENT for programs linked with libc_r.so, but
not for those linked with libc_r.a.

See PR bin/58687 <http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/58687>.
This has a patch available.

-- 
Jonathan Lennox
lennox at cs dot columbia dot edu


More information about the freebsd-current mailing list