Skip to content

fix(component-runtime): retry a stdio sidecar spawn that hits ETXTBSY #907

Closed

Description

@Goldziher

alef-component-runtime 0.128.0 spawns a stdio sidecar once with no retry (src/stdio/process.rs:30-36). On Linux, a sidecar executable that was just installed can fail to start with Text file busy (os error 26). Another thread forks while the installer's write descriptor is still open, and the child holds that descriptor until exec. This flakes poly's CI (Goldziher/polylint#138, in crates/poly-component-host/tests/sidecar.rs) and can hit any multi-threaded host that installs and then starts a sidecar.

Fix: wrap the spawn in a bounded retry on std::io::ErrorKind::ExecutableFileBusy. cargo and rustup handle it the same way, and so does poly in crates/poly-cli/src/doctor/probe.rs (200 tries, 10 ms apart). Add unit tests for the helper: busy N times then Ok, and busy until the retries run out.

Activity

  1. Goldziher commented on Nov 8, 2026

    @Goldziher
    MemberAuthor

    Fixed in 153db0d, released in 0.129.0: the sidecar spawn retries a bounded number of times on std::io::ErrorKind::ExecutableFileBusy (200 tries, 10 ms apart), with unit tests for the helper.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions