Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 688526 - dev-util/ltrace-0.7.3_p4 fails test
Summary: dev-util/ltrace-0.7.3_p4 fails test
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Marek Szuba
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-23 07:31 UTC by Alexey
Modified: 2021-07-19 10:15 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (file_688526.txt,18.17 KB, text/plain)
2019-06-23 07:31 UTC, Alexey
Details
build.log (build.log,60.54 KB, text/x-log)
2019-06-23 07:32 UTC, Alexey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey 2019-06-23 07:31:55 UTC
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
Comment 1 Alexey 2019-06-23 07:32:26 UTC
Created attachment 580480 [details]
build.log
Comment 2 Alexey 2019-06-23 07:33:48 UTC
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 +++
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2019-06-23 07:55:36 UTC
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?
Comment 4 Alexey 2019-06-23 08:28:22 UTC
I retried it without changing CFLAGS, and it succeeded this time...
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2019-06-23 10:04:35 UTC
Oh, maybe it's some sort of a race in test suite.
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2019-06-23 10:48:45 UTC
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
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2019-06-24 06:33:27 UTC
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.
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2019-07-03 06:52:03 UTC
(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.
Comment 9 Marek Szuba archtester gentoo-dev 2021-07-19 10:15:56 UTC
Doesn't seem to be a problem any more but go ahead and reopen if this still persists in recent ebuilds.