Dealing with optimizer-server zombie processes#622
Merged
imeoer merged 2 commits intocontainerd:mainfrom Dec 4, 2024
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #622 +/- ##
==========================================
- Coverage 21.93% 21.29% -0.64%
==========================================
Files 122 122
Lines 10839 13682 +2843
==========================================
+ Hits 2377 2913 +536
- Misses 8140 10447 +2307
Partials 322 322
|
0672ab4 to
ebbf5d1
Compare
Author
|
@imeoer PTLK |
imeoer
approved these changes
Dec 4, 2024
Collaborator
imeoer
left a comment
There was a problem hiding this comment.
Sorry for the delay, LGTM, thanks!
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.
Problem Description
Based on the process outlined in optimize_nydus_image, we attempted to build an optimizer to generate the accessed files list. The optimizer-server and optimizer-nri-plugin were deployed on the server. After some time, we noticed that some of the optimizer-servers became defunct. The specific screenshots are as follows:

The parent processes of these zombie processes all belong to the optimizer-nri-plugin. We have also verified that this issue occurs on every server we deployed.
We believe that if the servers continue to retain these zombie processes, they will accumulate to a certain number and eventually affect the normal operation of the business.
Modified Sections
We checked and found that the issue primarily lies in two areas:
Validation Results
We deployed the modified functionality on four servers for observation. After a full day of monitoring, no zombie processes were observed.
Testing Method
The modified code was recompiled, and the newly generated optimizer-server and optimizer-nri-plugin binaries replaced the existing ones.
The process status was checked using the command ps -ef | grep optimizer to verify that no zombie processes had appeared.