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

memory-monitor: Improve resilience of handler to missing processes. #4376

Conversation

OhmSpectator
Copy link
Member

Enhance the script to handle missing processes more gracefully in the memory event handler. Instead of halting execution when a process is no longer present, the handler now skips over non-existent processes. This allows the memory event handling to continue smoothly when triggered by the monitor, even if some processes have terminated. The added checks ensure robust handling of ps and /proc access failures.

@OhmSpectator OhmSpectator added the stable Should be backported to stable release(s) label Oct 17, 2024
@github-actions github-actions bot requested a review from eriknordmark October 17, 2024 21:14
@OhmSpectator OhmSpectator force-pushed the feature/do-not-interrupt-mm-handling-on-gone-pids branch from 8dd4b9c to 71083e0 Compare October 18, 2024 13:35
@github-actions github-actions bot requested a review from eriknordmark October 18, 2024 13:35
Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Enhance the script to handle missing processes more gracefully in the
memory event handler. Instead of halting execution when a process is no
longer present, the handler now skips over non-existent processes. This
allows the memory event handling to continue smoothly when triggered by
the monitor, even if some processes have terminated. The added checks
ensure robust handling of ps and /proc access failures.

Signed-off-by: Nikolay Martyanov <[email protected]>
@OhmSpectator OhmSpectator force-pushed the feature/do-not-interrupt-mm-handling-on-gone-pids branch from 71083e0 to cce8729 Compare October 18, 2024 15:16
@github-actions github-actions bot requested a review from eriknordmark October 18, 2024 15:17
@OhmSpectator OhmSpectator merged commit dd27fe1 into lf-edge:master Oct 18, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stable Should be backported to stable release(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants