ERR
redis
data_error
ai_generated
partial
RDB checksum mismatch: expected 0xabc123 but got 0xdef456, possible data corruption or double-free detected
ID: redis/rdb-load-corrupt-double-free
70%Fix Rate
86%Confidence
1Evidence
2024-01-05First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 6.2 | active | — | — | — |
| 7.0 | active | — | — | — |
| 7.2 | active | — | — | — |
| 8.0-m3 | active | — | — | — |
Root Cause
The RDB file's checksum does not match the computed checksum, indicating file corruption during write, transfer, or storage, possibly due to a double-free memory error in the dump process.
generic中文
RDB 文件的校验和与计算值不匹配,表明在写入、传输或存储过程中文件损坏,可能是转储过程中的双重释放内存错误所致。
Official Documentation
https://redis.io/docs/latest/operate/oss_admin/persistence/Workarounds
-
75% success Use the redis-check-rdb tool to repair the RDB file: redis-check-rdb --fix /path/to/dump.rdb
Use the redis-check-rdb tool to repair the RDB file: redis-check-rdb --fix /path/to/dump.rdb
-
85% success Restore from a known good backup taken before the corruption occurred. Example: copy backup.rdb to dump.rdb and restart Redis.
Restore from a known good backup taken before the corruption occurred. Example: copy backup.rdb to dump.rdb and restart Redis.
-
70% success If the corruption is due to memory errors, run memtest on the server hardware and replace faulty RAM, then restore from backup.
If the corruption is due to memory errors, run memtest on the server hardware and replace faulty RAM, then restore from backup.
中文步骤
Use the redis-check-rdb tool to repair the RDB file: redis-check-rdb --fix /path/to/dump.rdb
Restore from a known good backup taken before the corruption occurred. Example: copy backup.rdb to dump.rdb and restart Redis.
If the corruption is due to memory errors, run memtest on the server hardware and replace faulty RAM, then restore from backup.
Dead Ends
Common approaches that don't work:
-
Re-run the RDB save command to overwrite the corrupted file.
50% fail
If the corruption is due to underlying disk or memory issues, the new save may also be corrupted.
-
Use a backup RDB file from a different time without verifying its integrity.
40% fail
The backup may have the same corruption if it was written during the same problematic period.
-
Disable checksum verification in redis.conf by setting rdbchecksum no.
70% fail
This ignores the error but does not fix the corruption; loading corrupted data can cause crashes or data loss.