Watch
0
0
Fork
You've already forked hyperhive
0

hive-bash-daemon: keep sibling tasks alive when one is OOM-killed

systemd's default OOMPolicy=stop ends the whole unit when the kernel
kills any process in it; set continue, as hive-subagent-daemon does.
Module-eval case asserts it.
This commit is contained in:
atlas 2026-10-07 18:18:15 +02:00
commit c1672218b1
2 changed files with 12 additions and 0 deletions

View file

@ -30,6 +30,7 @@ let
agentUncapped = agent { };
agentBashDaemon = machine: machine.systemd.services.hive-bash-daemon;
agentSubagentDaemon = machine: machine.systemd.services.hive-subagent-daemon;
cases = [
{
@ -82,6 +83,12 @@ let
name = "one subagent losing the OOM draw does not stop the daemon";
ok = (agentSubagentDaemon agentUncapped).serviceConfig.OOMPolicy == "continue";
}
{
# Each bash task is a process in the daemon's cgroup; under `stop` one
# OOM-killed task would end every running sibling task.
name = "one bash task losing the OOM draw does not stop the daemon";
ok = (agentBashDaemon agentUncapped).serviceConfig.OOMPolicy or null == "continue";
}
];
in
runGroup "agent-memory" cases