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

client: StorageFetcher Doesn't Terminate Gracefully #3220

Open
scorbajio opened this issue Jan 9, 2024 · 0 comments
Open

client: StorageFetcher Doesn't Terminate Gracefully #3220

scorbajio opened this issue Jan 9, 2024 · 0 comments

Comments

@scorbajio
Copy link
Contributor

scorbajio commented Jan 9, 2024

Currently, during snap sync, if the client is terminated using ctr-c, the StorageFetcher attempts to use the database when it's not open:

2024-01-09T01:10:24.786Z client:StorageFetcher Entering nextTasks with primary queue length of 0 and secondary queue length of 0
2024-01-09T01:10:24.786Z client:StorageFetcher Storage requests in primary queue:
2024-01-09T01:10:24.786Z client:StorageFetcher Storage requests in secondary queue:
2024-01-09T01:10:24.786Z client:StorageFetcher No idle peer available, skip next job execution.
[01-08|18:10:24] INFO Caught interrupt signal. Obtaining client handle for clean shutdown...
[01-08|18:10:24] INFO (This might take a little longer if client not yet fully started)
[01-08|18:10:24] INFO Shutting down the client and the servers...
[01-08|18:10:24] INFO Stopped execution.
2024-01-09T01:10:24.847Z client:StorageFetcher Error: Database is not open
    at maybeError (/home/indigoomega021/code/projects/eth/ethjs-lodestar/ethereumjs-monorepo/node_modules/abstract-level/abstract-level.js:806:27)
    at ClassicLevel.get (/home/indigoomega021/code/projects/eth/ethjs-lodestar/ethereumjs-monorepo/node_modules/abstract-level/abstract-level.js:282:9)
    at LevelDB.get (/home/indigoomega021/code/projects/eth/ethjs-lodestar/ethereumjs-monorepo/packages/client/dist/src/execution/level.js:55:41)
    at CheckpointDB.get (/home/indigoomega021/code/projects/eth/ethjs-lodestar/ethereumjs-monorepo/packages/trie/dist/cjs/db/checkpoint.js:127:37)
    at Trie.lookupNode (/home/indigoomega021/code/projects/eth/ethjs-lodestar/ethereumjs-monorepo/packages/trie/dist/cjs/trie.js:420:39)
    at /home/indigoomega021/code/projects/eth/ethjs-lodestar/ethereumjs-monorepo/packages/trie/dist/cjs/util/walkController.js:41:40
    at new Promise (<anonymous>)
    at WalkController.startWalk (/home/indigoomega021/code/projects/eth/ethjs-lodestar/ethereumjs-monorepo/packages/trie/dist/cjs/util/walkController.js:36:16)
    at WalkController.newWalk (/home/indigoomega021/code/projects/eth/ethjs-lodestar/ethereumjs-monorepo/packages/trie/dist/cjs/util/walkController.js:32:24)
    at Trie.walkTrie (/home/indigoomega021/code/projects/eth/ethjs-lodestar/ethereumjs-monorepo/packages/trie/dist/cjs/trie.js:372:50)
[01-08|18:10:24] WARN Error storing received block or header result: Error: Database is not open
2024-01-09T01:10:24.854Z client:StorageFetcher Cleared out fetcher total=3 processed=1 finished=0
[01-08|18:10:24] WARN Error storing received block or header result: Error: Database is not open
[01-08|18:10:24] INFO Stopped eth service.
[01-08|18:10:24] INFO Stopped rlpx server.
[01-08|18:10:24] INFO Exiting.

To recreate the issue, run the ethjs snap sync devnet. For help, see this PR.

@scorbajio scorbajio changed the title StorageFetcher Doesn't Terminate Gracefully client: StorageFetcher Doesn't Terminate Gracefully Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant