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

wezrule
Copy link
Contributor

@wezrule wezrule 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 20:07
@wezrule wezrule self-assigned this May 31, 2019
@wezrule wezrule added the unit test Related to a new, changed or fixed unit test label May 31, 2019
@wezrule wezrule merged commit 44c23e0 into nanocurrency:master Jun 1, 2019
@wezrule wezrule deleted the fix_deadlock_cont branch June 1, 2019 08:36
argakiig pushed 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
Labels
unit test Related to a new, changed or fixed unit test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants