{"record":{"id":"6fe84c6271def04d","repo":"aeron-io/aeron","slug":"sm-has-longer-application-specific-feedback","errorCode":null,"errorMessage":"SM has longer application specific feedback (","messagePattern":"SM has longer application specific feedback \\(","errorType":"exception","errorClass":"AeronException","httpStatus":null,"severity":"error","filePath":"aeron-client/src/main/java/io/aeron/protocol/StatusMessageFlyweight.java","lineNumber":277,"sourceCode":"    public int asfLength()\n    {\n        return (frameLength() - HEADER_LENGTH);\n    }\n\n    /**\n     * The group tag (if present) from the Status Message.\n     *\n     * @return the group tag value or 0 if not present.\n     */\n    public long groupTag()\n    {\n        final int frameLength = frameLength();\n\n        if (frameLength > HEADER_LENGTH)\n        {\n            if (frameLength > (HEADER_LENGTH + SIZE_OF_LONG))\n            {\n                throw new AeronException(\n                    \"SM has longer application specific feedback (\" + (frameLength - HEADER_LENGTH) + \") than gtag\");\n            }\n\n            return getLongUnaligned(GROUP_TAG_FIELD_OFFSET);\n        }\n\n        return 0;\n    }\n\n    /**\n     * Set the Receiver Group Tag for the Status Message.\n     *\n     * @param groupTag value to set if not null.\n     * @return this for a fluent API.\n     */\n    public StatusMessageFlyweight groupTag(final Long groupTag)\n    {\n        if (null != groupTag)","sourceCodeStart":259,"sourceCodeEnd":295,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-client/src/main/java/io/aeron/protocol/StatusMessageFlyweight.java#L259-L295","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nif (sm.matchesTag(tag)) { ... }\n// after\nif (sm.frameLength() <= StatusMessageFlyweight.HEADER_LENGTH + SIZE_OF_LONG && sm.matchesTag(tag))\n{\n    ...\n}","handlingStrategy":"try-catch","validationCode":"boolean safeForGroupTag = sm.frameLength() <= StatusMessageFlyweight.HEADER_LENGTH + SIZE_OF_LONG;","typeGuard":"boolean hasSimpleGroupTag(StatusMessageFlyweight sm) { return sm.frameLength() <= StatusMessageFlyweight.HEADER_LENGTH + SIZE_OF_LONG; }","tryCatchPattern":"try { long tag = sm.groupTag(); }\ncatch (AeronException e) { /* SM carries extended feedback; skip or parse manually */ }","preventionTips":["Check frameLength before reading optional SM fields","Treat longer-than-expected SM feedback as a protocol version signal"],"tags":["aeron","protocol","status-message","frame-length"],"backgroundTag":"unexpected-response-shape","analyzedSha":"6d60124e15e35c11b49ba2e3c2c2858a09a18803","analyzedAt":"2026-09-12T11:17:07.683Z","contentChangedAt":"2026-09-12T11:17:07.683Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}