BIND 10 #2963: XfroutClient::disconnect must not throw

BIND 10 Development do-not-reply at isc.org
Fri May 17 21:04:27 UTC 2013


#2963: XfroutClient::disconnect must not throw
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:
  jinmei                             |                Status:  new
                       Type:         |             Milestone:  Next-Sprint-
  defect                             |  Proposed
                   Priority:         |              Keywords:
  medium                             |             Sensitive:  0
                  Component:         |           Sub-Project:  DNS
  b10-auth                           |  Estimated Difficulty:  0
               CVSS Scoring:         |           Total Hours:  0
            Defect Severity:  N/A    |
Feature Depending on Ticket:         |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
 I've noticed b10-auth sometimes crashed at the end of its shutdown
 process.  On a closer look it's because `XfroutClient::disconnect()`
 throws:
 {{{#!cpp
     asio::error_code err;
     impl_->socket_.close(err);
     if (err) {
         isc_throw(XfroutError, "close socket failed: " << err.message());
     }
 }}}
 and its caller, the destructor of `AuthSrvImpl` didn't catch it.

 I've not fully figured out why close() fails; it somehow seems to be
 related to the xfrout's behavior.

 There can be several ways to fix it, but since `XfroutClient` itself
 is quite broken like other xfr stuff and should be replaced with
 the generic `SocketSessionForwarder` in future (maybe part of the xfr
 rewrite work), I propose one quick fix: just not throw here.

 Hiding an error is not really good, but in practice this only happens
 while shutting down b10-auth, so there's not much we can do from this
 situation anyway.  And, again, we should get rid of the `XfroutClient`
 stuff in a bit longer term.

-- 
Ticket URL: <http://bind10.isc.org/ticket/2963>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list