Repository navigation
Conversation
The unit's cgroup contains the daemon and every session shell, so with the default OOMPolicy=stop a kernel OOM kill of any single process in a session stops the whole unit and destroys all sessions. OOMPolicy=continue keeps the daemon and the unaffected sessions alive; only the OOM-killed task is lost. Refs shell-pool#464
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Contributor
|
LGTM, we just need that CLA sig and I can get this merged for you! |
Contributor
|
Oh also, we use canonical commits for automatic patchnote generation, so the prefix should be |
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.
Issue Link
#464
AI Policy Ack
I read the AI Policy. I used an AI coding agent interactively to analyze the OOM/systemd journal evidence and to draft this one-line unit change and the PR text. I reproduced the failure on my machine, reviewed the diff, and tested the change myself:
systemd-analyze verifypasses on systemd 259, and installing the setting as a drop-in plussystemctl --user daemon-reloadupdates a running unit (systemctl show -p OOMPolicychanges fromstoptocontinue) without restarting the daemon.This PR was:
Description
Add
OOMPolicy=continueto the shipped user unit.systemd/shpool.serviceuses the systemd defaultOOMPolicy=stop. The unit's cgroup contains the daemon and every session shell and its children, so a kernel OOM kill of any single process in a session stops the entire unit. WithKillMode=mixed+SendSIGHUP=yes, that terminates the daemon and destroys every session; allshpool attachclients exit.I hit this four times in one afternoon on a 31 GiB machine when a runaway ~20 GiB Python job inside one session exhausted RAM + swap:
With
OOMPolicy=continue, only the OOM-killed process is lost; the daemon and the other sessions survive. This matches what users expect from a session pool: a runaway job in one pane should not kill every pane.OOMPolicy=has been available since systemd v243; on older systemd the unknown key is ignored with a warning, so this does not add a hard version requirement.Refs #464