BIND 10 #2028: socket session forward test fails on solaris11
BIND 10 Development
do-not-reply at isc.org
Thu Jun 14 21:40:28 UTC 2012
#2028: socket session forward test fails on solaris11
-------------------------------------+-------------------------------------
Reporter: | Owner: jinmei
jinmei | Status: accepted
Type: | Milestone:
defect | Sprint-20120619
Priority: high | Resolution:
Component: | Sensitive: 0
Inter-module communication | Sub-Project: Core
Keywords: | Estimated Difficulty: 7
Defect Severity: N/A | Total Hours: 0
Feature Depending on Ticket: |
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by jinmei):
trac2028 is ready for review.
The attached file (additions to socketsession_unittest.cc) highlights
the issue more clearly. To see the effect you'd also need to disable
SO_REUSEADDR:
{{{#!cpp
#if 0
const int on = 1;
if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) ==
-1) {
isc_throw(isc::Unexpected, "setsockopt(SO_REUSEADDR) failed: "
<<
strerror(errno));
}
#endif
}}}
I've not figured out how exactly that happened, but what happened was
that when we create a socket and forward the socket FD via a UNIX
domain socket (and then close both the original and forwarded FDs),
this deviant system somehow prevents the reuse of the port for some
short period (some shorter than 1sec).
So, my proposed fix is to just use different ports for the offending
tests, which is what this branch does.
Note that TCP tests aren't affected, probably because it forwards a
TCP socket on accept() whose remote address is always different.
Note also that this behavior of Solaris won't affect more practical
cases of BIND 10, because the forwarder side of app should keep the
UDP socket open, in which case this type of problem doesn't happen (I
confirmed that). So this is basically only for the specific set of
unit tests, and any workaround that avoids the trouble should be okay.
Since it's only about unit tests and for a newest buildbot
environment, I don't think we need a change log for it.
--
Ticket URL: <http://bind10.isc.org/ticket/2028#comment:4>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list