From 77214bff7903972aeddb3b8a589d97a28dcfa628 Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Thu, 24 Sep 2026 15:45:13 +0800 Subject: [PATCH] ci(macos): sample hung test processes; more Windows switch diagnostics - The macOS Test step gets the same in-script watchdog as Linux/openKylin: after 900 s it prints `sample` stacks of every test process (the hung test's native stack lands in the log) and kills the suite, instead of leaving the job to sit until the step timeout with no evidence. - The multicam graph test additionally prints the `current_in` read-back after the switch, so the next Windows run distinguishes a lost selector write from a row/element resolution problem. --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++--- crates/oak-app/src/oakui/renderops.rs | 6 ++++++ 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fff2a1433..ec2c4d02f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -501,10 +501,32 @@ jobs: run: | # Retry once (same policy as the other platforms): worker-pool # startup under full-suite parallelism has flaked on Linux. A - # real regression fails both passes. - if ! cargo test --workspace --locked; then + # real regression fails both passes. A hang trips the in-script + # watchdog, which samples the test processes (the offending + # test's native stack lands in the log) before killing the suite. + run_suite() { + cargo test --workspace --locked & + TEST_PID=$! + ( + sleep 900 + echo "::warning::macOS test suite exceeded 900s; sampling hung processes" + for p in $(pgrep -f 'target/debug/deps/' || true); do + echo "===== sample of pid $p =====" + sample "$p" 2 10 2>&1 | head -120 || true + done + pkill -9 -f 'target/debug/deps/' || true + pkill -9 -f 'target/debug/oak-worker' || true + ) & + WATCHDOG_PID=$! + wait $TEST_PID + rc=$? + kill $WATCHDOG_PID 2>/dev/null || true + wait $WATCHDOG_PID 2>/dev/null || true + return $rc + } + if ! run_suite; then echo "first pass failed; retrying once for worker-pool flakes" - cargo test --workspace --locked + run_suite fi # A SIGSEGV in a test binary gives no Rust backtrace; Apple's crash diff --git a/crates/oak-app/src/oakui/renderops.rs b/crates/oak-app/src/oakui/renderops.rs index 2e45d0996..76c6eb339 100644 --- a/crates/oak-app/src/oakui/renderops.rs +++ b/crates/oak-app/src/oakui/renderops.rs @@ -2646,6 +2646,12 @@ mod tests { -1, oak_node::value::NodeValue::Combo(1), ); + // Diagnostic (the Windows-only switch failure): confirm the + // evaluator can see the new selector. + println!( + "multicam current_in read-back: {:?}", + core.standard_value(oak_node::nodes::multicamnode::CURRENT_INPUT, -1) + ); } } let (r1, b1) = render_rgb(0);