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

core/services/relay/evm: fix commit race #15212

Merged
merged 1 commit into from
Nov 13, 2024
Merged

core/services/relay/evm: fix commit race #15212

merged 1 commit into from
Nov 13, 2024

Conversation

jmank88
Copy link
Contributor

@jmank88 jmank88 commented Nov 12, 2024

https://github.com/smartcontractkit/chainlink/actions/runs/11803701580/job/32882272245

==================
WARNING: DATA RACE
Read at 0x00c001378400 by goroutine 936:
  github.com/ethereum/go-ethereum/eth/catalyst.(*SimulatedBeacon).sealBlock()
      /home/runner/go/pkg/mod/github.com/ethereum/[email protected]/eth/catalyst/simulated_beacon.go:153 +0x72
  github.com/ethereum/go-ethereum/eth/catalyst.(*SimulatedBeacon).Commit()
      /home/runner/go/pkg/mod/github.com/ethereum/[email protected]/eth/catalyst/simulated_beacon.go:281 +0xfa
  github.com/ethereum/go-ethereum/ethclient/simulated.(*Backend).Commit()
      /home/runner/go/pkg/mod/github.com/ethereum/[email protected]/ethclient/simulated/backend.go:160 +0x49
  github.com/smartcontractkit/chainlink/v2/core/internal/cltest.Mine.func1()
      /home/runner/work/chainlink/chainlink/core/internal/cltest/simulated_backend.go:105 +0x241

Previous write at 0x00c001378400 by goroutine 5772:
  github.com/ethereum/go-ethereum/eth/catalyst.(*SimulatedBeacon).sealBlock()
      /home/runner/go/pkg/mod/github.com/ethereum/[email protected]/eth/catalyst/simulated_beacon.go:232 +0x1418
  github.com/ethereum/go-ethereum/eth/catalyst.(*SimulatedBeacon).Commit()
      /home/runner/go/pkg/mod/github.com/ethereum/[email protected]/eth/catalyst/simulated_beacon.go:281 +0xfa
  github.com/ethereum/go-ethereum/ethclient/simulated.(*Backend).Commit()
      /home/runner/go/pkg/mod/github.com/ethereum/[email protected]/ethclient/simulated/backend.go:160 +0x52
  github.com/smartcontractkit/chainlink/v2/core/services/relay/evm_test.(*helper).Commit()
      /home/runner/work/chainlink/chainlink/core/services/relay/evm/chain_components_test.go:284 +0x1d
  github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/evmtesting.(*EVMChainComponentsInterfaceTester[go.shape.*uint8]).deployNewContract()
      /home/runner/work/chainlink/chainlink/core/services/relay/evm/evmtesting/chain_components_interface_tester.go:467 +0x1c9
  github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/evmtesting.(*EVMChainComponentsInterfaceTester[go.shape.*uint8]).deployNewContracts()
      /home/runner/work/chainlink/chainlink/core/services/relay/evm/evmtesting/chain_components_interface_tester.go:452 +0x165
  github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/evmtesting.(*EVMChainComponentsInterfaceTester[go.shape.*uint8]).Setup()
      /home/runner/work/chainlink/chainlink/core/services/relay/evm/evmtesting/chain_components_interface_tester.go:103 +0x556
  github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/evmtesting.(*EVMChainComponentsInterfaceTester[*testing.T]).Setup()
      /home/runner/work/chainlink/chainlink/core/services/relay/evm/evmtesting/chain_components_interface_tester.go:83 +0x44
  github.com/smartcontractkit/chainlink-common/pkg/types/interfacetests.RunTests[go.shape.*uint8].func1()
      /home/runner/go/pkg/mod/github.com/smartcontractkit/[email protected]/pkg/types/interfacetests/utils.go:62 +0x4c
  testing.tRunner()
      /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:[17](https://github.com/smartcontractkit/chainlink/actions/runs/11803701580/job/32882272245#step:19:18)42 +0x44

Goroutine 936 (running) created at:
  github.com/smartcontractkit/chainlink/v2/core/internal/cltest.Mine()
      /home/runner/work/chainlink/chainlink/core/internal/cltest/simulated_backend.go:100 +0x1e4
  github.com/smartcontractkit/chainlink/v2/core/services/relay/evm_test.(*helper).Backend()
      /home/runner/work/chainlink/chainlink/core/services/relay/evm/chain_components_test.go:277 +0x488
  github.com/smartcontractkit/chainlink/v2/core/services/relay/evm_test.(*helper).Init()
      /home/runner/work/chainlink/chainlink/core/services/relay/evm/chain_components_test.go:235 +0x12c
  github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/evmtesting.(*EVMChainComponentsInterfaceTester[go.shape.*uint8]).Init()
      /home/runner/work/chainlink/chainlink/core/services/relay/evm/evmtesting/chain_components_interface_tester.go:479 +0x55
  github.com/smartcontractkit/chainlink/v2/core/services/relay/evm_test.TestChainComponents()
      /home/runner/work/chainlink/chainlink/core/services/relay/evm/chain_components_test.go:210 +0x149
  testing.tRunner()
      /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1742 +0x44

Goroutine 5772 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1742 +0x825
  github.com/smartcontractkit/chainlink-common/pkg/types/interfacetests.RunTests[go.shape.*uint8]()
      /home/runner/go/pkg/mod/github.com/smartcontractkit/[email protected].[20](https://github.com/smartcontractkit/chainlink/actions/runs/11803701580/job/32882272245#step:19:21)241112140826-0e2daed34ef6/pkg/types/interfacetests/utils.go:61 +0x26a
  github.com/smartcontractkit/chainlink-common/pkg/types/interfacetests.runContractReaderGetLatestValueInterfaceTests[go.shape.*uint8]()
      /home/runner/go/pkg/mod/github.com/smartcontractkit/[email protected][21](https://github.com/smartcontractkit/chainlink/actions/runs/11803701580/job/32882272245#step:19:22)40826-0e2daed34ef6/pkg/types/interfacetests/chain_components_interface_tests.go:442 +0xcea
  github.com/smartcontractkit/chainlink-common/pkg/types/interfacetests.RunContractReaderInterfaceTests[go.shape.*uint8].func1()
      /home/runner/go/pkg/mod/github.com/smartcontractkit/[email protected]/pkg/types/interfacetests/chain_components_interface_tests.go:102 +0x79
  testing.tRunner()
      /opt/hostedtoolcache/go/1.[22](https://github.com/smartcontractkit/chainlink/actions/runs/11803701580/job/32882272245#step:19:23).8/x64/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.22.8/x64/src/testing/testing.go:1742 +0x44
==================

@jmank88 jmank88 requested review from a team as code owners November 12, 2024 19:12
@jmank88 jmank88 requested a review from chudilka1 November 12, 2024 19:12
@@ -236,7 +236,6 @@ func (h *helper) Init(t *testing.T) {
h.client = h.Client(t)

h.txm = h.TXM(t, h.client)
h.Commit()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The race was with the background miner, so we can just drop this.

@jmank88 jmank88 enabled auto-merge November 12, 2024 19:14
Copy link
Contributor

github-actions bot commented Nov 12, 2024

AER Report: CI Core ran successfully ✅

aer_workflow , commit

AER Report: Operator UI CI ran successfully ✅

aer_workflow , commit

@jmank88 jmank88 added this pull request to the merge queue Nov 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 12, 2024
@jmank88 jmank88 added this pull request to the merge queue Nov 12, 2024
Merged via the queue into develop with commit 61aa9af Nov 13, 2024
138 of 139 checks passed
@jmank88 jmank88 deleted the race-commit branch November 13, 2024 00:20
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.

3 participants