FreeBSD 5.4 kqueue leak in getaddrinfo()

Vernon Schryver vjs@calcite.rhyolite.com
Sat Feb 25 18:50:29 UTC 2006


While trying to produce an intermittent problem on Solaris that looks
like file descriptor exhaustion, I've found that every use of getaddrinfo()
leaks at least one and sometimes 3 kqueue's.

It seems to be discussed in the hits for
http://www.google.com/search?q=freebsd+kqueue+leak
Similar problems seem to be in FreeBSD 4.8, 5.2, and 5.3 judging from
http://www.google.com/search?q=site:freebsd.org+kqueue+leak

The result is that dccifd, dccm, and the -B helper processes for both
accumulate mountains of dead kqueue's.  Eventually things stop working.
`fstat -vp  PID` for an appropriate PID shows the problem.

Kludges like occassionally trying open("/dev/null") to see if file
descripters are short and then restarting seem too nasty.

What should I do?


Vernon Schryver    vjs@rhyolite.com



More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.