Skip to content

[Nexthop] Fix SIGABRT in h/w agent on unsupported packet RX reason - #1617

Open
vvasavada-nexthop wants to merge 1 commit into
facebook:mainfrom
nexthop-ai:fix-sigabrt-in-h-w-agent-on-unsupported
Open

[Nexthop] Fix SIGABRT in h/w agent on unsupported packet RX reason#1617
vvasavada-nexthop wants to merge 1 commit into
facebook:mainfrom
nexthop-ai:fix-sigabrt-in-h-w-agent-on-unsupported

Conversation

@vvasavada-nexthop

Copy link
Copy Markdown
Contributor

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run

Summary

SaiHostifManager::packetReasonToHostifTrap() threw an FbossError for any packet RX reason it could not map to a SAI hostif trap on the current ASIC/SDK build (e.g. L3_SLOW_PATH, MPLS_UNKNOWN_LABEL). When such a reason arrives in control plane delta, the exception escapes the oper-delta thread in SaiSwitch::stateChangedImplLocked, aborting the h/w agent with SIGABRT.

The software agent's config validation layer (isValidRxReasonToQueue) cannot fully gate these reasons, because some are gated by compile-time SAI SDK macros (SAI_API_VERSION, BRCM_SAI_SDK_DNX_GTE_11_0, etc.) that are visible only in the SAI layer, not in the platform-agnostic agent code.

Fix

Make the SAI hostif trap mapping non-fatal, matching the established skip-with-diagnostic pattern already used throughout the SAI managers (and already used for UNMATCHED in this same function):

  • packetReasonToHostifTrap() and makeHostifTrapAttributes() now return std::optional.
  • An unsupported/unmappable RX reason logs XLOG(ERR) and returns std::nullopt instead of throwing.
  • Callers skip programming the trap when no attributes are produced, so the agent stays up.

Test Plan

Before the fix: HostifManagerTest.unsupportedHostifTrapSkipped fails
After the fix: HostifManagerTest.unsupportedHostifTrapSkipped passes.

Signed-off-by: Vishrant Vasavada <vvasavada@nexthop.ai>
@vvasavada-nexthop
vvasavada-nexthop requested a review from a team as a code owner September 9, 2026 06:04
@meta-cla meta-cla Bot added the CLA Signed label Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant