openclaw - 💡(How to fix) Fix Sandbox zombie processes remain under PID 1 and accumulate until pids.max risk [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#68691Fetched 2026-04-19 15:08:34
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
commented ×1

Sandbox sessions can accumulate zombie processes whose PPID is already 1, but they are not reaped by PID 1. Over time they stack up and can contribute to hitting the sandbox process limit (pids.max).

This does not look like a normal user-script leak anymore, because these are already orphaned zombies under PID 1.

Root Cause

This does not look like a normal user-script leak anymore, because these are already orphaned zombies under PID 1.

Code Example

count 23
10448	1	bash
23857	1	sh
44348	1	sh
52955	1	bash
74031	1	bash
74042	1	bash
74388	1	bash
75421	1	bash
83271	1	bash
84642	1	bash
90986	1	bash
98612	1	bash
106630	1	bash
124027	1	git
125371	1	bash
133905	1	git
146115	1	sort
146116	1	sort
146119	1	sort
146120	1	sort
146124	1	sort
146125	1	sort
150588	1	bash

---

bash 13
sort 6
sh 2
git 2

---

📊 Processes: 3 alive, 23 zombie, 26 total
RAW_BUFFERClick to expand / collapse

Summary

Sandbox sessions can accumulate zombie processes whose PPID is already 1, but they are not reaped by PID 1. Over time they stack up and can contribute to hitting the sandbox process limit (pids.max).

This does not look like a normal user-script leak anymore, because these are already orphaned zombies under PID 1.

Environment

  • OpenClaw: v2026.4.15
  • Runtime: sandboxed Docker session
  • Host: Linux arm64 / OrbStack VM on Apple Silicon

What I observed

Repeated checks inside the sandbox showed zombies like these:

count 23
10448	1	bash
23857	1	sh
44348	1	sh
52955	1	bash
74031	1	bash
74042	1	bash
74388	1	bash
75421	1	bash
83271	1	bash
84642	1	bash
90986	1	bash
98612	1	bash
106630	1	bash
124027	1	git
125371	1	bash
133905	1	git
146115	1	sort
146116	1	sort
146119	1	sort
146120	1	sort
146124	1	sort
146125	1	sort
150588	1	bash

Summary by command:

bash 13
sort 6
sh 2
git 2

Current process health at the time:

📊 Processes: 3 alive, 23 zombie, 26 total

Why this seems like a runtime / PID 1 issue

  • These are already zombies, so kill -9 is not meaningful.
  • Their PPID is already 1.
  • If PID 1 were reaping correctly, they should disappear.
  • Instead, they persist and accumulate.

That suggests the sandbox init / PID 1 / process supervision layer is not reaping all orphaned children.

Impact

  • Zombie count can keep climbing across normal tool/script usage.
  • This risks exhausting the sandbox process budget (pids.max).
  • Once process slots get tight, random commands, cron jobs, and tool executions can start failing in hard-to-explain ways.

We previously saw sandbox pressure around pids.max = 256, so this is not purely cosmetic.

Likely triggers

The zombies appear to come from normal shell-heavy activity, including things like:

  • bash / sh
  • shell pipelines involving sort
  • git
  • cron/script execution paths

So this may be reproducible with ordinary agent workloads, not only unusual manual commands.

Expected behavior

Orphaned zombie children adopted by PID 1 should be reaped promptly.

Actual behavior

Zombie processes with PPID=1 remain visible indefinitely and accumulate over time.

Optional follow-up

If useful, I can help capture a smaller repro focused on shell pipeline + orphaning behavior inside the sandbox.

extent analysis

TL;DR

The sandbox init / PID 1 process may not be correctly reaping orphaned zombie children, leading to an accumulation of zombies and potential exhaustion of the sandbox process budget.

Guidance

  • Investigate the sandbox init process and its configuration to ensure it is set up to reap orphaned children correctly.
  • Verify that the pids.max limit is not being hit, which could be causing the sandbox to fail to reap zombie processes.
  • Consider capturing a smaller repro case focused on shell pipeline and orphaning behavior inside the sandbox to further diagnose the issue.
  • Check the runtime and Docker session configurations to ensure they are not interfering with the sandbox init process's ability to reap zombie children.
  • Monitor the zombie process count and sandbox process health to understand the rate at which zombies are accumulating and the impact on the sandbox.

Example

No code snippet is provided as the issue seems to be related to the sandbox init process and its configuration, which is not explicitly stated.

Notes

The issue may be specific to the OpenClaw version (v2026.4.15) and the Linux arm64 / OrbStack VM on Apple Silicon environment. Further investigation is needed to determine the root cause and develop a fix.

Recommendation

Apply a workaround to monitor and manually reap zombie processes until the root cause can be determined and a fix can be implemented, as the issue is causing accumulation of zombies and potential exhaustion of the sandbox process budget.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Orphaned zombie children adopted by PID 1 should be reaped promptly.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Sandbox zombie processes remain under PID 1 and accumulate until pids.max risk [1 comments, 2 participants]