-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Add missing locks: validation.cpp + related #11652
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
Add missing locks: validation.cpp + related #11652
Conversation
ec7e73a to
db5fd51
Compare
|
Anyone willing to review? :-) |
db5fd51 to
8cf4342
Compare
8cf4342 to
255b5c5
Compare
TheBlueMatt
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.
Please just put a cs_main at the top of the load-from disk loop thing, there is no reason to lock and unlock cs_main 20 times during single-threaded init.
9d78b3c to
c8164c8
Compare
|
@ajtowns @TheBlueMatt Thanks for reviewing! I've now addressed your feedback. Would you mind re-reviewing? :-) |
|
General note: Instead of documenting the locking assumptions in the OP of this pull request, wouldn't it be better to put them in the header files? Imo, this increases review efficiency. |
|
@MarcoFalke You mean as an interim before we've added |
|
No, I meant adding the |
4502ab7 to
6bb006b
Compare
96c1b9f to
27a0eaa
Compare
|
@MarcoFalke Sure! New version with Could you please review? :-) |
b4a008f to
313c325
Compare
|
Hrmm, the |
Should be fixed by rebasing after #12772 |
313c325 to
9bd9d9f
Compare
|
Rebased! |
|
9bd9d9f8302d4cdde2f25f4d7a008f8f0a0ccea2 looks good to me, fwiw, but it needs another rebase anyway to cope with scoped enums. |
9bd9d9f to
6d9f3b6
Compare
|
Rebased! @ajtowns Thanks for the review. Please re-review :-) |
Looks like you never did this. |
e7824b3 to
7e11716
Compare
|
@TheBlueMatt Can you confirm that your suggestion is addressed in the latest version? :-) If not I might need help identifying the "load-from disk loop thing" :-) |
|
@TheBlueMatt Friendly ping :-) |
|
@MarcoFalke I'll do that once my other two open locking PRs #13128 and #13123 have been processed (either merged or closed). I try to limit my work in progress in the form of open pull requests :-) |
|
I think this can be reopened and rebased. |
|
@MarcoFalke I force-pushed before re-opening, so now I'm unable to re-open. Could you re-open? :-) |
|
I can't force push 7e11716932b8a1f6f1aa2c06e1990b64950a89bc to your branch either, since the pull request is closed. Try |
7e11716 to
f5b3548
Compare
|
@MarcoFalke Thanks! Now re-opened and force-pushed. WIP for now. |
|
@MarcoFalke I'm a bit unsure how to resolve the locking errors below (see Travis OS X output). Do you have any suggestion? If |
|
The compiler doesn't understand that, though. You'd have to add a temporary annotation or use the interface (c.f. #14711) |
|
re: #11652 (comment)
You could use the |
|
@MarcoFalke Would you mind taking over this PR if it put it up for grabs? At the moment I'm afraid I don't have time to resolve the remaining issues. |
Are there other issues besides the need for lock annotations in the wallet? If not, we could just treat this PR as blocked until #14711 is merged, since it removes the need for them. |
f5b3548 to
a04dd77
Compare
Add missing locks required when accessing:
Also, add the locking annotations that follow from the requirements above.