TestTCPServerInAThread.test_server_crash_while_responding random failure
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Vincent Ladeuil | ||
2.4 |
Fix Released
|
Medium
|
Vincent Ladeuil |
Bug Description
PQM just failed to land a branch with no bzrlib changes, with a single test error on:
bt.test_
Two traceback attachments, the first from test case failing the assertion because FailedToRespond is not raised:
Traceback (most recent call last):
File "/usr/lib/
return fn(*args)
File "/usr/lib/
testMethod()
File "/home/
self.
AssertionError: FailToRespond not raised
The second from run cleanups where that exception belatedly pops up:
Traceback (most recent call last):
File "/usr/lib/
function(
File "/home/
self.
File "/home/
super(
File "/home/
super(
File "/usr/lib/
self.
File "/home/
self.
File "/home/
self.
File "/home/
self.
File "/home/
self.
File "/home/
t.pending_
File "/home/
self.
File "/home/
super(
File "/home/
super(
File "/usr/lib/
self.
File "/home/
self, request, client_address)
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.handle()
File "/home/
self.
File "/home/
raise FailToRespond()
FailToRespond
Related branches
- John A Meinel: Approve
-
Diff: 159 lines (+61/-21)3 files modifiedbzrlib/tests/test_server.py (+3/-2)
bzrlib/tests/test_test_server.py (+55/-19)
doc/en/release-notes/bzr-2.4.txt (+3/-0)
Changed in bzr: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in bzr: | |
assignee: | nobody → Vincent Ladeuil (vila) |
status: | Confirmed → In Progress |
Changed in bzr: | |
status: | In Progress → Fix Released |
In a nutshell:
So the fix is that we should check both the connection thread and the server
thread with some care:
- first the connection thread, if we get the exception, we're good,
- if it's not in the connection thread, we need to wait for the server to
stop before getting... our precious.