A step's sandbox has no limit on CPU or memory #496
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happens
Step sandboxes (braid#203) separate files, processes and ports, and share the container's CPU and memory. One step's runaway test or build can starve the others and osfd. The container has no cgroup delegation, so bubblewrap cannot set limits.
Fix (to design)
Delegate a cgroup subtree to the container (a private cgroup namespace with a writable
/sys/fs/cgroup), and have the manager put each sandbox in a cgroup of its own withmemory.high,memory.maxandcpu.max. Ending a sandbox can then usecgroup.kill.Done when
A step that allocates past its limit is stopped with a message that says so, and another step running beside it is unaffected.