FreeBSD 5.4 kqueue leak in getaddrinfo()

Vernon Schryver
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
Similar problems seem to be in FreeBSD 4.8, 5.2, and 5.3 judging from

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

More information about the DCC mailing list

Contact by mail or use the form.