[GHC] #15449: Nondeterministic Failure on aarch64 with -jn, n > 1

GHC ghc-devs at haskell.org
Sat Jul 28 08:27:15 UTC 2018


#15449: Nondeterministic Failure on aarch64 with -jn, n > 1
-------------------------------------+-------------------------------------
        Reporter:  tmobile           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.4.3
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:  aarch64
 Type of failure:  Compile-time      |            Test Case:
  crash or panic                     |
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by trommler):

 At some point Aarch64 was switched over from the C backend to the LLVM
 backend.

 A quick glance at the LLVM backend showed the following suspicious code in
 `compiler/llvmGen/LlvmCodeGen`:

 {{{
 genCall (PrimTarget (MO_AtomicRead _)) [dst] [addr] = runStmtsDecls $ do
             dstV <- getCmmRegW (CmmLocal dst)
             v1 <- genLoadW True addr (localRegType dst)
             statement $ Store v1 dstV
 }}}

 A full barrier is required here but no barrier at all is present.

 Remark: I have similar issues on PowerPC and putting the appropriate
 barrier into atomic reads improved the situation (fewer crashes of the
 sort described above) but did not solve the issue completely.

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


More information about the ghc-tickets mailing list