denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
97k stars 5.36k forks source link

Receiving an issue while using deno: KV collect expired failed: database disk image is malformed #21990

Open mcgear opened 9 months ago

mcgear commented 9 months ago

I am receiving an error and it told me to post it here, sorry if it should be posted in denoKv

2024-01-18T20:28:07.592702027Z Deno has panicked. This is a bug in Deno. Please report this
2024-01-18T20:28:07.592705627Z at https://github.com/denoland/deno/issues/new.
2024-01-18T20:28:07.592709227Z If you can reliably reproduce this panic, include the
2024-01-18T20:28:07.595724140Z reproduction steps and re-run with the RUST_BACKTRACE=1 env
2024-01-18T20:28:07.595740840Z var set and include the backtrace in your report.
2024-01-18T20:28:07.595745940Z
2024-01-18T20:28:07.595749540Z Platform: linux x86_64
2024-01-18T20:28:07.595753240Z Version: 1.38.3
2024-01-18T20:28:07.612258110Z Args: ["deno<unnamed>", ' panicked at "run/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/denokv_sqlite-0.2.1/lib.rs", :137:17:
2024-01-18T20:28:07.613381214Z "KV collect expired failed: database disk image is malformed-A
2024-01-18T20:28:07.613923617Z "stack backtrace:
2024-01-18T20:28:07.613940017Z , "--unstable", "main.ts"]
2024-01-18T20:28:07.613944317Z
2024-01-18T20:28:07.613947917Z thread '<unnamed>' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/denokv_sqlite-0.2.1/lib.rs:137:17:
2024-01-18T20:28:07.614546519Z KV collect expired failed: database disk image is malformed
2024-01-18T20:28:07.777222905Z Using snapshot found at /app/_fresh
2024-01-18T20:28:07.809555642Z
2024-01-18T20:28:07.810283845Z  🍋 Fresh ready 
2024-01-18T20:28:07.810305745Z     Local: http://localhost:8000/
2024-01-18T20:28:07.810313045Z
2024-01-18T20:28:07.928877845Z    0: rust_begin_unwind
2024-01-18T20:28:07.934042267Z              at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:597:5
2024-01-18T20:28:07.934061867Z    1: core::panicking::panic_fmt
2024-01-18T20:28:07.934067367Z              at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/panicking.rs:72:14
2024-01-18T20:28:07.944977913Z    2: denokv_sqlite::sqlite_thread::{{closure}}
2024-01-18T20:28:07.947630424Z note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
2024-01-18T20:28:07.952122443Z stack backtrace:
2024-01-18T20:28:07.952744246Z    0: rust_begin_unwind
2024-01-18T20:28:07.962813388Z              at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:597:5
2024-01-18T20:28:07.962834488Z    1: core::panicking::panic_fmt
2024-01-18T20:28:07.962839788Z              at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/panicking.rs:72:14
2024-01-18T20:28:08.248307689Z
2024-01-18T20:28:08.366Z ERROR - Container biotech-manager-web_0_1a976689 for site biotech-manager-web has exited, failing site start
2024-01-18T20:28:08.376Z ERROR - Container biotech-manager-web_0_1a976689 didn't respond to HTTP pings on port: 8000, failing site start. See container logs for debugging.
2024-01-18T20:28:08.402Z INFO  - Stopping site biotech-manager-web because it failed during startup.
losfair commented 4 months ago

From the error message it looks like the backing SQLite database was corrupted. This can happen if e.g. the filesystem has broken file locking support (like NFS), the database file was copied when open, or copied without also copying the -wal file

Is this error persistent or did it only happen once? Could you run the mount command and provide its outputs?