Skip to content

[Bubblewrap] Proxy-only egress: slirp4netns dying mid-run leaves the sandbox with a broken network and no error #935

Closed

Description

Relevant area(s)

Linux (Bubblewrap backend)

Brief description of your issue

Bubblewrap proxy-only networking (schema 0.8+) runs slirp4netns as the sandbox's only connectivity provider, supervised by a helper process that also installs the egress rules. Teardown was hardened in #931 — stop() logs slirp's exit status and a bounded stderr tail — but nothing observes slirp for the lifetime of the workload.

If slirp4netns (or the supervisor) dies after readiness is signalled and before the workload finishes, the sandbox keeps running with a network that silently stops working. Every outbound connection fails with a generic transport error, the run is attributed to whatever the workload reported, and the actual cause is only visible in the supervisor's stderr after the fact.

There is a related, narrower race: slirp can die between the readiness poll succeeding and the gate being released, so a sandbox can start against a connectivity provider that is already gone.

Note this is a diagnosability and reliability problem, not a containment bypass: a dead slirp removes connectivity rather than granting it, and the egress rules live in the sandbox's own network namespace, so they stay in force.

Source: adversarial review of #931 (High, reliability axis). Deferred from that PR because the fix needs a real design (a monitor with a defined ownership and teardown story), not a local change.

Steps to reproduce

  1. Run a Bubblewrap sandbox with schema 0.8.0-alpha and network.proxy configured, using a long-running workload (e.g. a loop issuing an HTTPS request every second through the proxy).
  2. From the host, identify the slirp4netns process for that sandbox and kill -9 it.
  3. Observe the workload's subsequent requests.

Expected behavior

Loss of the connectivity provider should be detected while the workload is running. The sandbox should be terminated (or the failure surfaced) with an error that names slirp's exit status and stderr, so the caller can distinguish "the network provider died" from "the workload's requests failed".

Additionally, slirp's liveness should be rechecked immediately before the startup gate is released, closing the window between the readiness poll and the workload starting.

Actual behavior

Nothing monitors slirp or the supervisor during the run. The workload continues with a broken network and receives only generic connection errors; the real cause is available solely in the supervisor's stderr, and only once teardown runs.

Activity

  1. added
    Priority2High-impact issue affecting key functionality; prioritize for the next appropriate release.
    and removed
    Needs-TriageHas not yet been reviewed, classified, and routed.
    on Aug 18, 2026
  2. added
    Backend-LXCLinux container isolation implemented with LXC.
    Backend-ProcessContainerWindows ProcessContainer behavior, including BaseContainer and AppContainer isolation tiers.
    on Aug 18, 2026
  3. github-actions commented on Aug 18, 2026

    @github-actions

    Triage complete.

    Labels applied: Container-Process, Area-Executor-LXC (in addition to the existing Issue-Bug and OS-Linux).

    Owners assigned: Soham Das (@SohamDas2021) (already assigned — Linux/Bubblewrap), @bbonaby (networking/proxy/iptables on Linux — owns the slirp4netns supervision and egress-rule area).

    Needs-Triage has been removed.

    Maintainers: Comment /investigate to check whether this issue or bug is valid against the most current code. Copilot will also produce a report with the changes that will be needed. For a small, unambiguous documentation or test fix, it may also create one draft PR.

    Generated by 🏷️ Issue Triage for #935 · sonnet46 · 25.7 AIC · ⌖ 5.32 AIC · ⊞ 7.5K · ◷

  4. added
    Priority3Moderate or limited impact; address as capacity permits.
    and removed
    Priority2High-impact issue affecting key functionality; prioritize for the next appropriate release.
    on Sep 2, 2026
  5. added
    Priority2High-impact issue affecting key functionality; prioritize for the next appropriate release.
    and removed
    Priority3Moderate or limited impact; address as capacity permits.
    on Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Backend-LXCLinux container isolation implemented with LXC.Backend-ProcessContainerWindows ProcessContainer behavior, including BaseContainer and AppContainer isolation tiers.Issue-BugSomething is not working as intended.OS-LinuxApplies specifically to Linux hosts or Linux behavior.Priority2High-impact issue affecting key functionality; prioritize for the next appropriate release.

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions