pgref.dev/sqlite/errors/SQLITE_IOERR_DATA
SQLITE_IOERR_DATAFATALTier 3 — Handle with care⚠️ MEDIUM confidence

I/O error: data integrity check failed

Category: I/O ErrorVersions: 3.35.0+

🔴 Production Risk Error

Critical — physical storage corruption; restore from backup.

What this means

SQLITE_IOERR_DATA (8202) is returned when a hardware-level data integrity check (such as NVMe end-to-end data protection) detects corrupted data during a read. The data read from the storage device does not match its stored checksum.

Why it happens

  1. 1NVMe or SCSI end-to-end data protection detected a checksum mismatch.
  2. 2Storage device returned corrupt data (bit rot, bad sector).

How to reproduce

Read operations on storage with end-to-end data protection enabled.

trigger — this will ERROR
# Surfaces as:
# sqlite3.DatabaseError: disk I/O error
# Check system logs: dmesg | grep -i nvme
sqlite3.DatabaseError: disk I/O error

Fix 1

Why this works

Check system logs for storage controller errors: dmesg | grep -i ioerr

Fix 2

Why this works

Run SMART diagnostics: smartctl -a /dev/nvme0

Fix 3

Why this works

Restore from backup — the data on disk is physically corrupt.

Version notes

Sources

📚 Official docs: https://www.sqlite.org/rescode.html#ioerr_data

🔧 Source ref: sqlite3.h — SQLITE_IOERR_DATA = 8202

Confidence assessment

⚠️ MEDIUM confidence

Stable.

See also

⚙️ This error reference was generated with AI assistance and reviewed for accuracy. Examples are provided to illustrate common scenarios and may not cover every case. Always test fixes in a development environment before applying to production. Spotted an error? Suggest a correction →