aeron-io/aeron · error · InvalidMessage

Invalid simple value

Error message

Invalid simple value

What it means

CborDecode.parseSimpleValue handles a small set of CBOR simple values (e.g. null, undefined) used by the logger; any other simple value falls through to the default branch and throws InvalidMessage('Invalid simple value'). The logger stream contains a CBOR simple value the decoder does not understand.

Solutions

  1. Decode logs with the same Aeron version that produced them
  2. Inspect the offending byte/offset and check for file corruption (compare against a known-good recording)
  3. Extend/handle the simple value in the decoder if it is a legitimate new value, wrapping parse in InvalidMessage handling otherwise

Example fix

// before
default:
    throw new InvalidMessage("Invalid simple value");
// after
case ADDITIONAL_CONTENT_NULL:
    // handle null like other callers expect
case ADDITIONAL_CONTENT_UNDEFINED:
    break;
default:
    throw new InvalidMessage("Invalid simple value: 0x" + Integer.toHexString(additionalContent));
Defensive patterns

Strategy: try-catch

Validate before calling

// pre-check simple-value additional content in 0xE0-0xF8 simple range before parseSimpleValue is reached

Try / catch

try { cborDecode.decode(logBuffer); } catch (final CborDecode.InvalidMessage ex) { if ("Invalid simple value".equals(ex.getMessage())) { /* version mismatch: re-decode with matching Aeron version */ } throw ex; }

Prevention

When it happens

Trigger: Decoding a log produced by a different Aeron version whose logger emitted additional simple values (e.g. float16/float32 encoded as major type 7 with unknown additional content), or a corrupted stream byte in the 0xE0–0xF8 range.

Common situations: Version skew between the Aeron logger that wrote the recording and the decoder reading it, or bit-flip corruption in stored logs.

Related errors


AI-assisted analysis of aeron-io/aeron@6d60124e15 (2026-09-12). Data as JSON: /api/errors/5cf6dbbbc434e2bc. Report an issue: GitHub.

Appendix: source

Thrown at aeron-client/src/main/java/io/aeron/logging/CborDecode.java:176

        switch (additionalContent)
        {
            case ADDITIONAL_CONTENT_FALSE:
            case ADDITIONAL_CONTENT_TRUE:
                for (int i = 0, n = loggers.size(); i < n; i++)
                {
                    final LoggerEventCallback logger = loggers.get(i);
                    logger.onValue(keyAsciiView, NO_TAG, additionalContent == ADDITIONAL_CONTENT_TRUE);
                }
                break;
            case ADDITIONAL_CONTENT_NULL:
                for (int i = 0, n = loggers.size(); i < n; i++)
                {
                    final LoggerEventCallback logger = loggers.get(i);
                    logger.onValue(keyAsciiView, NO_TAG, (CharSequence)null);
                }
                break;
            default:
                throw new InvalidMessage("Invalid simple value");
        }
    }

    private void parseEntry(final DecodingState state)
    {
        if (state.isTerminated())
        {
            return;
        }

        final DirectBuffer buffer = state.buffer();

        state.ensureRemaining(1);
        final int keyTypeByte = (0xFF) & state.buffer().getByte(state.offset());
        final int keyMajorType = majorType(keyTypeByte);
        final int keyAdditionalContent = additionalContent(keyTypeByte);
        state.incrementOffset(1);
        // key handling

View on GitHub (pinned to 6d60124e15)