The test failure happens on x86_64-pc-linux-gnu multi-lib system. How to reproduce: $ ./configure --enable-maintainer-mode CC='gcc -m32' CXX='g++ -m32' CFLAGS=-g CXXFLAGS=-g LDFLAGS=-g $ make && make check VERBOSE=1 FAIL: run-backtrace-native-biarch.sh ==================================== 0x5652d6481000 0x5652d6486000 /home/slyfox/dev/git/elfutils/tests/backtrace-child-biarch 0x7fe2f83e9000 0x7fe2f85b5000 /lib64/libc-2.29.so 0x7fe2f85b9000 0x7fe2f85d8000 /lib64/libpthread-2.29.so 0x7fe2f8657000 0x7fe2f8681000 /lib64/ld-2.29.so 0x7fff099fc000 0x7fff099fe000 [vdso: 26219] TID 26219: /home/slyfox/dev/git/elfutils/tests/backtrace: dwfl_thread_getframes: no error backtrace: linux-pid-attach.c:318: pid_set_initial_registers: Assertion `pid_arg->tid_attached == 0' failed. ./test-subr.sh: line 84: 26218 Aborted (core dumped) LD_LIBRARY_PATH="${built_library_path}${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" $VALGRIND_CMD "$@" backtrace-child-biarch: no main rmdir: failed to remove 'test-26212': Directory not empty FAIL run-backtrace-native-biarch.sh (exit status: 1) ============================================================================ Testsuite summary for elfutils 0.175 ============================================================================ # TOTAL: 205 # PASS: 203 # SKIP: 1 # XFAIL: 0 # FAIL: 1 # XPASS: 0 # ERROR: 0
I have replicated this, but don't fully understand it yet. But this is kind of a weird issue. If you are building with -m32 on an 64bit system you don't want/cannot have the run-backtrace-native-biarch.sh test. Since that tests 32-bit-on-64-bit. So this is really a configure issue that should notice that -m32 has already been added, so the test should be skipped.
https://bugzilla.redhat.com/show_bug.cgi?id=1201486 Describes the same issue. There is some more discussion on what it would take to make 32bit processes handle 64bit processes on the same host. There is a WIP patch for ppc32-on-ppc64, but it is unclear if this can be extended to other arches.
This disables the "biarch" tests in the case of a 32bit build. commit d85945f1056641180e03fb48ab770b893125786e Author: Mark Wielaard <mark@klomp.org> Date: Mon Mar 21 00:34:24 2022 +0100 configure: Don't check whether -m64 works for 32bit host biarch check Running a 32bit backtrace test against a 64bit binary doesn't work. Only a 64bit binary can backtrace a 32bit binary. So disable the biarch check that inserts -m64 for a 32bit host. https://sourceware.org/bugzilla/show_bug.cgi?id=24158 Signed-off-by: Mark Wielaard <mark@klomp.org> But lets keep this bug open. It would in theory be good if this worked.