Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

p2p: fix race in dialScheduler (#29235)#481

Merged
huyngopt1994 merged 1 commit intoaxieinfinity:masterfrom
huyngopt1994:p2p-cherry-pick-commits-from-geth-for-fix-data-race-in-dial-scheduler
Jul 1, 2024
Merged

p2p: fix race in dialScheduler (#29235)#481
huyngopt1994 merged 1 commit intoaxieinfinity:masterfrom
huyngopt1994:p2p-cherry-pick-commits-from-geth-for-fix-data-race-in-dial-scheduler

Conversation

@huyngopt1994
Copy link
Copy Markdown
Contributor

@huyngopt1994 huyngopt1994 commented Jul 1, 2024

ethereum/go-ethereum#29203 Data Race issue happens here when

we need access to the node ID from the dialer mainloop goroutine, but the ID is stored within the dest node object, which can be updated.

Solution
Using atomic.Pointer for dest enode

Co-authored-by: Stefan <stefan@starflinger.eu>
@huyngopt1994 huyngopt1994 merged commit 5677825 into axieinfinity:master Jul 1, 2024
@huyngopt1994 huyngopt1994 deleted the p2p-cherry-pick-commits-from-geth-for-fix-data-race-in-dial-scheduler branch July 1, 2024 06:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants