BIND 10 #296: Timeouts on msgq's cc-channel

BIND 10 Development do-not-reply at isc.org
Wed Aug 11 16:38:44 UTC 2010


#296: Timeouts on msgq's cc-channel
-------------------------------+--------------------------------------------
      Reporter:  jelte         |        Owner:  jinmei              
          Type:  enhancement   |       Status:  reviewing           
      Priority:  major         |    Milestone:  y2 6 month milestone
     Component:  Unclassified  |   Resolution:                      
      Keywords:                |    Sensitive:  0                   
Estimatedhours:  0.0           |        Hours:  0                   
      Billable:  1             |   Totalhours:  0                   
      Internal:  0             |  
-------------------------------+--------------------------------------------

Comment(by jinmei):

 Replying to [comment:10 jelte]:

 > About the setResult function. I don't think it can actually happen in
 practice, since either the timer expires, in which case the async_read()
 is canceled, or async_read returns an error, in which case the timer is
 canceled, so after this method exits there should be no pending actions
 that result in callbacks.
 >
 Depending on "in practice", I believe it can happen.  At least according
 to the ASIO documentation, the cancel method doesn't remove the event but
 trigger an immediate event with an error.

 "In practice", we'll basically terminate the process in our usage, but if
 we accept this condition and continue the io_service, the outstanding
 event will be invoked after exiting from setResult().

 I've confirmed this with a simple experimental patch (attached).  If you
 apply it and rebuild everything, and:
   - start b10-msgq
   - start b10-auth
 you'll see something like this:
 {{{
 [b10-auth] Server created.
 [b10-auth] IOService created.
 [b10-auth] Configuration session channel created.
 SessionImpl::setResult called for 0x100504480, result_code at
 0x7fff5fbfe3d0:Undefined error: 0
 SessionImpl::setResult called for 0x100504480, result_code at
 0x7fff5fbfe3c0:Undefined error: 0
 SessionImpl::setResult called for 0x100504480, result_code at
 0x7fff5fbfe590:Undefined error: 0
 SessionImpl::setResult called for 0x100504480, result_code at
 0x7fff5fbfe580:Undefined error: 0
 SessionImpl::setResult called for 0x100504480, result_code at
 0x7fff5fbfe590:Undefined error: 0
 SessionImpl::setResult called for 0x100504480, result_code at
 0x7fff5fbfe580:asio error
 SessionImpl::setResult called for 0x100504480, result_code at
 0x7fff5fbfe470:Undefined error: 0
 [b10-auth] Server started.
 SessionImpl::setResult called for 0x100504480, result_code at
 0x7fff5fbfe480:asio error
 }}}

 The first "asio error" should be corresponding to the timeout.

 The second "asio error" should be a cancel event triggered in
 SessionImpl::readData().  Note that this event is handled after b10-auth
 starts the main io_service loop.

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


More information about the bind10-tickets mailing list