-
Notifications
You must be signed in to change notification settings - Fork 52
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
Fix crash when retrieving cpu utilization #70
Merged
Merged
Conversation
This file contains 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
tomek-US
reviewed
Jan 21, 2023
tomek-US
reviewed
Jan 25, 2023
ganglyu
reviewed
Jan 31, 2023
ganglyu
approved these changes
Jan 31, 2023
zbud-msft
added a commit
to zbud-msft/sonic-gnmi
that referenced
this pull request
Jan 31, 2023
Fix crash in which there was a divide by zero error inside retrieving cpu utilization
tomek-US
reviewed
Feb 1, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
zbud-msft
added a commit
that referenced
this pull request
Mar 1, 2023
This was referenced Mar 6, 2023
qiluo-msft
pushed a commit
to sonic-net/sonic-buildimage
that referenced
this pull request
Mar 10, 2023
#### Why I did it update contains following commits 50123ef Zain Budhwani Tue Feb 28 16:48:22 2023 -0800 Add logs for md5 checksum (sonic-net/sonic-gnmi#80) a90f2b3 Zain Budhwani Mon Feb 27 23:44:49 2023 -0800 Add get-update to azp yml (sonic-net/sonic-gnmi#79) 14fe6f4 Zain Budhwani Tue Jan 31 14:11:27 2023 -0800 Add 202012 branch to pr checker (sonic-net/sonic-gnmi#72) a792474 Zain Budhwani Tue Jan 31 09:22:38 2023 -0800 Fix crash when retrieving cpu utilization (sonic-net/sonic-gnmi#70) #### How I did it Fetch new changes
xumia
pushed a commit
to xumia/sonic-buildimage-1
that referenced
this pull request
Mar 10, 2023
#### Why I did it update contains following commits 50123ef Zain Budhwani Tue Feb 28 16:48:22 2023 -0800 Add logs for md5 checksum (sonic-net/sonic-gnmi#80) a90f2b3 Zain Budhwani Mon Feb 27 23:44:49 2023 -0800 Add get-update to azp yml (sonic-net/sonic-gnmi#79) 14fe6f4 Zain Budhwani Tue Jan 31 14:11:27 2023 -0800 Add 202012 branch to pr checker (sonic-net/sonic-gnmi#72) a792474 Zain Budhwani Tue Jan 31 09:22:38 2023 -0800 Fix crash when retrieving cpu utilization (sonic-net/sonic-gnmi#70) #### How I did it Fetch new changes
qiluo-msft
pushed a commit
to sonic-net/sonic-buildimage
that referenced
this pull request
Mar 20, 2023
Has following commits: ``` b93c4ac Zain Budhwani Wed Mar 1 15:45:43 2023 -0800 Fix crash when retrieving cpu utilization (sonic-net/sonic-gnmi#70) (sonic-net/sonic-gnmi#71) af1ec19 Zain Budhwani Wed Mar 1 15:13:53 2023 -0800 Add diff cov (sonic-net/sonic-gnmi#85) 3f41377 Zain Budhwani Tue Feb 28 16:48:22 2023 -0800 Add logs for md5 checksum (sonic-net/sonic-gnmi#80) 67b7fb2 Zain Budhwani Mon Feb 27 23:44:49 2023 -0800 Add get-update to azp yml (sonic-net/sonic-gnmi#79) 5d6c47f Zain Budhwani Fri Feb 24 13:11:53 2023 -0800 Add net core and code coverage results (sonic-net/sonic-gnmi#77) 984bc6d Zain Budhwani Wed Feb 22 16:03:01 2023 -0800 [202012] Enable unit test (sonic-net/sonic-gnmi#76) e8e4335 Zain Budhwani Fri Feb 10 16:27:58 2023 -0800 Change dir name in pipeline (sonic-net/sonic-gnmi#75) a1cc7ab Zain Budhwani Tue Jan 31 14:11:27 2023 -0800 Add 202012 branch to pr checker (sonic-net/sonic-gnmi#72) eaea6c5 ganglyu Mon Nov 14 10:18:07 2022 +0800 Fix format ```
zbud-msft
added a commit
to zbud-msft/sonic-gnmi
that referenced
this pull request
Jun 8, 2023
Fix crash in which there was a divide by zero error inside retrieving cpu utilization
zbud-msft
added a commit
to zbud-msft/sonic-gnmi
that referenced
this pull request
Jun 9, 2023
Fix crash in which there was a divide by zero error inside retrieving cpu utilization
6 tasks
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
Fix crash in which there was a divide by zero error inside retrieving cpu utilization
Dec 1 04:31:03 PHX70-0101-0719-14T1 telemetry#/supervisord: telemetry #011/sonic/src/sonic-telemetry/sonic_data_client/non_db_client.go:139 +0x99
Dec 1 04:31:03 PHX70-0101-0719-14T1 telemetry#/supervisord: telemetry github.com/Azure/sonic-telemetry/sonic_data_client.getCpuUtil
Dec 1 04:31:03 PHX70-0101-0719-14T1 telemetry#/supervisord: telemetry #011/sonic/src/sonic-telemetry/sonic_data_client/non_db_client.go:221 +0x34
Dec 1 04:31:03 PHX70-0101-0719-14T1 telemetry#/supervisord: telemetry (0xc000000006, 0xc002e0ae00, 0x1, 0x1, 0x0)
Dec 1 04:31:03 PHX70-0101-0719-14T1 telemetry#/supervisord: telemetry github.com/Azure/sonic-telemetry/sonic_data_client.getCpuUtilStat(0x0)
Dec 1 04:31:03 PHX70-0101-0719-14T1 telemetry#/supervisord: telemetry goroutine 742 [running]:
Dec 1 04:31:03 PHX70-0101-0719-14T1 telemetry#/supervisord: telemetry #011/sonic/src/sonic-telemetry/sonic_data_client/non_db_client.go:162 +0x2e6
Dec 1 04:31:03 PHX70-0101-0719-14T1 telemetry#/supervisord: telemetry github.com/Azure/sonic-telemetry/sonic_data_client.(*NonDbClient).PollRun(0xc001bc42a0, 0xc00027eaf0, 0xc001bc83c0, 0xc001be8868, 0xc001be8880)
Dec 1 04:31:03 PHX70-0101-0719-14T1 telemetry#/supervisord: telemetry
Dec 1 04:31:03 PHX70-0101-0719-14T1 telemetry#/supervisord: telemetry #011/sonic/src/sonic-telemetry/sonic_data_client/non_db_client.go:538 +0xd4
Dec 1 04:31:03 PHX70-0101-0719-14T1 telemetry#/supervisord: telemetry #011/sonic/src/sonic-telemetry/gnmi_server/client_subscribe.go:146 +0x765
Dec 1 04:31:03 PHX70-0101-0719-14T1 telemetry#/supervisord: telemetry github.com/Azure/sonic-telemetry/sonic_data_client.runGetterAndSend(0xc001bc42a0, 0xc001be8a00, 0x101cc08, 0x0, 0x0)
Dec 1 04:31:03 PHX70-0101-0719-14T1 telemetry#/supervisord: telemetry created by github.com/Azure/sonic-telemetry/gnmi_server.(*Client).Run
Dec 1 04:31:03 PHX70-0101-0719-14T1 telemetry#/supervisord: telemetry github.com/Azure/sonic-telemetry/sonic_data_client.getCpuUtilPercents(0xc00239c300, 0xc002e0aa30, 0x2)
Dec 1 04:31:03 PHX70-0101-0719-14T1 telemetry#/supervisord: telemetry panic: runtime error: integer divide by zero
Dec 1 04:31:03 PHX70-0101-0719-14T1 telemetry#/supervisord: telemetry #011/sonic/src/sonic-telemetry/sonic_data_client/non_db_client.go:499 +0x3c
How I did it
Add edge case check and UT
How to verify it
Run UT
Which release branch to backport (provide reason below if selected)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)