BIND 10 #1668: redo threaded stats tests with mocksessions
BIND 10 Development
do-not-reply at isc.org
Tue Feb 14 08:20:19 UTC 2012
#1668: redo threaded stats tests with mocksessions
-------------------------------------+-------------------------------------
Reporter: jelte | Owner:
Type: task | Status: new
Priority: major | Milestone: Year 3 Task
Component: | Backlog
statistics | Resolution:
Keywords: | Sensitive: 0
Defect Severity: N/A | Sub-Project: DNS
Feature Depending on Ticket: | Estimated Difficulty: 0
Add Hours to Ticket: 0 | Total Hours: 0
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by jelte):
Replying to [comment:3 naokikambe]:
> Hello,
> I'm just curious about the race condition issue found on
[ticket:640#comment:21]. It was seemed to be discussed only on jabber.
>
The problem is partly in ThreadingServerManager from testutils.py; when
shutdown() is called on it, it forwards that call to whatever server-type
it is managing. It the join()s the thread for that server, but does so
with a zero timeout (i.e. it does not wait for it to finish). Since the
test I needed for 640 does want those threads to do some additional
processing (it tests cleanup), this often fails.
However, a lot of the other tests would deadlock here, should one change
that zero timeout to a blocking one. So the workaround there, for now, is
to specifically do a blocking join() for that specific test. See commit
2da5a3de561484f902aa7fb8475551217b9535b9
You can reproduce the behaviour by changing the call
self.stats_server.shutdown(True) to self.stats_server.shutdown() in
b10-stats_test.py. But since it is a race condition, the problem does not
show on every run (about one in 5 on my system).
--
Ticket URL: <http://bind10.isc.org/ticket/1668#comment:5>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list