Report information
The Basics
Id:
37059
Status:
resolved
Priority:
Medium/Medium
Queue:

People
Owner:
Nobody in particular
Cc:
AdminCc:

BugTracker
Version Fixed:
9.10.1, 9.11.0
Version Found:
(no value)
Versions Affected:
(no value)
Versions Planned:
(no value)
Priority:
(no value)
Severity:
S2 Normal
CVSS Score:
(no value)
CVE ID:
(no value)
Component:
(no value)
Area:
bug

Dates
Created:Tue, 02 Sep 2014 20:06:07 -0400
Updated:Thu, 03 Aug 2017 21:48:11 -0400
Closed:Wed, 22 Oct 2014 01:52:00 -0400



This bug tracker is no longer active.

Please go to our Gitlab to submit issues (both feature requests and bug reports) for active projects maintained by Internet Systems Consortium (ISC).

Due to security and confidentiality requirements, full access is limited to the primary maintainers.

Subject: runtime error
Date: Wed, 3 Sep 2014 10:06:01 +1000
To: bind-bugs@isc.org
From: "Peter D. Gray" <pdg@uow.edu.au>
Hi there. I built bind 9.10-0-P2 on solaris 10 sparc, using studio compiler 12.3 I selected use_tuning=large just for fun. Build worked ok, but at runtime I get these messages in the log. Sep 3 09:45:40 sif1.its.uow.edu.au named[5461]: [ID 873579 syslog.error] socket.c:2786: unexpected error: Sep 3 09:45:40 sif1.its.uow.edu.au named[5461]: [ID 873579 syslog.error] setsockopt(560, SO_RCVBUF, 16777216) failed: No buffer space available Sep 3 09:45:41 sif1.its.uow.edu.au named[5461]: [ID 873579 syslog.error] socket.c:2786: unexpected error: Sep 3 09:45:41 sif1.its.uow.edu.au named[5461]: [ID 873579 syslog.error] setsockopt(560, SO_RCVBUF, 16777216) failed: No buffer space available Sep 3 09:45:41 sif1.its.uow.edu.au named[5461]: [ID 873579 syslog.error] socket.c:2786: unexpected error: Sep 3 09:45:41 sif1.its.uow.edu.au named[5461]: [ID 873579 syslog.error] setsockopt(560, SO_RCVBUF, 16777216) failed: No buffer space available It looks like the setting of RCVBUFSIZE in lib/isc/unix/socket.c is a bit excessive. /*% * The size to raise the receive buffer to (from BIND 8). */ #ifdef TUNE_LARGE #define RCVBUFSIZE (16*1024*1024) #else #define RCVBUFSIZE (32*1024) #endif /* TUNE_LARGE */ Increasing it by a factor of 500 seems a tad overkill and seems to cause problems on solaris. Could I suggest a factor of 8-32 might be a better idea. Actually, given the increasing size of DNS answers, maybe increasing the default would be a good idea as well. Anyway, just thought you would like to know. I am rebuilding without use_tuning. Keep up the good work. Regards, pdg Peter Gray Ph (direct): +61 2 4221 3770 Information Technology Services Ph (switch): +61 2 4221 3555 University of Wollongong Fax: +61 2 4229 1958 Wollongong NSW 2522 Email: pdg@uow.edu.au Australia URL: http://pdg.uow.edu.au
Subject: Re: [ISC-Bugs #37059] runtime error
Date: Wed, 03 Sep 2014 11:56:18 +1000
To: bind9-bugs@isc.org
From: Mark Andrews <marka@isc.org>
Well 16M is less than a second's worth of traffic these days. You may want to tune -U #listeners down from the default and/or the number if cpus (-n) which reduces -U. That said the ability to set this size at runtime would be useful. -- Mark Andrews, ISC 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: marka@isc.org
Subject: Re: [ISC-Bugs #37059] runtime error
Date: Wed, 3 Sep 2014 12:46:06 +1000
To: Mark Andrews via RT <bind9-bugs@isc.org>
From: "Peter D. Gray" <pdg@uow.edu.au>
Hi Mark, thank you for the quick reply. I just wanted you to know about the problem. On Wed, Sep 03, 2014 at 01:56:28AM +0000, Mark Andrews via RT wrote: > > Well 16M is less than a second's worth of traffic these days. > Well yes, but in what situation would not a single thread call recv for a full second. If thats happening, you need more threads. > You may want to tune -U #listeners down from the default and/or the > number if cpus (-n) which reduces -U. > > That said the ability to set this size at runtime would be useful. Agreed, but it sounds like creeping featurism. You could loop, trying smaller values until you found one that worked, but that sounds like overkill to me. The maximum allowable value for rcvbufsiz on solaris by default is 2M for UDP and 1M for TCP. I have no idea how to find that out at compile time or at run time for that matter. The maximum value for the above can be set as a kernel tunable. I have set the smaller of the 2 recbufsiz sizes to 256k for my build and used that. Regards, pdg
This change should build diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index 17012ed..b4c1c3f 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -306,7 +306,11 @@ typedef isc_event_t intev_t; * The size to raise the receive buffer to (from BIND 8). */ #ifdef TUNE_LARGE +#ifdef sun +#define RCVBUFSIZE (1*1024*1024) +#else #define RCVBUFSIZE (16*1024*1024) +#endif #else #define RCVBUFSIZE (32*1024) #endif /* TUNE_LARGE */
Subject: Re: [ISC-Bugs #37059] runtime error
Date: Thu, 4 Sep 2014 14:03:56 +1000
To: Mark Andrews via RT <bind9-bugs@isc.org>
From: "Peter D. Gray" <pdg@uow.edu.au>
On Thu, Sep 04, 2014 at 02:55:09AM +0000, Mark Andrews via RT wrote: > This change should build > > diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c > index 17012ed..b4c1c3f 100644 > --- a/lib/isc/unix/socket.c > +++ b/lib/isc/unix/socket.c > @@ -306,7 +306,11 @@ typedef isc_event_t intev_t; > * The size to raise the receive buffer to (from BIND 8). > */ > #ifdef TUNE_LARGE > +#ifdef sun > +#define RCVBUFSIZE (1*1024*1024) > +#else > #define RCVBUFSIZE (16*1024*1024) > +#endif > #else > #define RCVBUFSIZE (32*1024) > #endif /* TUNE_LARGE */ > Yes, works no problems. Have you considered changing all the places where you test for TUNE_LARGE to something like #define RCVBUFSIZE (16*1024*1024*TUNEABLE_FACTOR) and then putting something like #ifdef TUNE_LARGE #define TUNEABLE_FACTOR 8 #else #define TUNEABLE_FACTOR 1 #endif That way you get a consistant increase in buffer sizes across all buffers and you can easily add additional tuneable settings in 1 place for other sizes if you want (say you wanted a TUNE_MEDIUM setting). Alternatively, you could make TUNEABLE_FACTOR a global variable (yes I know) and set that at runtime and it would flow to all locations where you want tuneable buffer sizes. Just my 2c worth. Regards, pdg