Test deadlock on single-cpu systems
Author: sanvilaCreated Jun 15, 2026Updated Jul 7, 2026
Hello. When I try to build this (version 0.2.108, from Debian) on a system with 1 CPU, the tests timeout:
[...]
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running `CARGO=/usr/bin/cargo CARGO_MANIFEST_DIR=/<<PKGBUILDDIR>> CARGO_MANIFEST_PATH=/<<PKGBUILDDIR>>/Cargo.toml
CARGO_PKG_AUTHORS='The wasm-bindgen Developers' CARGO_PKG_DESCRIPTION='Easy support for interacting between JS and Ru
st.
' CARGO_PKG_HOMEPAGE='https://wasm-bindgen.github.io/wasm-bindgen' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LIC
ENSE_FILE='' CARGO_PKG_NAME=wasm-bindgen CARGO_PKG_README=README.md CARGO_PKG_REPOSITORY='https://github.com/wasm-bind
gen/wasm-bindgen' CARGO_PKG_RUST_VERSION=1.71 CARGO_PKG_VERSION=0.2.108 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MI
NOR=2 CARGO_PKG_VERSION_PATCH=108 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/<<PKGBUILDDIR>>/target/x86_64-unknown-lin
ux-gnu/release:/<<PKGBUILDDIR>>/target/x86_64-unknown-linux-gnu/release/deps:/usr/lib/rustlib/x86_64-unknown-linux-gnu
/lib' OUT_DIR=/<<PKGBUILDDIR>>/target/x86_64-unknown-linux-gnu/release/build/wasm-bindgen-c0ce613feb8f45be/out /<<PKGB
UILDDIR>>/target/x86_64-unknown-linux-gnu/release/deps/non_wasm_test-5d31c15a506465bf`
running 2 tests
test test ...
E: Build killed with signal TERM after 60 minutes of inactivity
--------------------------------------------------------------------------------
On a machine with 2 CPUs the build takes around 5 minutes to finish, so this looks like a deadlock to me.
Is it really necessary to use the condvar watcher in tests/non_wasm_test.rs? (It looks like the root of the problem to me)
To reproduce this very easily, please just try to run the tests after configuring GRUB with GRUB_CMDLINE_LINUX="nr_cpus=1" and rebooting.
Thanks.
Source: wasm-bindgen/wasm-bindgen