Created attachment 580478 [details] emerge --info Running ./ltrace.main/main-threaded.exp ... FAIL: test case execution failed exec sh -c {export LD_LIBRARY_PATH=/mnt/portagetmp/portage/dev-util/ltrace-0.7.3_p4/work/ltrace-0.7.3/testsuite/ltrace.main; /mnt/portagetmp/portage/dev-util/ltrace-0.7.3_p4/work/ltrace-0.7.3/testsuite/../ltrace -l libmain-threaded.so -f -o /mnt/portagetmp/portage/dev-util/ltrace-0.7.3_p4/work/ltrace-0.7.3/testsuite/ltrace.main/main-threaded.ltrace /mnt/portagetmp/portage/dev-util/ltrace-0.7.3_p4/work/ltrace-0.7.3/testsuite/ltrace.main/main-threaded ;exit}disable_breakpoint pid=439, addr=0x556a934c6186: No such process PTRACE_SINGLESTEP: No such process 439 couldn't continue when handling (null) (0x556a934c6186) at 0xffffffffffffffff disable_breakpoint pid=437, addr=0x556a934c6186: No such process while executing "exec sh -c {export LD_LIBRARY_PATH=/mnt/portagetmp/portage/dev-util/ltrace-0.7.3_p4/work/ltrace-0.7.3/testsuite/ltrace.main; /mnt/portagetmp/portage/..." invoked from within "catch $command output"FAIL: print in /mnt/portagetmp/portage/dev-util/ltrace-0.7.3_p4/work/ltrace-0.7.3/testsuite/ltrace.main/main-threaded.ltrace for 16 times, should be 30
Created attachment 580480 [details] build.log
main-threaded.ltrace: 440 main-threaded->print(0x556a934c700c, 0, 0xb455ada7ffbcc948, 0x7f1ae7abb700 <unfinished ...> 439 main-threaded->print(0x556a934c7008, 0, 0xb455b2a7dfbcc948, 0x7f1ae82bc700 <unfinished ...> 438 main-threaded->print(0x556a934c7004, 0, 0xb455b3a73fbcc948, 0x7f1ae8abd700 <unfinished ...> 440 <... print resumed> ) = 4 440 main-threaded->print(0x556a934c700c, 0, 0x7f1ae8ca08a0, 0x7f1ae8beac39) = 4 440 main-threaded->print(0x556a934c700c, 0, 0x7f1ae8ca08a0, 0 <unfinished ...> 439 <... print resumed> ) = 4 440 <... print resumed> ) = 4 439 main-threaded->print(0x556a934c7008, 0, 0x7f1ae8ca08a0, 0x7f1ae8beac39) = 4 439 main-threaded->print(0x556a934c7008, 0, 0x7f1ae8ca08a0, 0) = 4 438 <... print resumed> ) = 4 440 main-threaded->print(0x556a934c700c, 0, 0x7f1ae8ca08a0, 0) = 4 439 main-threaded->print(0x556a934c7008, 0, 0x7f1ae8ca08a0, 0) = 4 438 unexpected breakpoint at 0x556a934c6186 440 main-threaded->print(0x556a934c700c, 0, 0x7f1ae8ca08a0, 0 <unfinished ...> 439 main-threaded->print(0x556a934c7008, 0, 0x7f1ae8ca08a0, 0 <no return ...> 438 --- SIGSEGV (Segmentation fault) --- 439 <... print resumed> ) = 4 440 +++ killed by SIGSEGV +++ 439 +++ killed by SIGSEGV +++ 438 +++ killed by SIGSEGV +++ 437 +++ killed by SIGSEGV +++
The run looks not too bad, only 2 tests failed: === Summary === # of expected passes 215 # of unexpected failures 2 I see you are using -march=bdver2 and -ggdb3 in CFLAGS. I use -march=sandybridge and all tests pass for me with and without -ggdb3. If you drop -march= flag from CFLAGS just for ltrace does it make all tests pass?
I retried it without changing CFLAGS, and it succeeded this time...
Oh, maybe it's some sort of a race in test suite.
Reproduced under the load as: $ while time ebuild ltrace-0.7.3_p4.ebuild clean test; do echo again; done FAIL: test case execution failed exec sh -c {export LD_LIBRARY_PATH=/tmp/portage/dev-util/ltrace-0.7.3_p4/work/ltrace-0.7.3/testsuite/ltrace.main; /tmp/portage/dev-util/ltrace-0.7.3_p4/work/ltrace-0.7.3/testsuite/../ltrace -l libmain-threaded.so -f -o /tmp/portage/dev-util/ltrace-0.7.3_p4/work/ltrace-0.7.3/testsuite/ltrace.main/main-threaded.ltrace /tmp/portage/dev-util/ltrace-0.7.3_p4/work/ltrace-0.7.3/testsuite/ltrace.main/main-threaded ;exit}disable_breakpoint pid=0, addr=0x55ecb5eb3050: No such process PTRACE_SINGLESTEP: No such process 0 couldn't continue when handling print (0x55ecb5eb3050) at 0xffffffffffffffff disable_breakpoint pid=12598, addr=0x55ecb5eb3050: No such process while executing "exec sh -c {export LD_LIBRARY_PATH=/tmp/portage/dev-util/ltrace-0.7.3_p4/work/ltrace-0.7.3/testsuite/ltrace.main; /tmp/portage/dev-util/ltrace-0.7.3_..." invoked from within "catch $command output"FAIL: print in /tmp/portage/dev-util/ltrace-0.7.3_p4/work/ltrace-0.7.3/testsuite/ltrace.main/main-threaded.ltrace for 20 times, should be 30 === Summary === # of expected passes 215 # of unexpected failures 2 make[4]: *** [Makefile:490: check-DEJAGNU] Error 1
Faster reproducer: ltrace-0.7.3/testsuite/ltrace.main $ while ( export LD_LIBRARY_PATH=.; ../../ltrace -l libmain-threaded.so -f -o main-threaded.ltrace ./main-threaded >/dev/null; ); do :; done This looks more like a race in ltrace itself to handle breakpoints in treaded programs.
(In reply to Sergei Trofimovich from comment #7) > Faster reproducer: > > ltrace-0.7.3/testsuite/ltrace.main $ > while ( export LD_LIBRARY_PATH=.; ../../ltrace -l libmain-threaded.so -f > -o main-threaded.ltrace ./main-threaded >/dev/null; ); do :; done > > This looks more like a race in ltrace itself to handle breakpoints in > treaded programs. This exposes two bugs: - ltrace itself SIGSEGVs when tries to access tracee's context when tracee is already dies - traced process SIGSEGVs for unknown reason Needs a bit more poking.
Doesn't seem to be a problem any more but go ahead and reopen if this still persists in recent ebuilds.