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 data race in cometbft server OE #22891

Closed
julienrbrt opened this issue Dec 16, 2024 · 0 comments · Fixed by #22892
Closed

Fix data race in cometbft server OE #22891

julienrbrt opened this issue Dec 16, 2024 · 0 comments · Fixed by #22892
Assignees

Comments

@julienrbrt
Copy link
Member

ref: https://github.com/cosmos/cosmos-sdk/actions/runs/12352402806/job/34469368664?pr=22885

==================
WARNING: DATA RACE
Read at 0x00c000a683a0 by goroutine 384:
  encoding/hex.Encode()
      /opt/hostedtoolcache/go/1.23.4/x64/src/encoding/hex/hex.go:47 +0xa9
  encoding/hex.EncodeToString()
      /opt/hostedtoolcache/go/1.23.4/x64/src/encoding/hex/hex.go:128 +0x4a
  cosmossdk.io/server/v2/cometbft/oe.(*OptimisticExecution[go.shape.struct { Sender []uint8; Msg interface { ProtoMessage(); Reset(); String() string }; GasLimit uint64 }]).Execute.func1()
      /home/runner/work/cosmos-sdk/cosmos-sdk/server/v2/cometbft/oe/optimistic_execution.go:118 +0x1c8

Previous write at 0x00c000a683a0 by goroutine 367:
  cosmossdk.io/server/v2/cometbft.TestOptimisticExecution()
      /home/runner/work/cosmos-sdk/cosmos-sdk/server/v2/cometbft/abci_test.go:962 +0xa74
  testing.tRunner()
      /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1690 +0x226
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1743 +0x44

Goroutine 384 (running) created at:
  cosmossdk.io/server/v2/cometbft/oe.(*OptimisticExecution[go.shape.struct { Sender []uint8; Msg interface { ProtoMessage(); Reset(); String() string }; GasLimit uint64 }]).Execute()
      /home/runner/work/cosmos-sdk/cosmos-sdk/server/v2/cometbft/oe/optimistic_execution.go:111 +0xb8b
  cosmossdk.io/server/v2/cometbft.(*consensus[go.shape.struct { Sender []uint8; Msg interface { ProtoMessage(); Reset(); String() string }; GasLimit uint64 }]).ProcessProposal()
      /home/runner/work/cosmos-sdk/cosmos-sdk/server/v2/cometbft/abci.go:452 +0xe50
  cosmossdk.io/server/v2/cometbft.TestOptimisticExecution()
      /home/runner/work/cosmos-sdk/cosmos-sdk/server/v2/cometbft/abci_test.go:957 +0x98d
  testing.tRunner()
      /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1690 +0x226
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1743 +0x44

Goroutine 367 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1743 +0x825
  testing.runTests.func1()
      /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:2168 +0x85
  testing.tRunner()
      /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:1690 +0x226
  testing.runTests()
      /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:2166 +0x8be
  testing.(*M).Run()
      /opt/hostedtoolcache/go/1.23.4/x64/src/testing/testing.go:2034 +0xf17
  main.main()
      _testmain.go:83 +0x[164](https://github.com/cosmos/cosmos-sdk/actions/runs/12352402806/job/34469368664?pr=22885#step:5:165)
==================
--- FAIL: TestOptimisticExecution (0.00s)
    testing.go:1399: race detected during execution of test
FAIL
exit status 1
FAIL	cosmossdk.io/server/v2/cometbft	0.349s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🥳 Done
Development

Successfully merging a pull request may close this issue.

2 participants