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

fix(mempool/v1): data race #1655

Merged
merged 4 commits into from
Mar 5, 2025

Conversation

rootulp
Copy link
Collaborator

@rootulp rootulp commented Mar 5, 2025

Closes celestiaorg/celestia-app#4379

I don't know if this fixes all the issues with the v1 mempool but it should fix the data race reported in the issue. We had to move the mempool lock earlier in CheckTx before this map look up

txmp.txByKey[txKey]

Testing

# Before
$ go test ./mempool/v1 -race -run TestConcurrentCheckTxDataRace
# github.com/tendermint/tendermint/mempool/v1.test
==================
WARNING: DATA RACE
Write at 0x00c0005987e0 by goroutine 89:

# After
$ go test ./mempool/v1 -race -run TestConcurrentCheckTxDataRace
# github.com/tendermint/tendermint/mempool/v1.test
ok  	github.com/tendermint/tendermint/mempool/v1	(cached)

rootulp added 2 commits March 5, 2025 12:59
Run it with go test ./mempool/v1 -race -run TestConcurrentCheckTxDataRace
@rootulp rootulp requested review from cmwaters and evan-forbes March 5, 2025 18:02
@rootulp rootulp self-assigned this Mar 5, 2025
Copy link
Member

@evan-forbes evan-forbes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@rootulp rootulp merged commit 1d1d65b into celestiaorg:v0.34.x-celestia Mar 5, 2025
17 checks passed
rootulp added a commit to celestiaorg/celestia-app that referenced this pull request Mar 6, 2025
mergify bot pushed a commit to celestiaorg/celestia-app that referenced this pull request Mar 6, 2025
Closes #4379 by
upgrading to
https://github.com/celestiaorg/celestia-core/releases/tag/v1.49.1-tm-v0.34.35
which includes celestiaorg/celestia-core#1655

(cherry picked from commit a3917ec)

# Conflicts:
#	go.mod
#	go.sum
#	test/interchain/go.mod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validator node panics with "fatal error: concurrent map read and map write"
2 participants