apache/cassandra · warning

invalid, recoverable CRC mismatch detected while reading…

Error message

{} invalid, recoverable CRC mismatch detected while reading messages (corrupted self-contained frame)

What it means

Warns that a CRC check failed while reading a self-contained inbound frame; because the frame is self-contained, the handler can skip the corrupt frame and keep the connection alive (corruptFramesRecovered). One message in that frame is lost, but the stream continues.

Solutions

  1. Check NIC/switch/cable health and interface error counters (ethtool, netstat -i).
  2. Enable internode compression consistency or verify both nodes agree on internode_compression settings.
  3. Correlate with hardware events (EDAC/MCE logs) if recurring on the same host.
  4. Monitor metrics org.apache.cassandra.net.InboundMessageHandler corruptFramesRecovered; escalate if it grows continuously.
  5. If frequent, capture traffic and open a support case; persistent CRC errors indicate hardware, not software.
Defensive patterns

Strategy: retry

Try / catch

// Not catchable in user code; detect via metrics:
// org.apache.cassandra.metrics:type=InboundMessageHandler name=CorruptFramesRecovered
// Alert on rate > 0 and re-trigger the affected operation (repair, schema sync).

Prevention

When it happens

Trigger: processCorruptFrame is called when frame.readCRC != frame.computedCRC for a self-contained (uncompressed-CRC-protected) frame that is not part of a large message.

Common situations: Bit flips on the wire or in NIC memory, faulty network hardware, disk/corruption when using compression, or (historically) a co-located process corrupting memory; can also surface during heavy network errors.

Understand the failure class

Background: Checksum mismatch errors: "checksum verification failed", "digest mismatch", "expected vs actual checksum" — what they mean and how to fix them — this error's family across 41 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/1526c932f8a2f953. Report an issue: GitHub.

Appendix: source

Thrown at src/java/org/apache/cassandra/net/InboundMessageHandler.java:259

        callbacks.onHeaderArrived(size, header, currentTimeNanos - header.createdAtNanos, NANOSECONDS);
        receivedBytes += buf.remaining();
        largeMessage = new LargeMessage(size, header, expired);
        largeMessage.supply(frame);
        return true;
    }

    protected void processCorruptFrame(CorruptFrame frame) throws Crc.InvalidCrc
    {
        if (!frame.isRecoverable())
        {
            corruptFramesUnrecovered++;
            throw new Crc.InvalidCrc(frame.readCRC, frame.computedCRC);
        }
        else if (frame.isSelfContained)
        {
            receivedBytes += frame.frameSize;
            corruptFramesRecovered++;
            noSpamLogger.warn("{} invalid, recoverable CRC mismatch detected while reading messages (corrupted self-contained frame)", id());
        }
        else if (null == largeMessage) // first frame of a large message
        {
            receivedBytes += frame.frameSize;
            corruptFramesUnrecovered++;
            noSpamLogger.error("{} invalid, unrecoverable CRC mismatch detected while reading messages (corrupted first frame of a large message)", id());
            throw new Crc.InvalidCrc(frame.readCRC, frame.computedCRC);
        }
        else // subsequent frame of a large message
        {
            processSubsequentFrameOfLargeMessage(frame);
            corruptFramesRecovered++;
            noSpamLogger.warn("{} invalid, recoverable CRC mismatch detected while reading a large message", id());
        }
    }

    String id(boolean includeReal)
    {

View on GitHub (pinned to 88fd0f6a0e)