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

snapshot: fix race in abort/generate #1155

Merged
merged 1 commit into from
Apr 18, 2024
Merged

Conversation

darioush
Copy link
Collaborator

Excerpts from https://github.com/ava-labs/subnet-evm/actions/runs/8725583610/job/23938886724?pr=1154

Previous write at 0x00c0075f5590 by goroutine 14701:
  github.com/ava-labs/subnet-evm/core/state/snapshot.(*diskLayer).generate()
      /home/runner/work/subnet-evm/subnet-evm/core/state/snapshot/generate.go:402 +0x238e
  github.com/ava-labs/subnet-evm/core/state/snapshot.generateSnapshot.func1()
      /home/runner/work/subnet-evm/subnet-evm/core/state/snapshot/generate.go:160 +0x44

Goroutine 14701 (running) created at:
  github.com/ava-labs/subnet-evm/core/state/snapshot.generateSnapshot()
      /home/runner/work/subnet-evm/subnet-evm/core/state/snapshot/generate.go:160 +0x71b
  github.com/ava-labs/subnet-evm/core/state/snapshot.(*Tree).Rebuild()
      /home/runner/work/subnet-evm/subnet-evm/core/state/snapshot/snapshot.go:784 +0x4a6
  github.com/ava-labs/subnet-evm/core/state/snapshot.New()
      /home/runner/work/subnet-evm/subnet-evm/core/state/snapshot/snapshot.go:227 +0x571
  github.com/ava-labs/subnet-evm/core.(*BlockChain).initSnapshot()
      /home/runner/work/subnet-evm/subnet-evm/core/blockchain.go:1880 +0x6bc
  github.com/ava-labs/subnet-evm/core.(*BlockChain).reprocessState()
      /home/runner/work/subnet-evm/subnet-evm/core/blockchain.go:1982 +0x1564
  github.com/ava-labs/subnet-evm/core.(*BlockChain).loadLastState()
Read at 0x00c0075f5590 by goroutine 14527:
  github.com/ava-labs/subnet-evm/core/state/snapshot.(*diskLayer).abortGeneration()
      /home/runner/work/subnet-evm/subnet-evm/core/state/snapshot/snapshot.go:580 +0x18d
  github.com/ava-labs/subnet-evm/core/state/snapshot.(*Tree).AbortGeneration()
      /home/runner/work/subnet-evm/subnet-evm/core/state/snapshot/snapshot.go:564 +0x97
  github.com/ava-labs/subnet-evm/core.(*BlockChain).flattenSnapshot()
      /home/runner/work/subnet-evm/subnet-evm/core/blockchain.go:5[94](https://github.com/ava-labs/subnet-evm/actions/runs/8725583610/job/23938886724?pr=1154#step:6:95) +0x88
  github.com/ava-labs/subnet-evm/core.(*BlockChain).reprocessState()
      /home/runner/work/subnet-evm/subnet-evm/core/blockchain.go:19[95](https://github.com/ava-labs/subnet-evm/actions/runs/8725583610/job/23938886724?pr=1154#step:6:96) +0x16d1
  github.com/ava-labs/subnet-evm/core.(*BlockChain).loadLastState()
      /home/runner/work/subnet-evm/subnet-evm/core/blockchain.go:816 +0xcf6
  github.com/ava-labs/subnet-evm/core.NewBlockChain()

@darioush darioush requested a review from ceyonur as a code owner April 17, 2024 19:54
@darioush darioush merged commit cd53e86 into master Apr 18, 2024
9 checks passed
@darioush darioush deleted the take-lock-snapshot-abort branch April 18, 2024 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants