Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix race condition on test node shutdown #6509

merged 1 commit into from Aug 17, 2015


Copy link

@casey casey commented Aug 3, 2015

This fixes a race condition where the block store or the transaction store might be accessed after being closed. To fix this, we wait until all connections are closed before closing the stores.

This race condition is tricky to trigger, but I hit it when writing an extended block acceptance test.

Copy link

@sdaftuar sdaftuar commented Aug 5, 2015


laanwj reviewed Aug 12, 2015
View changes
qa/rpc-tests/test_framework/ Outdated
def wait_for_disconnections(self):
def disconnected():
return all(node.closed for node in self.test_nodes)
wait_until(disconnected, timeout=10)

This comment has been minimized.


laanwj Aug 12, 2015

Maybe return wait_until so that callers know whether it succeeded or timed out? (same for other wait_for_XXX)

This comment has been minimized.


casey Aug 12, 2015
Author Contributor

Seems reasonable to me, changed.

@laanwj laanwj merged commit 45a6cce into bitcoin:master Aug 17, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
laanwj added a commit that referenced this pull request Aug 17, 2015
45a6cce Fix race condition on test node shutdown (Casey Rodarmor)
@laanwj laanwj mentioned this pull request Aug 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.