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

Data race in p2p/discover/table_real.go #31460

Open
fearlessfe opened this issue Mar 23, 2025 · 1 comment · May be fixed by #31575
Open

Data race in p2p/discover/table_real.go #31460

fearlessfe opened this issue Mar 23, 2025 · 1 comment · May be fixed by #31575
Assignees
Labels

Comments

@fearlessfe
Copy link
Contributor

System information

Geth version: latest
OS & Version: OSX

Steps to reproduce the behaviour

When we run our shisui node with -race flag, we found a data race in table(the method name and the line number in the picture is the same with file in geth).

the nextTime field of revalidationList may be read and write in the same time, beacuse these methods run in different goroutines.

type revalidationList struct {
	nodes    []*tableNode
	nextTime mclock.AbsTime
	interval time.Duration
	name     string
}
Image

I'd like to make a pr to fix this.

@GrapeBaBa
Copy link
Contributor

related issue

@fjl fjl self-assigned this Mar 27, 2025
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 a pull request may close this issue.

3 participants