BIND 10 #335: b10-xfrout not exiting
BIND 10 Development
do-not-reply at isc.org
Mon Oct 18 15:05:05 UTC 2010
#335: b10-xfrout not exiting
-------------------------+--------------------------------------------------
Reporter: jreed | Owner: vorner
Type: defect | Status: reviewing
Priority: major | Milestone:
Component: xfrout | Resolution:
Keywords: | Sensitive: 0
Estimatedhours: 0.0 | Hours: 0
Billable: 1 | Totalhours: 0
Internal: 0 |
-------------------------+--------------------------------------------------
Comment(by vorner):
Replying to [comment:21 zhanglikun]:
> > Because they are unnecessary, as much as I'm avare. .join() just waits
for the thread to finish, does not terminate it. So the code just waited
for everything to terminate. But as the threads are not daemon threads,
the python interpretter will wait for them anyway. Or I missed something?
>
> yes vornor, what you joined is just the notify-out thread, and you are
changing xfrout's code, there may some threads which are doing zone-
transfer out, and they are not joined.
Let's wait for the mailling list what others think, then.
> 2. pass self._started_event to _dispatcher() as one parameter. like
_dispatcher(event=_started_event).
I implemented this one, as it seems cleaner than the original.
> I should read the data to check whether the data in socket is
'shutdown', not just check it's readable. see the fix in r3245. The test
case should be independent with each other, test case writer should
garantee for this.
This is not problem of tests, it is problem of the interface. Without the
cleanup (and without reading it), you couldn't start, shutdown and then
start again, but the interface looks like it should be possible. Not that
anyone would do it anywhere in our code (except for the tests).
I changed the data to just b's', to ensure they fit into single call of
.recv() and added workaround for the linux select bug. No need to create
new socket now, as this one is cleaned by the read.
I changed the code to assert, since as we talked on jabber, noone is
really expected to write anything else there and this is only a sanity
check.
> again, I a c++ man, when I read the code, I just feel a little tricky
about the definition self._read_sock, since it's part of socketpair, so
why not define self._read_sock and self._write_sock toghther.
Created for the whole time, as as part of ↑.
I found a failing test (it put wrong data into the socket) and an attempt
to shutdown the zonemanager twice if it was done by command and not
CTRL+C.
These changes are r3258-r3261. Let's wait with the review for the threads.
--
Ticket URL: <https://bind10.isc.org/ticket/335#comment:22>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list