aeron-io/aeron · error · AeronException
SM has longer application specific feedback (
Error message
SM has longer application specific feedback (
What it means
StatusMessageFlyweight.groupTag() returns the group tag (a 8-byte value) from a status message but throws AeronException when the frame length indicates application-specific feedback longer than the single group tag field, i.e. the SM carries extra feedback bytes this accessor cannot safely interpret. It is a guard so callers of matchesTag do not silently misread longer feedback payloads.
Solutions
- Check frameLength() <= StatusMessageFlyweight.HEADER_LENGTH + SIZE_OF_LONG before calling groupTag
- Catch AeronException around matchesTag/groupTag when parsing untrusted or cross-version SM frames
- Align Aeron versions with the peer so SM feedback lengths match expectations
Example fix
// before
if (sm.matchesTag(tag)) { ... }
// after
if (sm.frameLength() <= StatusMessageFlyweight.HEADER_LENGTH + SIZE_OF_LONG && sm.matchesTag(tag))
{
...
} Defensive patterns
Strategy: try-catch
Validate before calling
boolean safeForGroupTag = sm.frameLength() <= StatusMessageFlyweight.HEADER_LENGTH + SIZE_OF_LONG;
Type guard
boolean hasSimpleGroupTag(StatusMessageFlyweight sm) { return sm.frameLength() <= StatusMessageFlyweight.HEADER_LENGTH + SIZE_OF_LONG; } Try / catch
try { long tag = sm.groupTag(); }
catch (AeronException e) { /* SM carries extended feedback; skip or parse manually */ } Prevention
- Check frameLength before reading optional SM fields
- Treat longer-than-expected SM feedback as a protocol version signal
When it happens
Trigger: Calling groupTag() (directly or via matchesTag) on a StatusMessageFlyweight whose frameLength() exceeds HEADER_LENGTH + SIZE_OF_LONG, meaning the SM's application-specific feedback is longer than 8 bytes.
Common situations: Interoperating with an Aeron peer/driver that appends additional feedback data to status messages; treating a generic SM with extended feedback as a simple tagged SM.
Related errors
- unexpected response: code=
- unknown RES_TYPE=
- Insufficient length:
- expected schemaId= , actual=
- expected schemaId= , actual=
AI-assisted analysis of aeron-io/aeron@6d60124e15 (2026-09-12).
Data as JSON: /api/errors/6fe84c6271def04d.
Report an issue: GitHub.
Appendix: source
Thrown at aeron-client/src/main/java/io/aeron/protocol/StatusMessageFlyweight.java:277
public int asfLength()
{
return (frameLength() - HEADER_LENGTH);
}
/**
* The group tag (if present) from the Status Message.
*
* @return the group tag value or 0 if not present.
*/
public long groupTag()
{
final int frameLength = frameLength();
if (frameLength > HEADER_LENGTH)
{
if (frameLength > (HEADER_LENGTH + SIZE_OF_LONG))
{
throw new AeronException(
"SM has longer application specific feedback (" + (frameLength - HEADER_LENGTH) + ") than gtag");
}
return getLongUnaligned(GROUP_TAG_FIELD_OFFSET);
}
return 0;
}
/**
* Set the Receiver Group Tag for the Status Message.
*
* @param groupTag value to set if not null.
* @return this for a fluent API.
*/
public StatusMessageFlyweight groupTag(final Long groupTag)
{
if (null != groupTag)View on GitHub (pinned to 6d60124e15)