AW: FreeBSD 5.4 kqueue leak in getaddrinfo()

Bolmerg-Berliner Ludger - Munich-MR
Mon Feb 27 07:20:24 UTC 2006

There is a problem report and a suggested patch for kern_event.c available that may solve the issue.  I had similar problems on FreeBSD 5.4 which went away when I applied the patch  

The problem has been fixed in FreeBSD 6.0


-----Ursprüngliche Nachricht-----
Von: [] Im Auftrag von Vernon Schryver
Gesendet: Samstag, 25. Februar 2006 19:50
Betreff: FreeBSD 5.4 kqueue leak in getaddrinfo()

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
DCC mailing list

More information about the DCC mailing list

Contact by mail or use the form.