From e8372775579855689d2794bf81f7657fe4a85f11 Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Fri, 21 Aug 2026 10:29:54 +0800 Subject: [PATCH] ci: fix Windows asio-sys link failure; improve Linux crash diagnostics oakaudio: drop cpal's `asio` feature. asio-sys needs the proprietary Steinberg ASIO SDK at link time (undefined ASIOGetSamplePosition etc. on the GNU toolchain); WASAPI remains the Windows backend. ci: the failure-only gdb step passed test args without --args, so gdb treated --nocapture as a core file. Also collect loader-stage evidence for the copier_test dl_main SIGSEGV: IRELATIVE reloc count, LD_DEBUG tail, full backtrace and registers. --- .github/workflows/ci.yml | 18 ++++++++++++++++-- crates/oakaudio/Cargo.toml | 5 ++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64587aaee..76632a458 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -207,7 +207,12 @@ jobs: run: xvfb-run -a -s "-screen 0 1920x1080x24" cargo test --workspace --locked # A crashing (SIGSEGV) test gives no Rust backtrace; rerun the - # plugin test binaries under gdb to capture the native stack. + # crashing test binaries under gdb to capture the native stack. + # `--args` is required — plain `--` makes gdb treat the test args as + # a core file. The extra probes target loader-stage crashes (the + # copier_test SIGSEGV happens inside ld.so's dl_main): how many + # IRELATIVE (ifunc) relocs the binary has, and what the loader was + # doing when it died (LD_DEBUG tail). - name: Backtrace on test failure (Linux) if: failure() run: | @@ -215,7 +220,16 @@ jobs: for name in node_e2e_test suites_test copier_test; do BIN=$(ls -t target/debug/deps/$name-* | grep -v '\.d$' | head -1) [ -n "$BIN" ] || continue - xvfb-run -a gdb -batch -ex run -ex bt -- "$BIN" --nocapture || true + echo "===== $BIN =====" + file "$BIN" || true + echo "IRELATIVE relocs: $(readelf -rW "$BIN" 2>/dev/null | grep -c IRELATIVE)" + LD_DEBUG=files,reloc "$BIN" --list 2>&1 | tail -30 || true + xvfb-run -a gdb -batch \ + -ex run \ + -ex 'bt full' \ + -ex 'info registers rip rsp rbp' \ + -ex 'x/6i $rip' \ + --args "$BIN" --nocapture || true done - name: Test (macOS) diff --git a/crates/oakaudio/Cargo.toml b/crates/oakaudio/Cargo.toml index 2ba338a47..9e67a739c 100644 --- a/crates/oakaudio/Cargo.toml +++ b/crates/oakaudio/Cargo.toml @@ -19,6 +19,9 @@ oakcodec = { path = "../oakcodec" } # dependency above emits the transitive link flags of the static FFmpeg. ffmpeg-next = "9" -cpal = {version = "0.18", features = ["pulseaudio", "pipewire", "jack", "asio"]} +# ASIO is intentionally not enabled: the asio-sys crate needs the proprietary +# Steinberg ASIO SDK at link time, which CI and most dev machines do not have. +# WASAPI (the default Windows backend) covers Windows on its own. +cpal = {version = "0.18", features = ["pulseaudio", "pipewire", "jack"]} # `std::error::Error` impls for the crate-internal error enum. thiserror = "2"