Skip to content

storage: opening a live sessions.db with the sqlite3 CLI makes the daemon report disk I/O errors / corrupt the file #4513

Open

Description

@ScriptedAlchemy

Observed

During the #4497 verification (isolated daemon, release build), opening a live sessions.db with the sqlite3 CLI while the daemon was running was followed each time by the daemon failing with disk I/O error, and once the file later reported file is not a database.

Why it matters

Users and agents routinely inspect stores with sqlite3 while the daemon runs. A WAL-mode SQLite database should tolerate a concurrent external reader. If the daemon's locking/VFS/WAL settings (exclusive locking mode, custom VFS, checkpoint/truncate behavior, PRAGMA choices) make an external reader corrupt the store, that is data loss.

Expected

Either an external read-only sqlite3 session is safe, or the daemon refuses it with a clear lock error; it must never corrupt the store. Reproduce with a controlled test and identify which setting allows it. Related: #4152, #4481 (corruption warnings).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions