deno-sqlite
deno-sqlite copied to clipboard
can't remove journal
Looks like some internal code is trying to remove a file that doesn't exist:
error: Uncaught (in promise) NotFound: No such file or directory (os error 2), remove 'database.sqlite-journal'
Deno.removeSync(path);
error: Uncaught (in promise) NotFound: No such file or directory (os error 2), remove 'database.sqlite-journal'
Deno.removeSync(path);
^
at Object.opSync (deno:core/01_core.js:172:12)
at Object.removeSync (deno:runtime/js/30_fs.js:150:10)
at js_delete (https://deno.land/x/[email protected]/build/vfs.js:39:12)
at denoDelete (wasm://wasm/002a4c4a:1:3036)
at pager_end_transaction (wasm://wasm/002a4c4a:1:37798)
at sqlite3BtreeCommitPhaseTwo (wasm://wasm/002a4c4a:1:28832)
at sqlite3VdbeHalt (wasm://wasm/002a4c4a:1:45083)
at sqlite3VdbeExec (wasm://wasm/002a4c4a:1:55654)
at sqlite3_step (wasm://wasm/002a4c4a:1:53139)
at step (wasm://wasm/002a4c4a:1:4377)
Do you have a minimal example to reproduce the issue?
Closing, since I could not reproduce the issue locally.
I encouter this issue as well. It's quite often to reproduce, but not deterministic. @dyedgreen
I encouter this issue as well. It's quite often to reproduce, but not deterministic. @dyedgreen
+1
I have also seen this issue a few times, but I am unable to reproduce it. When doing back to back inserts, I first see
No such file or directory (os error 2): remove '<mydbname>.db-journal'
at Object.removeSync (ext:deno_fs/30_fs.js:197:7)
at js_delete (https://deno.land/x/[email protected]/build/vfs.js:39:12)
at <anonymous> (wasm://wasm/0027cea2:1:5584)
at <anonymous> (wasm://wasm/0027cea2:1:86601)
at <anonymous> (wasm://wasm/0027cea2:1:77100)
at <anonymous> (wasm://wasm/0027cea2:1:173629)
at <anonymous> (wasm://wasm/0027cea2:1:92188)
at <anonymous> (wasm://wasm/0027cea2:1:63017)
at <anonymous> (wasm://wasm/0027cea2:1:28077)
at <anonymous> (wasm://wasm/0027cea2:1:114672) {
name: "NotFound",
code: "ENOENT"
followed by
RuntimeError: memory access out of bounds
at <anonymous> (wasm://wasm/0027cea2:1:87936)
at <anonymous> (wasm://wasm/0027cea2:1:176457)
at <anonymous> (wasm://wasm/0027cea2:1:63257)
at <anonymous> (wasm://wasm/0027cea2:1:28077)
at <anonymous> (wasm://wasm/0027cea2:1:114672)
at <anonymous> (wasm://wasm/0027cea2:1:4218)
at <anonymous> (wasm://wasm/0027cea2:1:602494)
at https://deno.land/x/[email protected]/src/db.ts:399:27
at setStr (https://deno.land/x/[email protected]/src/wasm.ts:19:20)
at DB.execute (https://deno.land/x/[email protected]/src/db.ts:396:20)
After this, the inserts appear to succeed but nothing is actually persisted to the database.
I see two issues that might be related: https://github.com/dyedgreen/deno-sqlite/issues/143 and https://github.com/dyedgreen/deno-sqlite/issues/149. Would running with --unstable
potentially fix this? It looks like the file locking api might still be unstable https://deno.land/[email protected]?unstable&s=Deno.flock