Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

EntityBulker SIGSEGV when create_entry attr_count 0 #2224

Merged
merged 2 commits into from
Aug 31, 2022

Conversation

arvbb
Copy link
Contributor

@arvbb arvbb commented Apr 5, 2022

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

@arvbb arvbb requested a review from prsunny as a code owner April 5, 2022 22:53
@prsunny prsunny requested a review from qiluo-msft April 6, 2022 01:17
@prsunny
Copy link
Collaborator

prsunny commented Apr 19, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny prsunny merged commit d41aebf into sonic-net:master Aug 31, 2022
@arvbb arvbb deleted the bulker_segfault branch August 31, 2022 16:46
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants