EntityBulker SIGSEGV when create_entry attr_count 0#2224
Merged
prsunny merged 2 commits intosonic-net:masterfrom Aug 31, 2022
Merged
EntityBulker SIGSEGV when create_entry attr_count 0#2224prsunny merged 2 commits intosonic-net:masterfrom
prsunny merged 2 commits intosonic-net:masterfrom
Conversation
prsunny
approved these changes
Apr 6, 2022
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
7 tasks
7 tasks
Janetxxx
pushed a commit
to Janetxxx/sonic-swss
that referenced
this pull request
Nov 10, 2025
*EntityBulker SIGSEGV when create_entry attr_count 0 (sonic-net#2224)
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.
What I did
Removed access to variable causing the segfault while create_entry with attr_count 0
Why I did it
When the bulker create_entry was called with attr_count as 0, the swss log would access the attr_list and try to print the id. This was causing the orchagent crash:
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000056230970734d in EntityBulker<_sai_nat_api_t>::create_entry (this=0x56230b31f988, object_status=0x56230b3e4a20, entry=, attr_count=0, attr_list=0x7ffcadbbbef0) at /usr/include/c++/8/bits/unordered_map.h:309
How I verified it
Verified orchagent does not segfault under this condition.
Details if related