apache/hadoop · error · IOException
Unexpected checksum mismatch while writing {} from {}
Error message
Unexpected checksum mismatch while writing {} from {} What it means
Error "Unexpected checksum mismatch while writing {} from {}" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java:517
PacketHeader header = packetReceiver.getHeader();
String specificOffset = "specific offsets are:"
+ " offsetInBlock = " + header.getOffsetInBlock()
+ " offsetInPacket = " + ce.getPos();
LOG.warn("Checksum error in block "
+ block + " from " + inAddr
+ ", " + specificOffset, ce);
// No need to report to namenode when client is writing.
if (srcDataNode != null && isDatanode) {
try {
LOG.info("report corrupt " + block + " from datanode " +
srcDataNode + " to namenode");
datanode.reportRemoteBadBlock(srcDataNode, block);
} catch (IOException e) {
LOG.warn("Failed to report bad " + block +
" from datanode " + srcDataNode + " to namenode");
}
}
throw new IOException("Unexpected checksum mismatch while writing "
+ block + " from " + inAddr);
}
}
/**
* Translate CRC chunks from the client's checksum implementation
* to the disk checksum implementation.
*
* This does not verify the original checksums, under the assumption
* that they have already been validated.
*/
private void translateChunks(ByteBuffer dataBuf, ByteBuffer checksumBuf) {
diskChecksum.calculateChunkedSums(dataBuf, checksumBuf);
}
/**
* Check whether checksum needs to be verified.View on GitHub (pinned to 2add963021)
Solutions
- Investigate hardware issues (bad disk, faulty memory, NIC) on the sending or receiving host, since the checksum mismatch happened on data that was not expected to fail.
- Enable dfs.datanode.drop.reason.behind to reduce spurious errors, and check preceding log lines for the upstream source of the corrupted bytes.
When it happens
Trigger: During block write, checksums computed over received packet data do not match the checksums transmitted with the packet, in a code path where a mismatch was not anticipated.
Common situations: Data written through the pipeline failed checksum verification on the receiving DataNode. Check disks, RAM, and NICs on the pipeline nodes; bad hardware is the usual cause.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/70169a456262af02.
Report an issue: GitHub.