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 deadlock in tests (Continued) #2050

Merged
merged 1 commit into from Jun 1, 2019

Conversation

2 participants
@wezrule
Copy link
Collaborator

commented May 31, 2019

Following on from #2043 I am still getting a deadlock on Windows from a similar issue where the last node shared_ptr reference is freed while holding the mutex of bootstrap_initiator and the ~bootstrap_initiator destructor is implicitly called (and hence stop) which then has the same problem as before as it then locks the same mutex while already holding it. Made stopped a std::atomic<bool> so that it can be checked without locking the mutex. The thread can already be joined, so have moved this inside the stopped function (when stopped is false) to avoid an already joined error.

@wezrule wezrule added this to the V19.0 milestone May 31, 2019

@wezrule wezrule requested a review from cryptocode May 31, 2019

@wezrule wezrule self-assigned this May 31, 2019

@wezrule wezrule added the unit test label May 31, 2019

@wezrule wezrule merged commit 44c23e0 into nanocurrency:master Jun 1, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@wezrule wezrule deleted the wezrule:fix_deadlock_cont branch Jun 1, 2019

@wezrule wezrule added this to RC 4 (TBD) in V19 Jun 1, 2019

argakiig added a commit that referenced this pull request Jun 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.