Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Sandbox: say so, or refuse to start, when it cannot see a command's processes

Open
#384 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
58/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend, testing

Research direction

Start with sandbox/resource_contract.py and sandbox/executor_server.py to trace how command processes are found and how service health is reported; then read tests/infrastructure/test_execution_resource_contract.py. Check how CI can make the process list unreadable on Linux without skipping the test. Done means the self-check, health state, background-child handling, and docs/SETUP.md requirement are covered as specified.

Written by the indexing model from the issue text.

Description

area/sandbox reliability status/ready

What is wrong

The sandbox service finds the processes of a command by reading
/proc (sandbox/resource_contract.py). On a host without /proc
it finds none. Then its memory ceiling and its process limit do
nothing, and the orphans of a command are not cleaned up. Only the
time limit is left. The service starts and runs commands as usual,
and it does not say so.

In the container setups the container's own limits stand behind this
(memory, process count and CPU in the compose file). The bare-metal
method of docs/SETUP.md is for Linux, which has /proc. So no
documented setup is affected. The case is a host outside them: a
developer who starts the service on macOS, and the tests that do so.

This guard is new on dev. The 3.1 line does not have it. A guard
should check at start that it can see what it guards, and say so when
it cannot.

What needs doing

  1. A self-check at start: the service starts one child and finds it
    by the same route it uses for a command.
  2. When the check fails, the service refuses to start, or every
    result and the health answer say "resource limits not enforced".
    Say in the pull request which of the two and why.
  3. The children of a command that go to the background are still
    counted and cleaned up.

Done when

  • A test of the self-check runs on Linux in CI with the process
    list made unreadable. It is not one of the tests that are skipped
    on a host without /proc.
  • The health answer shows the state.
  • docs/SETUP.md says what the bare-metal method needs for the
    limits to work.

Where to start

  • sandbox/resource_contract.py, sandbox/executor_server.py,
    tests/infrastructure/test_execution_resource_contract.py.
  • No GPU or model is needed.
Dominant language
Python
Stars
2.1k
Forks
197
Avg merge
12h 11m
Merged PRs (30d)
146

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from inferstep/ATLAS

All issues in inferstep/ATLAS

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.