qemu-aarch64 hangs running cargo test after libc6 upgrade to 2.36-9+deb12u6
Host environment
- Operating system: Debian
- OS/kernel version: Debian GNU/Linux 12 (bookworm)/Linux ci0700000004610 6.5.0-28-generic #29~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr 4 14:39:20 UTC 2 x86_64 GNU/Linux
- Architecture: X86_64
- QEMU flavor: qemu-aarch64
- QEMU version: qemu-aarch64 version 9.0.50 (v9.0.0-92-g88daa112d4)
- QEMU command line:
./qemu-aarch64 -L /usr/aarch64-linux-gnu target/aarch64-unknown-linux-gnu/debug/deps/test_test-9f11cf636d714707
Emulated/Virtualized environment
- Operating system: Debian
- OS/kernel version: Debian GNU/Linux 12 (bookworm)
- Architecture: ARM64
Description of problem
qemu-aarch64 seems to hang with 100% cpu usage without any indication. with -p 12345 for gdb debugging, gdb could not interrupt the remote with ctrl-c.
Steps to reproduce
- Ensure the test env has 2.36-9+deb12u6
- Install the latest rust toolchain.
- mkdir test_test && cargo init
- ensure src/main.rs has
fn main() {
println!("Hello, world!");
}
#[test]
fn test() {
println!("hAAA!");
}
- create .cargo/config.toml
[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
runner = "qemu-aarch64 -L /usr/aarch64-linux-gnu"
rustflags = ["-C", "target-cpu=neoverse-n1"]
- cargo test --target aarch64-unknown-linux-gnu
logs
logs with -d exec
new(bad) libc6:
old libc6:
Additional information
The issue does not seem to occur with libc6:2.36-9+deb12u4
The same binary runs fine on a real arm64 target with the upgraded libc6 version 2.36-9+deb12u6.
Edited by tug tugtug