Skip to content

bug(sandbox): long-lived sandboxes stop accepting execs after 4096 requests #4103

Description

@drew

User Story

I need to keep issuing commands in long-lived OpenShell sandboxes without a lifetime exec request count limit. I can accept a bounded period for retrying a request after a transport failure.

Problem Statement

The sandbox boundary retains every admitted exec request ID for its lifetime and rejects new requests after 4,096 IDs. Completed processes do not free those slots. This behavior is present in v0.1.0 through v0.1.2.

Impact / Why This Matters

An automation that issues an exec every two seconds reaches the cap in approximately 2 hours 16 minutes. A healthy sandbox then needs to be recreated or its runtime patched to continue accepting commands, interrupting workflows that need persistent sandbox state.

Acceptance Criteria

  • A sandbox continues accepting sequential exec requests after 4,096 earlier requests.
  • Transport recovery within the supported retry period does not launch the same command twice.
  • Requests whose retry deadline has expired fail, including delayed first attempts.
  • Old replay records can be reclaimed without accepting expired requests again.
  • Expiration does not stop an already running command, and the same sandbox accepts fresh requests afterward.

Reproduction Steps

On an OpenShell v0.1.2 deployment:

openshell sandbox create --name exec-limit-repro --detach
for n in $(seq 1 4097); do
  openshell sandbox exec --name exec-limit-repro --no-tty -- /bin/true || break
done

The boundary eventually rejects a new command with boundary generation exec request limit reached.

Suggested UX

Keep the existing openshell sandbox exec command. Permit ongoing execs without a lifetime count limit, and report an uncertain execution outcome when startup recovery expires so users can inspect the sandbox before resubmitting work with side effects.

Environment

  • Affected OpenShell releases: v0.1.0, v0.1.1, and v0.1.2.
  • Component: Linux sandbox boundary exec admission, shared across compute drivers.
  • Investigation: tagged runtime source and boundary process/replay tests.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:sandboxSandbox runtime and isolation work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions