[202511] BROADCOM_LEGACY_SAI_COMPAT: Fix sai_query_stats_st_capability crash on Tomahawk-1 (BCM56960)#26201
Merged
vmittal-msft merged 1 commit intosonic-net:202511from Mar 17, 2026
Conversation
…s_st_capability at runtime Add SAI_STATS_ST_CAPABILITY_SUPPORTED=0 to sai.profile for Arista 7060cx (BCM56960/Tomahawk-1) to disable sai_query_stats_st_capability at runtime. This prevents a SIGSEGV in brcm_sai_st_pd_ctr_cap_list_get when running the legacy SAI binary which does not initialize p_pdapi_st->vtable for TH1. The runtime guard is implemented in sonic-sairedis PR sonic-net#1788. Signed-off-by: Liping Xu <[email protected]>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This was referenced Mar 16, 2026
vmittal-msft
approved these changes
Mar 17, 2026
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why I did it
On Arista 7060cx (BCM56960_B1 / Tomahawk-1,
broadcom-legacyplatform), syncd crashes at startup with a SIGSEGV insidebrcm_sai_st_pd_ctr_cap_list_get+0x10when running SONiC 202511 images.Root cause: sairedis commit
4f1d7d99(PR #1700) restoredsai_query_stats_st_capabilitytoAC_CHECK_FUNCSinconfigure.ac. Because all Broadcom builds share XGS SAI headers (buildimage issue #23387),HAVE_SAI_QUERY_STATS_ST_CAPABILITY=1is defined for all Broadcom platforms including broadcom-legacy. On TH1, the SAI library initializesp_pdapi_st=NULL(no streaming telemetry hardware on TH1), butbrcm_sai_st_pd_ctr_cap_list_getdereferences it without a null check — SIGSEGV.This is a 202511 backport of the fix already merged into master via sonic-sairedis PR #1788 + sonic-buildimage master PR #26013.
Work item tracking
How I did it
Add
SAI_STATS_ST_CAPABILITY_SUPPORTED=0tosai.profilefor all 5 Arista 7060cx HWSKU variants (BCM56960/Tomahawk-1). The runtime guard in syncd (sairedis PR #1788, now in 202511 via PR #1790) reads this key duringapiInitialize()and nulls thequery_stats_st_capabilityfunction pointer, causingVendorSai::queryStatsStCapability()to returnSAI_STATUS_NOT_IMPLEMENTED— same behavior as before the regression.Files changed (5):
device/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S/sai.profiledevice/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-C32/sai.profiledevice/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-D48C8/sai.profiledevice/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-Q24C8/sai.profiledevice/arista/x86_64-arista_7060_cx32s/Arista-7060CX-32S-T96C8/sai.profileEach file gets:
How to verify it
broadcom-legacySONiC image for 202511 with this PR + sairedis 202511 PR [platform] Accton: As5712-54x correct driver id for dumping DDM of sfp+ ports #1790show logging | grep -i sigsegv→ no outputshow logging | grep SAI_STATS_ST_CAPABILITY_SUPPORTED→disabling query_stats_st_capability for this platformWhich release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Add SAI_STATS_ST_CAPABILITY_SUPPORTED=0 to sai.profile for Arista 7060cx (BCM56960/Tomahawk-1) to prevent syncd SIGSEGV crash at startup on broadcom-legacy 202511 images.
Link to config_db schema for YANG module changes
N/A
A picture of a cute animal (not mandatory but encouraged)
🐧