[GHC] #14074: fdReadBuf001 fails non-deterministically on FreeBSD

GHC ghc-devs at haskell.org
Tue Aug 1 14:57:15 UTC 2017


#14074: fdReadBuf001 fails non-deterministically on FreeBSD
--------------------------------------+---------------------------------
           Reporter:  bgamari         |             Owner:  (none)
               Type:  bug             |            Status:  new
           Priority:  normal          |         Milestone:
          Component:  Compiler        |           Version:  8.2.1
           Keywords:                  |  Operating System:  FreeBSD
       Architecture:  x86_64 (amd64)  |   Type of failure:  None/Unknown
          Test Case:                  |        Blocked By:
           Blocking:                  |   Related Tickets:
Differential Rev(s):                  |         Wiki Page:
--------------------------------------+---------------------------------
 With this patch to `libraries/unix`,
 {{{#!patch
 diff --git a/tests/fdReadBuf001.hs b/tests/fdReadBuf001.hs
 index 4c121a2..f987c94 100644
 --- a/tests/fdReadBuf001.hs
 +++ b/tests/fdReadBuf001.hs
 @@ -21,7 +21,7 @@ main = do
             r <- fdReadBuf rd p block
             let (chunk,rest) = splitAt (fromIntegral r) text
             chars <- peekArray (fromIntegral r) p
 -           when (chars /= chunk) $ error "mismatch"
 +           when (chars /= chunk) $ error $ "mismatch: expected="++show
 chunk++", found="++show chars
             when (null rest) $ exitWith ExitSuccess
             loop rest
      loop bytes
 }}}

 `fdReadBuf001` sometimes fails under the ghci way on FreeBSD 11.0 with
 something like,
 {{{
 =====> fdReadBuf001(ghci) 1 of 1 [0, 0, 0]
 cd "../../libraries/unix/tests/fdReadBuf001.run" &&
 "/home/ben/ghc-8.2.1/bin/ghc" fdReadBuf001.hs -dcore-lint -dcmm-lint -no-
 user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-
 groups -fdiagnostics-color=never -fno-diagnostics-show-caret -dno-debug-
 output  --interactive -v0 -ignore-dot-ghci -fno-ghci-history +RTS -I0.1
 -RTS -package unix< fdReadBuf001.genscript
 Wrong exit code for fdReadBuf001(ghci) (expected 0 , actual 1 )
 Stderr ( fdReadBuf001 ):
 fdReadBuf001: mismatch:
 expected=[101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,12
 0,121,122,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112],
 found=[168,149,144,14,8,0,0,0,58,1,0,0,0,0,0,0,32,228,123,10,8,0,0,0,200,149,144,14,8,0,0,0,0,150,144,14,8,0,0,0,96,127,174,10,8,0,0,0,33,152,144,14,8,0,0,0,0,150,144,14,8,0,0,0,42,0,0,0,0,0,0,0,96,127,174,10,8,0,0,0,162,21,74,13,8,0,0,0,56,150,144,14,8,0,0,0,96,127,174,10,8,0,0,0,10,152,144,14,8,0,0,0,56,150,144,14,8,0,0,0,32,228,123,10,8,0,0,0,200,149,144,14,8,0,0,0,112,150,144,14,8,0,0,0,112,209,123,10,8,0,0,0,138,150,144,14,8,0,0,0,88,150,144,14,8,0,0,0,96,127,174,10,8,0,0,0,249,150,144,14,8,0,0,0,48,187,247,9,8,0,0,0,129,223,208,10,8,0,0,0,96,127,174,10,8,0,0,0,9,151,144,14,8,0,0,0,16,46,250,9,8,0,0,0,184,150,144,14,8,0,0,0,224,227,123,10,8,0,0,0,111,0,0,0,0,0,0,0,8,246,255,9,8,0,0,0,111,0,0,0,0,0,0,0,224,0,194,9,8,0,0,0]
 CallStack (from HasCallStack):
   error, called at fdReadBuf001.hs:24:36 in main:Main
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14074>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list