Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Running out of buffers?



Roy Marples wrote:
> Try reading the bind sources:
> https://github.com/NetBSD/src/blob/trunk/external/bsd/bind/dist/lib/isc/unix/socket.c#L1923

I have read the BIND sources.  In fact, I wrote parts of them
(though as far as I can remember, not the socket handling part).

> I'll quote it here for good measure:
> ALWAYS_HARD(ENOBUFS, ISC_R_NORESOURCES);
> /* Should never get this one but it was seen. */

That comment pertains to the lines *after* it, dealing with
ENOPROTOOPT, not the line before it.  Both the comment and the
ENOPROTOOPT code following it appeared in 9.10.0; neither was there in
9.9.0.  So there's no basis for claiming that ENOBUFS "was seen".

> I've not found where bind opens the socket yet, but hopefully as it hard 
> aborts specifically for ENOBUFS on recv it will ensure a large enough 
> buffer is allocated for recv - unbound sets the maximum possible for 
> reference.

That's not a fix, that's just making the problem harder to trigger and
therefore less likely to be fixed.
-- 
Andreas Gustafsson, gson%gson.org@localhost


Home | Main Index | Thread Index | Old Index