-
Notifications
You must be signed in to change notification settings - Fork 971
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
service/block, node/p2p: Fix race conditions in TestExtendedHeaderBroadcast and TestFull_P2P_Streams #288
service/block, node/p2p: Fix race conditions in TestExtendedHeaderBroadcast and TestFull_P2P_Streams #288
Conversation
Thank you so much for the PR @jenyasd209 ! 🥳
|
Updated. The problem is I have no failures locally (go v1.16) Update: checked locally with go v1.17 and still have no issues. As I can see the error is |
@jenyasd209, thank you for taking over bugs! I am fine with the Race fixes, but unsure about #232 being fixed. The bug described there is not reproducible and happened only once in an unusual situation. Furthermore, I am not sure why this bag happened in the first place. There should not be any panics as append(on the line 50) should not produce such errors, due to the way appends works. Also, a lot of things changed from the point the bug appeared. Let's proceed by removing your fix for #232 in this PR and closing the issue, as there should be no panics on the code as it is right now and the fix does not really fix anything. |
@jenyasd209, also, the error you were facing is test flakiness and can be resolved by re-running all tests using github actions page |
I tagged #232 because it looks similar to #286 (logs https://gist.github.com/Bidon15/9ec686472ed21ee77662fca18dc5ecf2). There is race condition at the same line where panic happens. Due to append is not thread safe panic can happen if there are a couple calls of this func. |
@jenyasd209, ooh, I see. Thanks for pointing me to the connection with the races. I made a deeper look and there is clearly a bug/typo. We weren't even using |
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.
Awesome, thank you!
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.
Small nit but otherwise good. Unfortunately TestExtendedHeaderBroadcast
will no longer be needed as header production will be removed from BlockService
anyway with #277 .
@jenyasd209, can you pls make a rebase? |
add locks for maps in `mockFetcher` structure Issue celestiaorg#283
Copy `announce multi addresses` to separate array to avoid data race and return them with `listen multi addresses`. Issue celestiaorg#286
…s in `mockFetcher`. Add item to CHANGELOG-PENDING.md
3d6b2c4
to
f68b864
Compare
PR supposed to: