[frr]: Fix zebra NB RIB route lookup_next route_node lock under-run (backport to 202608)#2629
Merged
yxieca merged 1 commit intoJul 13, 2026
Conversation
87e4101 to
ba2fa22
Compare
Add FRR patch 0115 to drop the erroneous route_unlock_node() in the zebra northbound oper-state RIB route iterator (lib_vrf_zebra_ribs_rib_route_ lookup_next). The node returned by lookup_next() seeds the get_next -> route_next() iteration, which unlocks its input; releasing the lock in lookup_next() under-runs the route_node lock to zero and aborts zebra (assertion node->lock > 0) during the post-restart RIB sweep, wedging vtysh and stalling bgpd. Fixes: sonic-net/sonic-buildimage#27788 Signed-off-by: Deepak Singhal <deepsinghal@microsoft.com> (cherry picked from commit 0361265)
ba2fa22 to
8f303e1
Compare
Contributor
Author
|
/azp run Azure.sonic-buildimage-msft.PR |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
The build fix is in #2658 but rerun the pipeline doesn't pick up the fix. |
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
Backport of sonic-net/sonic-buildimage#28094 (fixes sonic-net/sonic-buildimage#27788) to the
202608release branch. The master PR carries theCherry Pick Conflict_msft-202608label because the auto cherry-pick did not apply, so this is the manual backport PR.The bug: the zebra northbound oper-state RIB route iterator (
lib_vrf_zebra_ribs_rib_route_lookup_next) erroneously callsroute_unlock_node()on the node it returns. That node seeds theget_next->route_next()iteration, which unlocks its input; releasing the lock inlookup_next()under-runs theroute_nodelock to zero and aborts zebra (assertion node->lock > 0) during the post-restart RIB sweep, wedging vtysh and stalling bgpd.Work item tracking
How I did it
Cherry-picked the merged master commit
0361265da273e4a08d03831c1515e041e4ba3de6(the FRRroute_nodelock fix).Conflict resolution: the only conflict was in
src/sonic-frr/patch/series. On master the fix is registered as0116, right after an unrelated patch (0115-zebra-Update-promiscuity-flag-silently..., which toucheszebra/if_netlink.c) that is not present on202608. Since the fix toucheszebra/zebra_nb_state.c(a different file) and is independent of that unrelated patch, it was registered at 202608's next free slot0115(series ended at0114) and the unrelated promiscuity patch was not carried. The patch body is byte-identical to master's.Base parity: the FRR submodule pin is byte-identical (
4cb6d9e6bfe4ad503d1fab21e6f665804b0649ac) on the master parent, the master fix commit, and202608— so the fix applies onto identical FRR source.How to verify it
202608FRR patch series (all 84 patches, including the backported fix) in order onto the pinned FRR source4cb6d9e6...— every patch applies cleanly; the fix integrates at itslookup_nextregion with no overlap from preceding patches.202608, that validation carries over.202608base.Which release branch to backport (provide reason below if selected)
This PR is the release-branch backport (base =
202608), so no further backport checkbox is selected.Tested branch (Please provide the tested image version)
4cb6d9e6; behavior verified on master per [frr]: Fix zebra NB RIB route lookup_next route_node lock under-run sonic-net/sonic-buildimage#28094)Description for the changelog
[frr]: Fix zebra NB RIB route lookup_next route_node lock under-run
Link to config_db schema for YANG module changes
N/A