-
Notifications
You must be signed in to change notification settings - Fork 166
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
[xcvrd] Force cleanup of chassis global variable on deinit #193
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
This pull request introduces 1 alert when merging c017e51 into bf60a27 - view on LGTM.com new alerts:
|
liat-grozovik
previously approved these changes
Jun 13, 2021
regarding the new alert from LGTM @robocoder99 as the fix is to delete the pointers, not sure why LGTM raise a concern about this specific line which is the whole reason for this PR. Maybe something is missing. Can you please check it out? |
jleveque
suggested changes
Jun 15, 2021
jleveque
approved these changes
Jun 16, 2021
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
qiluo-msft
pushed a commit
that referenced
this pull request
Jun 21, 2021
- Description I added a del directive for the global platform_chassis object in xcvrd on deinit to ensure that the pointer is properly cleaned up such that the __del__() method is successfully called on the chassis object which closes its connection to SAI. - Motivation and Context On Mellanox platforms on 202012 we are seeing that in some cases xcvrd is maintaining the socket to the API past its deconstruction causing an error from SAI. This was traced by reproducing the issue and identifying that the pmon container was causing this issue where xcvrd is the only daemon within pmon that opens a SDK socket on Mellanox. Error in log... syncd#SDK: [SX_API_INTERNAL.ERR] Failed command read at communication channel: Connection reset by peer - How Has This Been Tested? Change was uploaded to xcvrd on running pmon container on a switch running the latest 202012 build. xcvrd was then restarted with supervisord and we verified that we could no longer reproduce the bug.
andywongarista
pushed a commit
to andywongarista/sonic-platform-daemons
that referenced
this pull request
Jun 30, 2021
…#193) - Description I added a del directive for the global platform_chassis object in xcvrd on deinit to ensure that the pointer is properly cleaned up such that the __del__() method is successfully called on the chassis object which closes its connection to SAI. - Motivation and Context On Mellanox platforms on 202012 we are seeing that in some cases xcvrd is maintaining the socket to the API past its deconstruction causing an error from SAI. This was traced by reproducing the issue and identifying that the pmon container was causing this issue where xcvrd is the only daemon within pmon that opens a SDK socket on Mellanox. Error in log... syncd#SDK: [SX_API_INTERNAL.ERR] Failed command read at communication channel: Connection reset by peer - How Has This Been Tested? Change was uploaded to xcvrd on running pmon container on a switch running the latest 202012 build. xcvrd was then restarted with supervisord and we verified that we could no longer reproduce the bug.
vdahiya12
pushed a commit
to vdahiya12/sonic-platform-daemons
that referenced
this pull request
Apr 4, 2022
…rn (sonic-net#193) Remove EEPROM cache file and use DB instead 1. Use visitor pattern accessing EEPROM data 2. Provide utility functions to access redis data base
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.
Description
I added a
del
directive for the globalplatform_chassis
object inxcvrd
on deinit to ensure that the pointer is properly cleaned up such that the__del__()
method is successfully called on the chassis object which closes its connection to SAI.Motivation and Context
On Mellanox platforms on 202012 we are seeing that in some cases xcvrd is maintaining the socket to the API past its deconstruction causing an error from SAI. This was traced by reproducing the issue and identifying that the pmon container was causing this issue where xcvrd is the only daemon within pmon that opens a SDK socket on Mellanox.
Error in log...
How Has This Been Tested?
Change was uploaded to xcvrd on running pmon container on a switch running the latest 202012 build. xcvrd was then restarted with supervisord and we verified that we could no longer reproduce the bug.
Backporting
Backport to 202012 while this is a necessary fix in general we are seeing symptoms specifically on 202012