Open
Description
opened on Oct 25, 2024
Is there an existing issue for this?
- I have searched the existing issues
What happened?
We at omni enabled direct gRPC based queries of application state (previously we queried via CometBFT). We have a go unit test that runs a single validator, while quering state using gRPC directly. When run with -race
the tests fails with "WARNING: DATA RACE". See stack trace below.
It seems like the cause is one or more fields in BaseApp
that are not protected by a mutex, yet are written-to by the ABCI goroutine and read-from gRPC query goroutines. The stack trace shows that checkState
is written-to in Commit
, and read-from in CreateQueryContext
. There may be more fields though.
As a workaround, we only these tests without -race
.
Cosmos SDK Version
v0.50.10
How to reproduce?
Run this test but remove the -race
build flag and run with go test -race
.
Metadata
Assignees
Type
Projects
Status
🤸♂️ In Progress
Activity