Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Prevent sonic-db-cli generate core dump #749

Merged
merged 3 commits into from
Feb 21, 2023

Conversation

liuh-80
Copy link
Contributor

@liuh-80 liuh-80 commented Feb 17, 2023

Why I did it

sonic-db-cli is porting from python version. in python version, when any exception happen sonic-db-cli will crash but will not generate core dump file. but in c++ version crash will generate a core dump.
Fix sonic-db-cli to avoid a core dump file generated.

How I did it

Catch all exception in sonic-db-cli to avoid core dump generated.

How to verify it

Pass all UT and E2E test cases.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

Fix sonic-db-cli to avoid a core dump file generated.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@liuh-80
Copy link
Contributor Author

liuh-80 commented Feb 20, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liuh-80 liuh-80 marked this pull request as ready for review February 21, 2023 00:53
@liuh-80 liuh-80 merged commit 3352881 into sonic-net:master Feb 21, 2023
yxieca pushed a commit that referenced this pull request Feb 21, 2023
#### Why I did it
sonic-db-cli is porting from python version. in python version, when any exception happen sonic-db-cli will crash but will not generate core dump file. but in c++ version crash will generate a core dump.
Fix sonic-db-cli to avoid a core dump file generated.

#### How I did it
Catch all exception in sonic-db-cli to avoid core dump generated.

#### How to verify it
Pass all UT and E2E test cases.

#### Which release branch to backport (provide reason below if selected)

<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->

- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [ ] 202111

#### Description for the changelog
Fix sonic-db-cli to avoid a core dump file generated.

#### Link to config_db schema for YANG module changes
<!--
Provide a link to config_db schema for the table for which YANG model
is defined
Link should point to correct section on https://github.com/Azure/SONiC/wiki/Configuration.
-->

#### A picture of a cute animal (not mandatory but encouraged)
AntonHryshchuk added a commit to AntonHryshchuk/sonic-buildimage that referenced this pull request Feb 22, 2023
Update sonic-swss-common submodule pointer to include the following:
* 3352881 Prevent sonic-db-cli generate core dump ([sonic-net#749](sonic-net/sonic-swss-common#749))
* 43cadec Add ProfileProvider class to support read profile config from PROFILE_DB. ([sonic-net#683](sonic-net/sonic-swss-common#683))
* 8b09f90 Update path to sairedis tests ([sonic-net#747](sonic-net/sonic-swss-common#747))
* 85f3776 Non recursive automake and Debian packaging changes ([sonic-net#700](sonic-net/sonic-swss-common#700))

Signed-off-by: AntonHryshchuk <antonh@nvidia.com>
dprital added a commit to dprital/sonic-buildimage that referenced this pull request Feb 23, 2023
Update sonic-swss-common submodule pointer to include the following:
* 565ad4b Fix common path issue ([sonic-net#751](sonic-net/sonic-swss-common#751))
* 3352881 Prevent sonic-db-cli generate core dump ([sonic-net#749](sonic-net/sonic-swss-common#749))
* 43cadec Add ProfileProvider class to support read profile config from PROFILE_DB. ([sonic-net#683](sonic-net/sonic-swss-common#683))
* 8b09f90 Update path to sairedis tests ([sonic-net#747](sonic-net/sonic-swss-common#747))
* 85f3776 Non recursive automake and Debian packaging changes ([sonic-net#700](sonic-net/sonic-swss-common#700))

Signed-off-by: dprital <drorp@nvidia.com>
lguohan pushed a commit to sonic-net/sonic-buildimage that referenced this pull request Feb 27, 2023
Update sonic-swss-common submodule pointer to include the following:
* 565ad4b Fix common path issue ([#751](sonic-net/sonic-swss-common#751))
* 3352881 Prevent sonic-db-cli generate core dump ([#749](sonic-net/sonic-swss-common#749))
* 43cadec Add ProfileProvider class to support read profile config from PROFILE_DB. ([#683](sonic-net/sonic-swss-common#683))
* 8b09f90 Update path to sairedis tests ([#747](sonic-net/sonic-swss-common#747))
* 85f3776 Non recursive automake and Debian packaging changes ([#700](sonic-net/sonic-swss-common#700))

Signed-off-by: dprital <drorp@nvidia.com>
StormLiangMS pushed a commit that referenced this pull request Mar 7, 2023
#### Why I did it
sonic-db-cli is porting from python version. in python version, when any exception happen sonic-db-cli will crash but will not generate core dump file. but in c++ version crash will generate a core dump.
Fix sonic-db-cli to avoid a core dump file generated.

#### How I did it
Catch all exception in sonic-db-cli to avoid core dump generated.

#### How to verify it
Pass all UT and E2E test cases.

#### Which release branch to backport (provide reason below if selected)

<!--
- Note we only backport fixes to a release branch, *not* features!
- Please also provide a reason for the backporting below.
- e.g.
- [x] 202006
-->

- [ ] 201811
- [ ] 201911
- [ ] 202006
- [ ] 202012
- [ ] 202106
- [ ] 202111

#### Description for the changelog
Fix sonic-db-cli to avoid a core dump file generated.

#### Link to config_db schema for YANG module changes
<!--
Provide a link to config_db schema for the table for which YANG model
is defined
Link should point to correct section on https://github.com/Azure/SONiC/wiki/Configuration.
-->

#### A picture of a cute animal (not mandatory but encouraged)
saiarcot895 added a commit to saiarcot895/sonic-buildimage that referenced this pull request Mar 7, 2023
Update sonic-swss-common submodule pointer to include the following:
* 565ad4b Fix common path issue ([sonic-net#751](sonic-net/sonic-swss-common#751))
* 3352881 Prevent sonic-db-cli generate core dump ([sonic-net#749](sonic-net/sonic-swss-common#749))
* 43cadec Add ProfileProvider class to support read profile config from PROFILE_DB. ([sonic-net#683](sonic-net/sonic-swss-common#683))
* 8b09f90 Update path to sairedis tests ([sonic-net#747](sonic-net/sonic-swss-common#747))
* 85f3776 Non recursive automake and Debian packaging changes ([sonic-net#700](sonic-net/sonic-swss-common#700))

This is a reland of sonic-net#13950, with the debug image build fix.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
AntonHryshchuk added a commit to AntonHryshchuk/sonic-buildimage that referenced this pull request Mar 8, 2023
Update sonic-swss-common submodule pointer to include the following:
* 06ffb51 Define ACL_TABLE and ACL_RULE table in STATE_DB ([sonic-net#748](sonic-net/sonic-swss-common#748))
* 1b369ab [ci] Fix apt-get install unable locate package issue. ([sonic-net#753](sonic-net/sonic-swss-common#753))
* 619d4ec Improve unit test for go wrapper ([sonic-net#752](sonic-net/sonic-swss-common#752))
* 565ad4b Fix common path issue ([sonic-net#751](sonic-net/sonic-swss-common#751))
* 3352881 Prevent sonic-db-cli generate core dump ([sonic-net#749](sonic-net/sonic-swss-common#749))
* 43cadec Add ProfileProvider class to support read profile config from PROFILE_DB. ([sonic-net#683](sonic-net/sonic-swss-common#683))
* 8b09f90 Update path to sairedis tests ([sonic-net#747](sonic-net/sonic-swss-common#747))
* 85f3776 Non recursive automake and Debian packaging changes ([sonic-net#700](sonic-net/sonic-swss-common#700))

Signed-off-by: AntonHryshchuk <antonh@nvidia.com>
xumia pushed a commit to xumia/sonic-buildimage-1 that referenced this pull request Mar 10, 2023
Update sonic-swss-common submodule pointer to include the following:
* 565ad4b Fix common path issue ([sonic-net#751](sonic-net/sonic-swss-common#751))
* 3352881 Prevent sonic-db-cli generate core dump ([sonic-net#749](sonic-net/sonic-swss-common#749))
* 43cadec Add ProfileProvider class to support read profile config from PROFILE_DB. ([sonic-net#683](sonic-net/sonic-swss-common#683))
* 8b09f90 Update path to sairedis tests ([sonic-net#747](sonic-net/sonic-swss-common#747))
* 85f3776 Non recursive automake and Debian packaging changes ([sonic-net#700](sonic-net/sonic-swss-common#700))

Signed-off-by: dprital <drorp@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants