BIND 10 #624: asiolink test fails on OSX server

BIND 10 Development do-not-reply at isc.org
Thu Mar 3 14:59:16 UTC 2011


#624: asiolink test fails on OSX server
-------------------------------------+-------------------------------------
                 Reporter:  stephen  |                Owner:  jinmei
                     Type:  defect   |               Status:  reviewing
                 Priority:  minor    |            Milestone:  R-Team-
                Component:           |  Sprint-20110308
  resolver                           |           Resolution:
                 Keywords:           |            Sensitive:  0
Estimated Number of Hours:  1.0      |  Add Hours to Ticket:  0
                Billable?:  1        |          Total Hours:  0
                Internal?:  0        |
-------------------------------------+-------------------------------------
Changes (by stephen):

 * owner:  stephen => jinmei


Comment:

 Going back to the code, I got the unit test to reliably fail again on the
 Mac when I replaced
 {{{
    service.run_one();
    service.run_one();
 }}}
 with the original
 {{{
    service.get_io_service().poll();
 }}}
 However, if I added a delay before polling:
 {{{
    sleep(1);
    service.get_io_service().poll();
 }}}
 ... the unit test works.

 io_service::poll() looks in the queue for event handlers and runs the ones
 it finds.  If there are none, it returns immediately.
 io_service::run_one() will run one event handler and return, but if there
 are none in the queue when it is called, it will block until one appears

 This suggests platform-dependent timing behaviour.  If, for some reason,
 the Mac does not execute the I/Os immediately when poll() is called (or
 the I/O post-processing which puts the handlers in the queue is slow),
 there may be nothing in the queue when poll() is called.  Although it is
 something we need to be aware of, it does not seem to suggest a problem in
 the BIND10 code.  For this reason, I suggest we close the ticket.

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


More information about the bind10-tickets mailing list