mbox

[bug#36692,0/2] Add GHC 8.6.5

Message ID 20190716154734.22605-1-rob@vllmrt.net
Headers show

Message

Robert Vollmert July 16, 2019, 3:47 p.m. UTC
Seemed like a good idea to have current GHC packaged. This almost works,
except for two real test failures (not sure if these are just on my system),
and some more "stat failures". It would be neat if someone could run the
build and see if they get the same failures.

Unexpected results from:
TEST="T5631 T8108 T9203 T9630 haddock.Cabal haddock.base parsing001 posix010"

SUMMARY for test run started at Tue Jul 16 12:47:07 2019 UTC
 2:44:36 spent to go through
    6525 total tests, which gave rise to
   25446 test cases, of which
   18529 were skipped

      41 had missing libraries
    6782 expected passes
      86 expected failures

       0 caused framework failures
       0 caused framework warnings
       0 unexpected passes
       2 unexpected failures
       6 unexpected stat failures

Unexpected failures:
   ../../libraries/unix/tests/T8108.run              T8108 [bad stderr] (normal)
   ../../libraries/unix/tests/libposix/posix010.run  posix010 [bad exit code] (normal)

Unexpected stat failures:
   perf/compiler/T5631.run         T5631 [stat too good] (normal)
   perf/compiler/parsing001.run    parsing001 [stat too good] (normal)
   perf/compiler/T9630.run         T9630 [stat not good enough] (normal)
   perf/haddock/haddock.base.run   haddock.base [stat too good] (normal)
   perf/haddock/haddock.Cabal.run  haddock.Cabal [stat too good] (normal)
   perf/should_run/T9203.run       T9203 [stat too good] (normal)


First failure:

cd "../../libraries/unix/tests/T8108.run" &&  "/tmp/guix-build-ghc-8.6.5.drv-0/ghc-8.6.5/inplace/bin/ghc-stage2" -o T8108 T8108.hs -dcore-lint -dcmm-lint -no-user-package-db -rtso
pts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -dno-debug-output  -package unix
cd "../../libraries/unix/tests/T8108.run" && ./T8108  
Actual stderr output differs from expected:
diff -uw "/dev/null" "../../libraries/unix/tests/T8108.run/T8108.run.stderr.normalised"
*** unexpected failure for T8108(normal)


Second failure:

cd "../../libraries/unix/tests/libposix/posix010.run" && ./posix010  
Wrong exit code for posix010(normal)(expected 0 , actual 1 )
Stderr ( posix010 ):
posix010: getUserEntryForName: does not exist (no such user)
*** unexpected failure for posix010(normal)

Dmesg output, possibly related:

[250906.659949] derefnull[32322]: segfault at 0 ip 0000000000405bd1 sp 00007fffffff90e8 error 4 in derefnull[402000+88000]
[250906.659980] Code: 00 00 00 e9 99 4a 07 00 90 00 00 00 00 00 00 00 00 1e 00 00 00 00 00 00 00 49 83 c4 10 4d 3b a5 58 03 00 00 77 d2 48 8b 43 07 <48> 8b 00 4
9 c7 44 24 f8 98 3c 46 00 49 89 04 24 49 8d 5c 24 f9 48
[250908.941498] traps: divbyzero[32344] trap divide error ip:46308f sp:7fffffff90e8 error:0 in divbyzero[402000+88000]


Robert Vollmert (2):
  gnu: Rename ghc-8 to ghc-8.4
  gnu: Add GHC 8.6.5

 gnu/packages/haskell.scm | 31 +++++++++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)

Comments

Robert Vollmert July 16, 2019, 4 p.m. UTC | #1
I was able to run both tests from the build directory in /tmp,
and they both passed fine. Also they both involve user ids, I
suspect those might differ in the build container?

main = do
    void $ forkIO $ forever $ getGroupEntryForID 0
    void $ forkIO $ forever $ getGroupEntryForID 0
    threadDelay (3*1000*1000)

main = do
    root <- getUserEntryForName "root"
    putStrLn (ue2String root)
    root' <- getUserEntryForID (userID root)
    putStrLn (ue2String root')
    if homeDirectory root == homeDirectory root' &&
       userShell     root == userShell     root'
        then putStrLn "OK"
        else putStrLn “Mismatch"
Marius Bakke July 16, 2019, 4:28 p.m. UTC | #2
Robert Vollmert <rob@vllmrt.net> writes:

> I was able to run both tests from the build directory in /tmp,
> and they both passed fine. Also they both involve user ids, I
> suspect those might differ in the build container?
>
> main = do
>     void $ forkIO $ forever $ getGroupEntryForID 0
>     void $ forkIO $ forever $ getGroupEntryForID 0
>     threadDelay (3*1000*1000)
>
> main = do
>     root <- getUserEntryForName "root"
>     putStrLn (ue2String root)
>     root' <- getUserEntryForID (userID root)
>     putStrLn (ue2String root')
>     if homeDirectory root == homeDirectory root' &&
>        userShell     root == userShell     root'
>         then putStrLn "OK"
>         else putStrLn “Mismatch"

The only reliable user ID available in the build container is 'nobody'
with UID and GID 65534 and the (see nix/libstore/build.cc:1862).

You can likely patch these tests to refer to that instead.
Robert Vollmert July 16, 2019, 4:36 p.m. UTC | #3
> On 16. Jul 2019, at 18:28, Marius Bakke <mbakke@fastmail.com> wrote:
> 
> Robert Vollmert <rob@vllmrt.net> writes:
> 
>> I was able to run both tests from the build directory in /tmp,
>> and they both passed fine. Also they both involve user ids, I
>> suspect those might differ in the build container?
>> 
>> main = do
>>    void $ forkIO $ forever $ getGroupEntryForID 0
>>    void $ forkIO $ forever $ getGroupEntryForID 0
>>    threadDelay (3*1000*1000)
>> 
>> main = do
>>    root <- getUserEntryForName "root"
>>    putStrLn (ue2String root)
>>    root' <- getUserEntryForID (userID root)
>>    putStrLn (ue2String root')
>>    if homeDirectory root == homeDirectory root' &&
>>       userShell     root == userShell     root'
>>        then putStrLn "OK"
>>        else putStrLn “Mismatch"
> 
> The only reliable user ID available in the build container is 'nobody'
> with UID and GID 65534 and the (see nix/libstore/build.cc:1862).
> 
> You can likely patch these tests to refer to that instead.

Thanks, I’ll give that a shot!


There’s something I don’t understand: Comments above the definition
of ghc-7 mention test failures, particularly one of these (posix010):

;; - Test posix010 tries to check the existence of a user on the system:
;;   getUserEntryForName: does not exist (no such user)

But I don’t see any place in the definitions of any of the GHC packages
(ghc-7, ghc-8.0, ghc-8.4) that patch any tests out, and tests aren’t
disabled either. So how can these packages apparently be fine?
Marius Bakke July 16, 2019, 4:45 p.m. UTC | #4
Robert Vollmert <rob@vllmrt.net> writes:

>> On 16. Jul 2019, at 18:28, Marius Bakke <mbakke@fastmail.com> wrote:
>> 
>> Robert Vollmert <rob@vllmrt.net> writes:
>> 
>>> I was able to run both tests from the build directory in /tmp,
>>> and they both passed fine. Also they both involve user ids, I
>>> suspect those might differ in the build container?
>>> 
>>> main = do
>>>    void $ forkIO $ forever $ getGroupEntryForID 0
>>>    void $ forkIO $ forever $ getGroupEntryForID 0
>>>    threadDelay (3*1000*1000)
>>> 
>>> main = do
>>>    root <- getUserEntryForName "root"
>>>    putStrLn (ue2String root)
>>>    root' <- getUserEntryForID (userID root)
>>>    putStrLn (ue2String root')
>>>    if homeDirectory root == homeDirectory root' &&
>>>       userShell     root == userShell     root'
>>>        then putStrLn "OK"
>>>        else putStrLn “Mismatch"
>> 
>> The only reliable user ID available in the build container is 'nobody'
>> with UID and GID 65534 and the (see nix/libstore/build.cc:1862).
>> 
>> You can likely patch these tests to refer to that instead.
>
> Thanks, I’ll give that a shot!
>
>
> There’s something I don’t understand: Comments above the definition
> of ghc-7 mention test failures, particularly one of these (posix010):
>
> ;; - Test posix010 tries to check the existence of a user on the system:
> ;;   getUserEntryForName: does not exist (no such user)
>
> But I don’t see any place in the definitions of any of the GHC packages
> (ghc-7, ghc-8.0, ghc-8.4) that patch any tests out, and tests aren’t
> disabled either. So how can these packages apparently be fine?

It looks like failing tests don't cause these builds to fail for some
reason.

Here is an excerpt from the GHC 7 build log on 'core-updates' [0]:

Unexpected results from:
TEST="T8108 process002 process001 posix010 exec_signals T9203 T9961 parsing001 haddock.base"

OVERALL SUMMARY for test run started at Wed Jul 10 09:03:57 2019 UTC
 0:59:45 spent to go through
    4434 total tests, which gave rise to
   17996 test cases, of which
   13907 were skipped

      49 had missing libraries
    3989 expected passes
      42 expected failures

       1 caused framework failures
       0 unexpected passes
       5 unexpected failures
       4 unexpected stat failures

Unexpected failures:
   ../../libraries/process/tests        process001 [bad exit code] (normal)
   ../../libraries/process/tests        process002 [bad exit code] (normal)
   ../../libraries/unix/tests           T8108 [bad stderr] (normal)
   ../../libraries/unix/tests/libposix  posix010 [bad exit code] (normal)
   rts                                  exec_signals [bad exit code] (normal)

Unexpected stat failures:
   perf/compiler    T9961 [stat not good enough] (normal)
   perf/compiler    parsing001 [stat too good] (normal)
   perf/haddock     haddock.base [stat too good] (normal)
   perf/should_run  T9203 [stat too good] (normal)

make[2]: Leaving directory '/tmp/guix-build-ghc-7.10.2.drv-0/ghc-7.10.2/testsuite/tests'
make[1]: Leaving directory '/tmp/guix-build-ghc-7.10.2.drv-0/ghc-7.10.2/testsuite/tests'
phase `check' succeeded after 3588.0 seconds

[0]: https://ci.guix.gnu.org/log/42f20g43jaxs27jd407wn6fad9cpwjf7-ghc-7.10.2
Robert Vollmert July 16, 2019, 7 p.m. UTC | #5
> On 16. Jul 2019, at 18:28, Marius Bakke <mbakke@fastmail.com> wrote:
> 
> Robert Vollmert <rob@vllmrt.net> writes:
> 
>> I was able to run both tests from the build directory in /tmp,
>> and they both passed fine. Also they both involve user ids, I
>> suspect those might differ in the build container?
>> 
>> main = do
>>    void $ forkIO $ forever $ getGroupEntryForID 0
>>    void $ forkIO $ forever $ getGroupEntryForID 0
>>    threadDelay (3*1000*1000)
>> 
>> main = do
>>    root <- getUserEntryForName "root"
>>    putStrLn (ue2String root)
>>    root' <- getUserEntryForID (userID root)
>>    putStrLn (ue2String root')
>>    if homeDirectory root == homeDirectory root' &&
>>       userShell     root == userShell     root'
>>        then putStrLn "OK"
>>        else putStrLn “Mismatch"
> 
> The only reliable user ID available in the build container is 'nobody'
> with UID and GID 65534 and the (see nix/libstore/build.cc:1862).
> 
> You can likely patch these tests to refer to that instead.

I chose to skip them instead — specializing them to nobody/65534 doesn’t
seem helpful in the end.