Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 632394

Summary: dev-util/rr-4.5.0 : fails tests, 64bit_child (Failed) and more
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: normal CC: lu_zero, mudler, slyfox
Priority: Normal Keywords: TESTFAILURE
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
dev-util:rr-4.5.0:20170929-085219.log.bz2
emerge-history.txt
environment
etc.portage.tbz2
LastTest.log.bz2
logs.tbz2
tests.tbz2

Description Toralf Förster gentoo-dev 2017-09-29 16:07:16 UTC
The following tests FAILED:
	  1 - 64bit_child (Failed)
	  2 - 64bit_child-no-syscallbuf (Failed)
	  3 - _llseek (Failed)
	  4 - _llseek-no-syscallbuf (Failed)

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 13.0-desktop_libressl_20170918-162903

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-6.4.0 *
llvm-config:
3.9.1
Available Python interpreters, in order of preference:
  [1]   python3.4
  [2]   python3.6 (fallback)
  [3]   python2.7 (fallback)

java-config:
The following VMs are available for generation-2:
1)	IcedTea JDK 7.2.6.11 [icedtea-bin-7]
*)	IcedTea JDK 3.5.1 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-7 
  [2]   icedtea-bin-8  system-vm

emerge -qpv dev-util/rr
[ebuild  N    ] dev-util/rr-4.5.0  USE="{-test}" PYTHON_TARGETS="python2_7"
Comment 1 Toralf Förster gentoo-dev 2017-09-29 16:07:19 UTC
Created attachment 497058 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-09-29 16:07:22 UTC
Created attachment 497060 [details]
dev-util:rr-4.5.0:20170929-085219.log.bz2
Comment 3 Toralf Förster gentoo-dev 2017-09-29 16:07:25 UTC
Created attachment 497062 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2017-09-29 16:07:28 UTC
Created attachment 497064 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2017-09-29 16:07:31 UTC
Created attachment 497066 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2017-09-29 16:07:35 UTC
Created attachment 497068 [details]
LastTest.log.bz2
Comment 7 Toralf Förster gentoo-dev 2017-09-29 16:07:38 UTC
Created attachment 497070 [details]
logs.tbz2
Comment 8 Toralf Förster gentoo-dev 2017-09-29 16:07:41 UTC
Created attachment 497072 [details]
tests.tbz2
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2019-11-10 21:02:06 UTC
Does it fail on modern rr?
Comment 10 Toralf Förster gentoo-dev 2019-11-11 20:31:36 UTC
(In reply to Sergei Trofimovich from comment #9)
> Does it fail on modern rr?

no idea, bug 699886 prevent a current re-test ;)
Comment 11 Sergei Trofimovich (RETIRED) gentoo-dev 2019-11-11 21:50:09 UTC
(In reply to Toralf Förster from comment #10)
> (In reply to Sergei Trofimovich from comment #9)
> > Does it fail on modern rr?
> 
> no idea, bug 699886 prevent a current re-test ;)

Gah! Thank you! I'll have a look.
Comment 12 Sergei Trofimovich (RETIRED) gentoo-dev 2019-11-12 22:26:49 UTC
Tried tests locally and it's quite a disaster :)
"""
2% tests passed, 2144 tests failed out of 2193

Total Test time (real) = 2698.98 sec
"""
Comment 13 Sergei Trofimovich (RETIRED) gentoo-dev 2019-11-12 22:40:01 UTC
Looking at the failure:

"""
[FATAL /tmp/portage/dev-util/rr-5.2.0-r1/work/rr-5.2.0/src/Task.cc:2239:write_bytes_helper() errno: EIO]
 (task 967940 (rec:967602) at time 18)
 -> Assertion `nwritten == buf_size' failed to hold. Should have written 144 bytes to 0x7fff573a98a0, but only wrote -1
warning: No executable has been specified and target does not support
determining executable automatically.  Try using the "file" command.
[FATAL /tmp/portage/dev-util/rr-5.2.0-r1/work/rr-5.2.0/src/log.cc:371:emergency_debug() errno: EIO] Can't resume execution from invalid state
"""

write_bytes_helper() does memory write over ptrace interface. Unfortunately sandbox already runs everything under ptrace. Let's skip test when attempting those under sandbox.
Comment 14 Larry the Git Cow gentoo-dev 2019-11-12 22:45:15 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=899e40469ea6be6d4b4202a6771ecdffd9264e5c

commit 899e40469ea6be6d4b4202a6771ecdffd9264e5c
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-11-12 22:43:56 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-11-12 22:45:09 +0000

    dev-util/rr: run tests only under FEATURE=-usersandbox
    
    rr extensively uses ptrace() to set memory up for replays.
    sandbox is also using ptrace() extensively.
    
    As a result 'rr' can't use ptrace() at all:
    ```
    [FATAL rr-5.2.0-r1/work/rr-5.2.0/src/Task.cc:2239:write_bytes_helper()
        errno: EIO]
     (task 967940 (rec:967602) at time 18)
     -> Assertion `nwritten == buf_size' failed to hold. Should have
       written 144 bytes to 0x7fff573a98a0, but only wrote -1
    ```
    
    Similar to strace test suite allow running tests only under
    FEATURES=-usersandbox.
    
    This makes most tests to start passing for me.
    
    Reported-by: Toralf Förster
    Bug: https://bugs.gentoo.org/632394
    Package-Manager: Portage-2.3.79, Repoman-2.3.18
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 dev-util/rr/rr-5.2.0-r1.ebuild | 9 +++++++++
 1 file changed, 9 insertions(+)
Comment 15 Larry the Git Cow gentoo-dev 2019-11-12 22:52:19 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e015ba7525117156c1672ed8af667e242b4dec02

commit e015ba7525117156c1672ed8af667e242b4dec02
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-11-12 22:52:06 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-11-12 22:52:12 +0000

    dev-util/rr: RESTRICT=test, bug #632394
    
    Too many tests fail due to specific kernel or toolchain version.
    
    Tests are still nice to run to see if anything works at all
    but are not very useful for regression testing.
    
    Closes: https://bugs.gentoo.org/632394
    Package-Manager: Portage-2.3.79, Repoman-2.3.18
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 dev-util/rr/rr-5.2.0-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)