{"record":{"id":"3fb27783fa11586b","repo":"influxdata/influxdb","slug":"payload-crc32-mismatch-expected-expected-010x-computed","errorCode":null,"errorMessage":"payload CRC32 mismatch: expected {expected:#010x}, computed {computed:#010x}","messagePattern":"payload CRC32 mismatch: expected (.+?), computed (.+?)","errorType":"error_code","errorClass":"FormatError","httpStatus":null,"severity":"critical","filePath":"influxdb3_catalog/src/format/mod.rs","lineNumber":187,"sourceCode":"\n    /// Invalid magic bytes at start of file.\n    #[error(\"invalid magic bytes: expected {expected:?}, got {actual:?}\")]\n    InvalidMagic { expected: [u8; 4], actual: [u8; 4] },\n\n    /// Unsupported format version.\n    #[error(\"unsupported format version: {version}\")]\n    UnsupportedVersion { version: u32 },\n\n    /// Buffer too short for required data.\n    #[error(\"buffer too short: expected at least {expected} bytes, got {actual}\")]\n    BufferTooShort { expected: usize, actual: usize },\n\n    /// Header CRC32 checksum mismatch.\n    #[error(\"header CRC32 mismatch: expected {expected:#010x}, actual {actual:#010x}\")]\n    HeaderCrc32Mismatch { expected: u32, actual: u32 },\n\n    /// Payload CRC32 checksum mismatch.\n    #[error(\"payload CRC32 mismatch: expected {expected:#010x}, computed {computed:#010x}\")]\n    Crc32Mismatch { expected: u32, computed: u32 },\n\n    /// Unknown record type without UPGRADE_SAFE flag — hard error.\n    #[error(\"unknown record id {record_id} without UPGRADE_SAFE flag\")]\n    UnknownNonUpgradeSafeRecord { record_id: u16 },\n\n    /// Invalid record length.\n    #[error(\"invalid record length: {length}\")]\n    InvalidRecordLength { length: u32 },\n\n    /// Record data exceeds remaining file.\n    #[error(\n        \"record data exceeds file bounds: offset {offset}, length {length}, file size {file_size}\"\n    )]\n    RecordExceedsFile {\n        offset: u64,\n        length: u32,\n        file_size: u64,","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_catalog/src/format/mod.rs#L169-L205","documentation":"A persisted catalog file segment passed its header CRC32 check but the payload bytes failed verification: the CRC32 computed over the record payload ({computed:#010x}) does not match the checksum stored in the record header ({expected:#010x}). The catalog format validates every written record so that silent bit-rot or partial writes are detected on read instead of corrupting the in-memory catalog. This error means the file on disk is damaged or was written by incompatible code.","triggerScenarios":"Reading back a catalog snapshot or WAL segment whose payload bytes were corrupted (disk bit-rot, torn write during a crash, truncation mid-record), or a writer bug that computed the CRC over different bytes than it wrote.","commonSituations":"Running on failing storage, killing the process during a catalog write, copying catalog files while the database is live, or restoring a backup where files were transferred/mangled incorrectly.","solutions":["Verify the storage medium and restore the catalog file from a known-good backup or snapshot.","Do not hand-edit catalog files; re-run restore from the object-store checkpoint referenced by the catalog.","If reproducible, check for concurrent writes to the same catalog file (two instances pointed at one data dir).","Report to influxdb3 maintainers with the file path and expected/computed CRCs if the file was written by a supported version."],"exampleFix":"// before: manually editing the corrupt catalog file\n// after: restore from backup via the catalog restore path\n// catalog.apply(RestoreCatalog { checkpoint_path: known_good_snapshot })","handlingStrategy":"validation","validationCode":"// Before trusting a catalog file, verify integrity off-band\nlet meta = std::fs::metadata(catalog_path)?;\nif meta.len() == 0 { return Err(\"catalog file empty/truncated\"); }\n// compare against checksum recorded at backup time\nassert_eq!(sha256_file(catalog_path)?, expected_sha256, \"catalog file corrupted\");","typeGuard":null,"tryCatchPattern":"match load_result {\n    Err(e) if e.to_string().contains(\"CRC32 mismatch\") => restore_from_backup(),\n    Err(e) => return Err(e),\n    Ok(c) => Ok(c),\n}","preventionTips":["Stop InfluxDB before filesystem-level copies of the catalog directory","Record file checksums at backup time and verify after restore","Monitor disk health (SMART) on catalog storage nodes"],"tags":["corruption","checksum","persistence","catalog"],"backgroundTag":"checksum-mismatch","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}