BIND 10 #335: b10-xfrout not exiting
BIND 10 Development
do-not-reply at isc.org
Sat Oct 9 13:52:17 UTC 2010
#335: b10-xfrout not exiting
-------------------------+--------------------------------------------------
Reporter: jreed | Owner: zhanglikun
Type: defect | Status: reviewing
Priority: major | Milestone:
Component: xfrout | Resolution:
Keywords: | Sensitive: 0
Estimatedhours: 0.0 | Hours: 0
Billable: 1 | Totalhours: 0
Internal: 0 |
-------------------------+--------------------------------------------------
Changes (by vorner):
* owner: vorner => zhanglikun
Comment:
The exceptions are OK.
The spurious wakeup does not happen usually, as I gather it happens only
under extreme conditions (high load, bad checksum on incoming packet) and
it is considered a bug. But as it should not break on working system, it
is OK to provide a workaround I think. Thanks for including it.
About the race condition, the sleep(1) does help sometime, but not always,
I was still able to reproduce it. And I found another one. If run_timers
is run in one thread and shutdown soon after, the shutdown calls
_is_runnable = False first and then the other thread sets _is_runnable =
True. May I suggest using a wrapper to run the run_timers in another
thread, that would store the thread object and calling .join on it instead
of having the event object? It seems cleaner and would remove both
problems, because the _is_runnable could be called before the thread is
started.
And I noticed one more thing. We shouldn't call run_timers, then shutdown
and then run_timers again, because the shutdown pipe would still contain
b'shutdown' and would still be readable ‒ and we would get a busy loop.
Maybe it should be mentioned in documentation that one should not call
run_timers multiple times on the same object. Or, clean the pipe (or
create a new one and throw the old one away) on each run_timers start.
--
Ticket URL: <http://bind10.isc.org/ticket/335#comment:12>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list