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

cl: race in tests #12484

Open
AskAlexSharov opened this issue Oct 25, 2024 · 0 comments
Open

cl: race in tests #12484

AskAlexSharov opened this issue Oct 25, 2024 · 0 comments
Assignees
Labels

Comments

@AskAlexSharov
Copy link
Collaborator

AskAlexSharov commented Oct 25, 2024

go test -race ./cl/...

main 9756fc70498120f2e5ffa00a510c301e91a2eaa3

==================
WARNING: DATA RACE
Write at 0x00c000e18000 by goroutine 293:
  runtime.slicecopy()
      /usr/local/go/src/runtime/slice.go:325 +0x0
  github.com/erigontech/erigon/cl/merkle_tree.(*MerkleTree).MarkLeafAsDirty()
      /home/ubuntu/erigon/cl/merkle_tree/merkle_tree.go:70 +0x2bc
  github.com/erigontech/erigon/cl/cltypes/solid.(*byteBasedUint64Slice).Set()
      /home/ubuntu/erigon/cl/cltypes/solid/uint64slice_byte.go:163 +0xa6
  github.com/erigontech/erigon/cl/cltypes/solid.(*uint64ListSSZ).Set()
      /home/ubuntu/erigon/cl/cltypes/solid/uint64_list.go:83 +0x49
  github.com/erigontech/erigon/cl/phase1/core/state/raw.(*BeaconState).SetValidatorBalance()
      /home/ubuntu/erigon/cl/phase1/core/state/raw/setters.go:255 +0x1cf
  github.com/erigontech/erigon/cl/phase1/core/state.(*CachingBeaconState).SetValidatorBalance()
      <autogenerated>:1 +0x5b
  github.com/erigontech/erigon/cl/phase1/core/state.IncreaseBalance()
      /home/ubuntu/erigon/cl/phase1/core/state/mutators.go:26 +0x8c
  github.com/erigontech/erigon/cl/transition/impl/eth2/statechange.processRewardsAndPenaltiesPostAltair.func1()
      /home/ubuntu/erigon/cl/transition/impl/eth2/statechange/process_rewards_and_penalties.go:129 +0x4fa
  github.com/erigontech/erigon/cl/utils/threading.ParallellForLoop.func1()
      /home/ubuntu/erigon/cl/utils/threading/worker_pool.go:70 +0x5e
  github.com/erigontech/erigon/cl/utils/threading.(*WorkerPool).StartWorker()
      /home/ubuntu/erigon/cl/utils/threading/worker_pool.go:37 +0x9e
  github.com/erigontech/erigon/cl/utils/threading.CreateWorkerPool.gowrap1()
      /home/ubuntu/erigon/cl/utils/threading/worker_pool.go:21 +0x33

Previous write at 0x00c000e18000 by goroutine 294:
  runtime.slicecopy()
      /usr/local/go/src/runtime/slice.go:325 +0x0
  github.com/erigontech/erigon/cl/merkle_tree.(*MerkleTree).MarkLeafAsDirty()
      /home/ubuntu/erigon/cl/merkle_tree/merkle_tree.go:70 +0x2bc
  github.com/erigontech/erigon/cl/cltypes/solid.(*byteBasedUint64Slice).Set()
      /home/ubuntu/erigon/cl/cltypes/solid/uint64slice_byte.go:163 +0xa6
  github.com/erigontech/erigon/cl/cltypes/solid.(*uint64ListSSZ).Set()
      /home/ubuntu/erigon/cl/cltypes/solid/uint64_list.go:83 +0x49
  github.com/erigontech/erigon/cl/phase1/core/state/raw.(*BeaconState).SetValidatorBalance()
      /home/ubuntu/erigon/cl/phase1/core/state/raw/setters.go:255 +0x1cf
  github.com/erigontech/erigon/cl/phase1/core/state.(*CachingBeaconState).SetValidatorBalance()
      <autogenerated>:1 +0x5b
  github.com/erigontech/erigon/cl/phase1/core/state.DecreaseBalance()
      /home/ubuntu/erigon/cl/phase1/core/state/mutators.go:38 +0x9a
  github.com/erigontech/erigon/cl/transition/impl/eth2/statechange.processRewardsAndPenaltiesPostAltair.func1()
      /home/ubuntu/erigon/cl/transition/impl/eth2/statechange/process_rewards_and_penalties.go:132 +0x544
  github.com/erigontech/erigon/cl/utils/threading.ParallellForLoop.func1()
      /home/ubuntu/erigon/cl/utils/threading/worker_pool.go:70 +0x5e
  github.com/erigontech/erigon/cl/utils/threading.(*WorkerPool).StartWorker()
      /home/ubuntu/erigon/cl/utils/threading/worker_pool.go:37 +0x9e
  github.com/erigontech/erigon/cl/utils/threading.CreateWorkerPool.gowrap1()
      /home/ubuntu/erigon/cl/utils/threading/worker_pool.go:21 +0x33

==================
--- FAIL: TestBlockProcessing (0.58s)
==================
WARNING: DATA RACE
Write at 0x00c0033ce060 by goroutine 28:
  github.com/erigontech/erigon/cl/sentinel.(*GossipSubscription).Close.func1()
      /home/ubuntu/erigon/cl/sentinel/gossip.go:605 +0x27d
  sync.(*Once).doSlow()
      /usr/local/go/src/sync/once.go:74 +0xf0
  sync.(*Once).Do()
      /usr/local/go/src/sync/once.go:65 +0x44
  github.com/erigontech/erigon/cl/sentinel.(*GossipSubscription).Close()
      /home/ubuntu/erigon/cl/sentinel/gossip.go:589 +0xe4
  github.com/erigontech/erigon/cl/sentinel.(*Sentinel).Stop.(*GossipManager).Close.func2()
      /home/ubuntu/erigon/cl/sentinel/gossip.go:492 +0x44
  sync.(*Map).Range()
      /usr/local/go/src/sync/map.go:477 +0x1e5
  github.com/erigontech/erigon/cl/sentinel.(*GossipManager).Close()
      /home/ubuntu/erigon/cl/sentinel/gossip.go:490 +0xcc
  github.com/erigontech/erigon/cl/sentinel.(*Sentinel).Stop()
      /home/ubuntu/erigon/cl/sentinel/sentinel.go:352 +0x46
  github.com/erigontech/erigon/cl/sentinel.TestSentinelGossipOnHardFork.deferwrap2()
      /home/ubuntu/erigon/cl/sentinel/sentinel_gossip_test.go:82 +0x33
  runtime.deferreturn()
      /usr/local/go/src/runtime/panic.go:602 +0x5d
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /usr/local/go/src/testing/testing.go:1742 +0x44

Previous read at 0x00c0033ce060 by goroutine 1292:
  github.com/erigontech/erigon/cl/sentinel.(*GossipManager).Start.func1.2()
      /home/ubuntu/erigon/cl/sentinel/gossip.go:516 +0x7a
  sync.(*Map).Range()
      /usr/local/go/src/sync/map.go:477 +0x1e5
  github.com/erigontech/erigon/cl/sentinel.(*GossipManager).Start.func1()
      /home/ubuntu/erigon/cl/sentinel/gossip.go:514 +0x20f
==================
--- FAIL: TestSentinelGossipOnHardFork (11.05s)
==================
WARNING: DATA RACE
Write at 0x000003a6f8d0 by goroutine 8519:
  github.com/erigontech/erigon/cl/phase1/network/services.(*blsToExecutionChangeTestSuite).SetupTest()
      /home/ubuntu/erigon/cl/phase1/network/services/bls_to_execution_change_service_test.go:61 +0x851
  github.com/erigontech/erigon/cl/phase1/network/services.(*blsToExecutionChangeTestSuite).TestProcessMessage()
      /home/ubuntu/erigon/cl/phase1/network/services/bls_to_execution_change_service_test.go:216 +0xc11
  runtime.call16()
      /usr/local/go/src/runtime/asm_amd64.s:770 +0x42
  reflect.Value.Call()
      /usr/local/go/src/reflect/value.go:380 +0xb5
  github.com/stretchr/testify/suite.Run.func1()
      /home/ubuntu/go/pkg/mod/github.com/stretchr/[email protected]/suite/suite.go:202 +0x6f1
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /usr/local/go/src/testing/testing.go:1742 +0x44

Previous read at 0x000003a6f8d0 by goroutine 8521:
  github.com/erigontech/erigon/cl/phase1/network/services.(*BatchSignatureVerifier).start()
      /home/ubuntu/erigon/cl/phase1/network/services/batch_signature_verification.go:80 +0x50
  github.com/erigontech/erigon/cl/phase1/network/services.(*BatchSignatureVerifier).Start.gowrap1()
      /home/ubuntu/erigon/cl/phase1/network/services/batch_signature_verification.go:72 +0x44
==================
WARNING: DATA RACE
Write at 0x00c0006dfa70 by goroutine 1240:
  github.com/erigontech/erigon/cl/beacon/handler.(*ApiHandler).getDutiesProposer.func1()
      /home/ubuntu/erigon/cl/beacon/handler/duties_proposer.go:132 +0x450
  github.com/erigontech/erigon/cl/beacon/handler.(*ApiHandler).getDutiesProposer.gowrap2()
      /home/ubuntu/erigon/cl/beacon/handler/duties_proposer.go:141 +0xd9

Previous write at 0x00c0006dfa70 by goroutine 1227:
  github.com/erigontech/erigon/cl/beacon/handler.(*ApiHandler).getDutiesProposer.func1()
      /home/ubuntu/erigon/cl/beacon/handler/duties_proposer.go:132 +0x450
  github.com/erigontech/erigon/cl/beacon/handler.(*ApiHandler).getDutiesProposer.gowrap2()
      /home/ubuntu/erigon/cl/beacon/handler/duties_proposer.go:141 +0xd9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants
@shotasilagadze @VBulikov @AskAlexSharov and others