[GHC] #10682: AArch64: dll-split: out of memory (requested 1099512676352 bytes)

#10682: AArch64: dll-split: out of memory (requested 1099512676352 bytes) -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Keywords: | Operating System: Unknown/Multiple Architecture: aarch64 | Type of failure: Building GHC | failed Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- Some time in the last week, GHC Git HEAD started to fail to build with: {{{ dll-split: out of memory (requested 1099512676352 bytes) compiler/ghc.mk:655: recipe for target 'compiler/stage2/dll-split.stamp' failed }}} Obviously, attempting to allocate a terrabyte is not going to work. Will try to git bisect. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10682 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10682: AArch64: dll-split: out of memory (requested 1099512676352 bytes) ----------------------------------------+---------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: ----------------------------------------+---------------------------------- Comment (by erikd): The value `1099512676352` on hex is `0x10000100000`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10682#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10682: AArch64: dll-split: out of memory (requested 1099512676352 bytes) ----------------------------------------+---------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: ----------------------------------------+---------------------------------- Comment (by rwbarton): Oh, it's probably Phab:D524 (#9706) then. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10682#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10682: AArch64: dll-split: out of memory (requested 1099512676352 bytes) ----------------------------------------+---------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: ----------------------------------------+---------------------------------- Comment (by erikd): Confirmed. Commit 96f9b79fbf05fbb84 broke it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10682#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10682: AArch64: dll-split: out of memory (requested 1099512676352 bytes) ----------------------------------------+---------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: ----------------------------------------+---------------------------------- Comment (by erikd): If I hack `configure.ac` and disable `USE_LARGE_ADDRESS_SPACE` GHC builds fine. Need to figure out why Arm64 doesn't support this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10682#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10682: AArch64: dll-split: out of memory (requested 1099512676352 bytes)
----------------------------------------+----------------------------------
Reporter: erikd | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 7.12.1
Component: Compiler | Version: 7.11
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: aarch64
Type of failure: Building GHC failed | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
----------------------------------------+----------------------------------
Comment (by erikd):
I added debug to `rts/posix/OSMem.c` to print out the values that were
being passed to `mmap`. I then wrote a simple standalone program to see of
`mmap` still failed with the same parameters outside of GHC. The program
is:
{{{
#include

#10682: AArch64: dll-split: out of memory (requested 1099512676352 bytes) ----------------------------------------+---------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: ----------------------------------------+---------------------------------- Changes (by kgardas): * cc: kgardas (added) Comment: Replying to [ticket:10682 erikd]:
Some time in the last week, GHC Git HEAD started to fail to build with:
{{{ dll-split: out of memory (requested 1099512676352 bytes) compiler/ghc.mk:655: recipe for target 'compiler/stage2/dll-split.stamp' failed }}}
Obviously, attempting to allocate a terrabyte is not going to work.
Will try to git bisect.
This is very similar to what I get here on amd64/solaris11 builder[1] after I've been able to start it after holidays. Perhaps the same issue? I'll try to debug that too as time permits. [1]: http://haskell.inf.elte.hu/builders/solaris-amd64-head/index.html -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10682#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10682: AArch64: dll-split: out of memory (requested 1099512676352 bytes) ----------------------------------------+---------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: ----------------------------------------+---------------------------------- Comment (by ezyang): First off, even if the symptoms are the same, I would recommend opening a separate bug for 64-bit Solaris 11 not working, because the underlying cause/fix are very unlikely to be the same. According to some source comments in the Go project (https://golang.org/src/runtime/malloc.go#L158 and https://golang.org/src/runtime/malloc.go#L260), there are restrictions on how much virtual memory you can actually get on ARM64; in particular, apparently only 39 bits of user address space is allowed (which is about 500 GB). So it seems likely that if we halve the requested address size we might do better. However, in that case, I don't understand why the mini test-program is working. Do you have the ability to strace executables on ARM64, to find out what the sequence of mmap calls are? I don't think Giovanni or I have access to ARM64 machines which will make it a little harder for us to debug. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10682#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10682: AArch64: dll-split: out of memory (requested 1099512676352 bytes) ----------------------------------------+---------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: ----------------------------------------+---------------------------------- Comment (by kgardas): Edward, you are of course right. The symptoms may be the same but fix is completely different since this is heavily #ifdefed OS specific code anyway, so Solaris fix will touch different place anyway. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10682#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10682: AArch64: dll-split: out of memory (requested 1099512676352 bytes) ----------------------------------------+---------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: ----------------------------------------+---------------------------------- Comment (by erikd): On aarch64-linux, applying this patch: {{{ diff --git a/rts/sm/HeapAlloc.h b/rts/sm/HeapAlloc.h index c914b5d..90a55d1 100644 --- a/rts/sm/HeapAlloc.h +++ b/rts/sm/HeapAlloc.h @@ -52,7 +52,7 @@ #ifdef USE_LARGE_ADDRESS_SPACE extern W_ mblock_address_space_begin; -# define MBLOCK_SPACE_SIZE ((StgWord)1 << 40) /* 1 TB */ +# define MBLOCK_SPACE_SIZE ((StgWord)1 << 38) /* 1/4 TB */ # define HEAP_ALLOCED(p) ((W_)(p) >= mblock_address_space_begin && \ (W_)(p) < (mblock_address_space_begin + \ MBLOCK_SPACE_SIZE)) }}} fixes the build. @kgardas, does this fix amd64-solaris as well? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10682#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10682: AArch64: dll-split: out of memory (requested 1099512676352 bytes) ----------------------------------------+---------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: ----------------------------------------+---------------------------------- Comment (by erikd): @kgardas has an amd64-solaris fix at Phab:D1169. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10682#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10682: AArch64: dll-split: out of memory (requested 1099512676352 bytes) -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: bug | Status: patch Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D1171 -------------------------------------+------------------------------------- Changes (by erikd): * status: new => patch * differential: => Phab:D1171 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10682#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10682: AArch64: dll-split: out of memory (requested 1099512676352 bytes)
-------------------------------------+-------------------------------------
Reporter: erikd | Owner:
Type: bug | Status: patch
Priority: normal | Milestone: 7.12.1
Component: Compiler | Version: 7.11
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: aarch64
Type of failure: Building GHC | Test Case:
failed |
Blocked By: | Blocking:
Related Tickets: | Differential Revisions: Phab:D1171
-------------------------------------+-------------------------------------
Comment (by Erik de Castro Lopo

#10682: AArch64: dll-split: out of memory (requested 1099512676352 bytes) -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: bug | Status: patch Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D1171 -------------------------------------+------------------------------------- Changes (by RyanGlScott): * cc: RyanGlScott (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10682#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10682: AArch64: dll-split: out of memory (requested 1099512676352 bytes) -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: bug | Status: patch Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D1171 -------------------------------------+------------------------------------- Comment (by rwbarton): So, this is fixed right? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10682#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10682: AArch64: dll-split: out of memory (requested 1099512676352 bytes) -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D1171 -------------------------------------+------------------------------------- Changes (by erikd): * status: patch => closed * resolution: => fixed Comment: Sorry, yes it is. Closing. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10682#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10682: AArch64: dll-split: out of memory (requested 1099512676352 bytes) -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D1171 -------------------------------------+------------------------------------- Comment (by RyanGlScott): This is still happening to me on an x86_64 machine: {{{ inplace/bin/dll-split compiler/stage2/build/.depend-v-dyn.haskell "DynFlags" "Annotations ApiAnnotation Avail Bag BasicTypes Binary BooleanFormula BreakArray BufWrite Class CmdLineParser CmmType CoAxiom ConLike Coercion Config Constants CoreArity CoreFVs CoreSubst CoreSyn CoreTidy CoreUnfold CoreUtils CoreSeq CoreStats CostCentre Ctype DataCon Demand Digraph DriverPhases DynFlags Encoding ErrUtils Exception FamInstEnv FastFunctions FastMutInt FastString Fingerprint FiniteMap ForeignCall Hooks HsBinds HsDecls HsDoc HsExpr HsImpExp HsLit PlaceHolder HsPat HsSyn HsTypes HsUtils HscTypes IOEnv Id IdInfo IfaceSyn IfaceType InstEnv Kind Lexeme Lexer ListSetOps Literal Maybes MkCore MkId Module MonadUtils Name NameEnv NameSet OccName OccurAnal OptCoercion OrdList Outputable PackageConfig Packages Pair Panic PatSyn PipelineMonad Platform PlatformConstants PprCore PrelNames PrelRules Pretty PrimOp RdrName Rules Serialized SrcLoc StaticFlags StringBuffer TcEvidence TcRnTypes TcType TrieMap TyCon Type TypeRep TysPrim TysWiredIn Unify UniqFM UniqSet UniqSupply Unique Util Var VarEnv VarSet Bitmap BlockId ByteCodeAsm ByteCodeInstr ByteCodeItbls CLabel Cmm CmmCallConv CmmExpr CmmInfo CmmMachOp CmmNode CmmSwitch CmmUtils CodeGen.Platform CodeGen.Platform.ARM CodeGen.Platform.ARM64 CodeGen.Platform.NoRegs CodeGen.Platform.PPC CodeGen.Platform.PPC_Darwin CodeGen.Platform.SPARC CodeGen.Platform.X86 CodeGen.Platform.X86_64 Hoopl Hoopl.Dataflow InteractiveEvalTypes MkGraph PprCmm PprCmmDecl PprCmmExpr Reg RegClass SMRep StgCmmArgRep StgCmmClosure StgCmmEnv StgCmmLayout StgCmmMonad StgCmmProf StgCmmTicky StgCmmUtils StgSyn Stream" dll-split: out of memory (requested 1099512676352 bytes) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10682#comment:17 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10682: AArch64: dll-split: out of memory (requested 1099512676352 bytes) -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D1171 -------------------------------------+------------------------------------- Comment (by rwbarton): This ticket is about aarch64, could you file another ticket? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10682#comment:18 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10682: AArch64: dll-split: out of memory (requested 1099512676352 bytes) -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: aarch64 Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: #10877 | Differential Revisions: Phab:D1171 -------------------------------------+------------------------------------- Changes (by RyanGlScott): * related: => #10877 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10682#comment:19 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC