Skip to content

[nbrshow] Prevent crash when FDB entries are missing or aged out#117

Merged
gord1306 merged 1 commit into
edge-core:202311.Xfrom
link19430:Prevent_nbrshow_Crash_FDB_Missing
Aug 29, 2025
Merged

[nbrshow] Prevent crash when FDB entries are missing or aged out#117
gord1306 merged 1 commit into
edge-core:202311.Xfrom
link19430:Prevent_nbrshow_Crash_FDB_Missing

Conversation

@link19430

Copy link
Copy Markdown

Why I did it

When excessive MAC addresses are learned and MAC aging occurs, pre-fetched keys may become out of sync with the actual ASIC_DB state, causing nbrshow or show arp to terminate unexpectedly.

What I did

Disable blocking on get_all() to avoid repeated retries. Add try-except to prevent nbrshow termination on database access failure. Add checks for required keys in FDB entries to avoid KeyError.

How I verified it

Run nbrshow -4/-6 or show arp on DUT with many MACs and aging events: command completes successfully. Problematic FDB entries are skipped; valid neighbors are displayed. ARP/neighbor pytest tests pass.

Why I did it
When excessive MAC addresses are learned and MAC aging occurs, pre-fetched keys may become out of sync with the actual ASIC_DB state, causing nbrshow or show arp to terminate unexpectedly.

What I did
Disable blocking on get_all() to avoid repeated retries.
Add try-except to prevent nbrshow termination on database access failure.
Add checks for required keys in FDB entries to avoid KeyError.

How I verified it
Run nbrshow -4/-6 or show arp on DUT with many MACs and aging events: command completes successfully.
Problematic FDB entries are skipped; valid neighbors are displayed.
ARP/neighbor pytest tests pass.
@link19430

Copy link
Copy Markdown
Author

Hi @gord1306 ,

Please help review it, thanks.

@gord1306 gord1306 merged commit d3ba905 into edge-core:202311.X Aug 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants