Skip to content

[Bug]: isolated timeout cleanup can wait indefinitely for process reaping #1057

Closed

Description

@XuPeng-SH

Existing issue

  • Checked existing isolated-cleanup/process-reap issue titles; no duplicate found.

Version and environment

Astra0.2.11, revision d22b68c; native macOS arm64. Rust1.97 normal tests and rustc1.101.0-nightly(e9bbadf68) with rebuilt ThreadSanitizer standard library. No live provider/database dependency.

Actual behavior

An isolated Bash invocation reaches its operation timeout but cleanup can remain pending in Tokio child.kill().await, which includes waiting for exit. The existing canonical isolated-timeout test and real Server timeout producer exceed the unchanged strict30s test limit. The leader is already an exited process awaiting reaping while the parent runtime is parked.

An independent detached diagnostic build changes only phase prints: spawned → owner-start completed → deadline → before kill; no after-kill, then30.092s timeout. The ordinary Server test passes in about0.2s. A minimal Tokio kill/wait sanitizer probe passes, so the upstream reason for lost progress is not established and this is not claimed to be a blanket sanitizer limitation. A prior runtime binary also hangs: causality to the workdir correction is not established.

Expected behavior

Timeout, cancellation and startup-failure cleanup must have bounded progress independent of a signal wake. Observe real exit status; attempt owned descendant cleanup; return uncertain/unsettled facts when proof fails. Never promote kill delivery or forced supervisor termination into a settlement receipt. Preserve owner-first Linux supervisor shutdown and ownership custody during future drop.

Steps to reproduce

Run the existing process_isolation::tests::execute_isolated_timeout and server::runtime_tool_executor::tests::bash_timeout_emits_tool_timeout_work_surface_metadata using native rebuilt-std ThreadSanitizer and the repository strict Nextest profile. The latter runs a short timeout around a command that writes a marker then sleeps. No command timeout or test timeout increase is needed.

Additional information

Found while verifying #1051/#1050. The correction is in the canonical astra-sandbox isolated owner and its framed consumer: bounded actual-status polling, supervisor-first cleanup, guard custody and existing bounded output drain. Final affected validation and review are required before updating the PR. Linux subreaper/cgroup/framed execution remains a platform CI obligation; native Darwin evidence does not cover those cfg paths.

Activity

  1. added
    kind/bug
    on Oct 17, 2026
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

    kind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions