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

BlockImporter Error: worker died, SQLITE_CORRUPT #197

Open
ThomasBlock opened this issue Sep 7, 2024 · 2 comments
Open

BlockImporter Error: worker died, SQLITE_CORRUPT #197

ThomasBlock opened this issue Sep 7, 2024 · 2 comments

Comments

@ThomasBlock
Copy link

Hi. after a reboot my gateway seems to be in a broken state. i see this messages for block 1246846 in an endless loop.

can i somehow debug or should i delete all docker volumes?

core_1        | error: Error in StandaloneSqlite worker: database disk image is malformed {"code":"SQLITE_CORRUPT","stack":"SqliteError: database disk image is malformed\n    at StandaloneSqliteDatabaseWorker.<anonymous> (file:///app/dist/database/standalone-sqlite.js:419:60)\n    at StandaloneSqliteDatabaseWorker.sqliteTransaction [as insertBlockAndTxsFn] (/app/node_modules/better-sqlite3/lib/methods/transaction.js:65:24)\n    at StandaloneSqliteDatabaseWorker.saveBlockAndTxs (file:///app/dist/database/standalone-sqlite.js:623:14)\n    at MessagePort.<anonymous> (file:///app/dist/database/standalone-sqlite.js:1935:28)\n    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:820:20)\n    at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28)","timestamp":"2024-09-07T08:15:43.935Z"}
core_1        | error: Error importing block at height 1246846 Worker error {"class":"BlockImporter","stack":"Error: Worker error\n    at Worker.<anonymous> (file:///app/dist/database/standalone-sqlite.js:1619:32)\n    at Worker.emit (node:events:519:28)\n    at MessagePort.<anonymous> (node:internal/worker:263:53)\n    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:820:20)\n    at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28)","timestamp":"2024-09-07T08:15:43.935Z"}
core_1        | error: Uncaught exception: Worker error {"stack":"Error: Worker error\n    at Worker.<anonymous> (file:///app/dist/database/standalone-sqlite.js:1619:32)\n    at Worker.emit (node:events:519:28)\n    at MessagePort.<anonymous> (node:internal/worker:263:53)\n    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:820:20)\n    at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28)","timestamp":"2024-09-07T08:15:43.936Z"}
core_1        | info: Importing block... {"class":"BlockImporter","height":1246846,"timestamp":"2024-09-07T08:15:43.986Z"}
core_1        | error: Too many errors in StandaloneSqlite worker, exiting. {"timestamp":"2024-09-07T08:15:44.071Z"}
core_1        | error: Worker stopped with exit code 1 {"class":"StandaloneSqliteDatabase","exitCode":1,"timestamp":"2024-09-07T08:15:44.074Z"}
core_1        | error: Error importing block at height 1246846 worker died {"class":"BlockImporter","stack":"Error: worker died\n    at Worker.<anonymous> (file:///app/dist/database/standalone-sqlite.js:1634:41)\n    at Worker.emit (node:events:519:28)\n    at [kOnExit] (node:internal/worker:315:10)\n    at Worker.<computed>.onexit (node:internal/worker:229:20)","timestamp":"2024-09-07T08:15:44.074Z"}
core_1        | error: Uncaught exception: worker died {"stack":"Error: worker died\n    at Worker.<anonymous> (file:///app/dist/database/standalone-sqlite.js:1634:41)\n    at Worker.emit (node:events:519:28)\n    at [kOnExit] (node:internal/worker:315:10)\n    at Worker.<computed>.onexit (node:internal/worker:229:20)","timestamp":"2024-09-07T08:15:44.074Z"}
@ThomasBlock
Copy link
Author

one way to solve:

rm data/sqlite/*
info: Importing block... {"class":"BlockImporter","height":214,"timestamp":"2024-09-07T22:41:05.990Z"}

lets see how long it takes..

@ThomasBlock
Copy link
Author

After some months without problems, my node got again randomly corrupted ..

core_1        | error: Worker error {"class":"StandaloneSqliteDatabase","code":"SQLITE_ERROR","timestamp":"2024-11-27T07:06:54.463Z"}
core_1        | error: Worker error {"class":"StandaloneSqliteDatabase","code":"SQLITE_ERROR","timestamp":"2024-11-27T07:06:54.472Z"}
core_1        | error: Worker error {"class":"StandaloneSqliteDatabase","code":"SQLITE_ERROR","timestamp":"2024-11-27T07:06:54.476Z"}
core_1        | error: Worker error {"class":"StandaloneSqliteDatabase","code":"SQLITE_ERROR","timestamp":"2024-11-27T07:06:54.502Z"}
core_1        | error: Worker stopped with exit code 1 {"class":"StandaloneSqliteDatabase","exitCode":1,"timestamp":"2024-11-27T07:06:54.505Z"}
core_1        | error: Worker stopped with exit code 1 {"class":"StandaloneSqliteDatabase","exitCode":1,"timestamp":"2024-11-27T07:06:54.517Z"}
core_1        | error: Worker stopped with exit code 1 {"class":"StandaloneSqliteDatabase","exitCode":1,"timestamp":"2024-11-27T07:06:54.560Z"}
core_1        | error: Worker error {"class":"StandaloneSqliteDatabase","code":"SQLITE_ERROR","timestamp":"2024-11-27T07:06:54.564Z"}
core_1        | error: Worker stopped with exit code 1 {"class":"StandaloneSqliteDatabase","exitCode":1,"timestamp":"2024-11-27T07:06:54.586Z"}
core_1        | error: Worker stopped with exit code 1 {"class":"StandaloneSqliteDatabase","exitCode":1,"timestamp":"2024-11-27T07:06:54.616Z"}
core_1        | error: Worker error {"class":"StandaloneSqliteDatabase","code":"SQLITE_ERROR","timestamp":"2024-11-27T07:06:54.646Z"}
core_1        | error: Worker stopped with exit code 1 {"class":"StandaloneSqliteDatabase","exitCode":1,"timestamp":"2024-11-27T07:06:54.757Z"}
core_1        | error: Worker error {"class":"StandaloneSqliteDatabase","code":"SQLITE_ERROR","timestamp":"2024-11-27T07:06:55.353Z"}
core_1        | error: Worker error {"class":"StandaloneSqliteDatabase","code":"SQLITE_ERROR","timestamp":"2024-11-27T07:06:55.355Z"}
core_1        | error: Worker error {"class":"StandaloneSqliteDatabase","code":"SQLITE_ERROR","timestamp":"2024-11-27T07:06:55.356Z"}
core_1        | error: Worker stopped with exit code 1 {"class":"StandaloneSqliteDatabase","exitCode":1,"timestamp":"2024-11-27T07:06:55.383Z"}
core_1        | error: Worker stopped with exit code 1 {"class":"StandaloneSqliteDatabase","exitCode":1,"timestamp":"2024-11-27T07:06:55.385Z"}
core_1        | error: Worker stopped with exit code 1 {"class":"StandaloneSqliteDatabase","exitCode":1,"timestamp":"2024-11-27T07:06:55.393Z"}
core_1        | error: Error retrying missing transactions: {"class":"TransactionRepairWorker","code":"SQLITE_ERROR","timestamp":"2024-11-27T07:06:55.394Z"}
core_1        | error: Uncaught exception: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>". {"code":"ERR_UNHANDLED_REJECTION","name":"UnhandledPromiseRejection","stack":"UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason \"#<Object>\".\n    at throwUnhandledRejectionsMode (node:internal/process/promises:389:7)\n    at processPromiseRejections (node:internal/process/promises:470:17)\n    at process.processTicksAndRejections (node:internal/process/task_queues:96:32)","timestamp":"2024-11-27T07:06:55.394Z"}

this seems to help:

docker-compose down -v
docker system prune
rm -rf data/sqlite
docker-compose up -d

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

No branches or pull requests

1 participant