-
Notifications
You must be signed in to change notification settings - Fork 725
[Core][Build] Fix atomic data races in BLS operations #2702
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
[Core][Build] Fix atomic data races in BLS operations #2702
Conversation
|
Example of failing build log: launchpad.net nightly PPA, Ubuntu 16.04 ARM64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code reviewed a2af7d9e
There is an undefined behavior on Dash backported PR.
Update: Never mind.., enable_shared_from_this is protecting it from happening.
Detection was lacking for some compiler/host combos, resulting in erratic linking errors
Change ctpl implementation to use STL queue & mutex. Use ctpl synchronized queue instead of boost lockfree queue in bls worker aggregator. Use smart pointers for memory management of Aggregator and VectorAggregator. With 'delete this;' the objects are prone to data race on the delete operator. Use smart pointers for memory management of ContributionVerifier. Pass shared_ptr by value to other threads via worker pool.
a2af7d9 to
c76e7b6
Compare
|
Feedback tackled and rebased on current master |
furszy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK c76e7b6
random-zebra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK c76e7b6
Coming from dashpay#4240, bitcoin#20938, and bitcoin#21920, this resolves numerous compile-time inconsistencies/failures on certain combos of gcc and cpu arch that were observed on launchpad.net over the 5.4.0 release cycle.