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 distributed_work segfault when local work generation fails #2413

Conversation

guilhermelawless
Copy link
Contributor

In start_work () :
else if (!this_l->cancelled && !this_l->completed)

Was not setting any of these atomics to true, so the same callback would possibly be called in cancel_once. Not normally an issue, but can happen and came up with Serg's epoch storm test. Instead of making a new atomic, joined both into a single finished atomic, and added a work_generation_status enum.

Also added a check if (callback) on every call.

@guilhermelawless guilhermelawless merged commit 7086a04 into nanocurrency:develop Nov 25, 2019
@guilhermelawless guilhermelawless deleted the distributed-work/fix-local-error branch November 25, 2019 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants