BIND 10 #2903: need more asio error handling in asiodns

BIND 10 Development do-not-reply at isc.org
Fri Apr 26 08:02:08 UTC 2013


#2903: need more asio error handling in asiodns
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  defect        |  jinmei
            Priority:  medium        |                       Status:
           Component:  b10-auth      |  accepted
            Keywords:                |                    Milestone:
           Sensitive:  0             |  Sprint-20130423
         Sub-Project:  DNS           |                   Resolution:
Estimated Difficulty:  4             |                 CVSS Scoring:
         Total Hours:  0             |              Defect Severity:  N/A
                                     |  Feature Depending on Ticket:
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------

Comment (by jinmei):

 trac2903 is ready for review.

 Running part of this branch seems to suggest it certainly fixes
 the originally reported issue.

 In changes up to 65bbffe I've examined all calls to asio:: methods and
 functions, and handled error cases (in some cases I decided to let any
 exception be propagated as they really seem to be rare and shouldn't
 be triggered by remote clients).

 Also, on a closer look I believed we should actually keep handling
 incoming connections/UDP packets even if async_accept or
 async_receive_from fail; at least silently stopping receiving
 shouldn't be good; we should either throw an exception or (as this
 branch does) keep going.  At least in some cases the latter is better,
 and I think unless we know there are cases we should rather throw (and
 terminate) through the added logs we should keep this behavior.

 Finally, I used this opportunity to introduce one unrelated set of
 cleanups.  It's mainly suggested in #1764.  Amount of code change
 isn't small, but I believe they are quite easy to understand (although
 updates to tests are a bit tricky).  This should make the code much
 cleaner, and should actually make it a little bit faster: in my quick
 experiment with a root server set up, max QPS is about 5% better than
 the branch point version.  But if this part looks too unrelated and/or
 too big, I'm okay to separate it.

 Suggested changelog:
 {{{
 608.?   [bug]           jinmei
         Handled some rare error cases in DNS server classes correctly.
         This fix specifically solves occasional crash of b10-auth due to
         errors caused by TCP DNS clients.  Also, as a result of cleanups
         with the fix, b10-auth should now be a little bit faster in
         handling UDP queries: in some local experiments it ran about 5%
         faster.
         (Trac #2903, git TBD)
 }}}

-- 
Ticket URL: <http://bind10.isc.org/ticket/2903#comment:9>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list