From b6f1f7fd41e9b2ad59ff38409679383a8097caba Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Sun, 23 Aug 2026 17:01:36 +0800 Subject: [PATCH] ci: detach the Linux test watchdog from the step's I/O pipes The background watchdog subshell inherited the step's stdout/stderr; when cargo test finished, its lingering sleep child kept the pipes open and the runner aborted the step with "exec: WaitDelay expired before I/O complete". Redirect the watchdog to /dev/null and reap it after the test so the step's I/O closes cleanly. --- .gitea/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 77d116285..537250fba 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -108,6 +108,9 @@ jobs: sudo apt-get install -y gdb xvfb-run -a -s "-screen 0 1920x1080x24" cargo test --workspace --locked & TEST_PID=$! + # The watchdog inherits the step's stdout/stderr; detach it so + # it cannot keep the runner's I/O pipes open after the step + # ends ("WaitDelay expired before I/O complete" otherwise). ( sleep 1500 echo "::warning::test suite exceeded 1500s; dumping hung-process stacks" @@ -117,11 +120,13 @@ jobs: done pkill -9 -f 'target/debug/deps/' || true pkill -9 -f 'target/debug/oak-worker' || true - ) & + ) >/dev/null 2>&1 & WATCHDOG_PID=$! wait $TEST_PID rc=$? kill $WATCHDOG_PID 2>/dev/null || true + # Reap the watchdog so no child holds the step's pipes. + wait $WATCHDOG_PID 2>/dev/null || true exit $rc # A crashing (SIGSEGV) test gives no Rust backtrace; rerun the