[GHC] #8520: ghc.exe: internal error: loadArchive: error whilst reading `C'

#8520: ghc.exe: internal error: loadArchive: error whilst reading `C' ----------------------------+---------------------------------- Reporter: awson | Owner: Type: bug | Status: new Priority: highest | Milestone: Component: Compiler | Version: 7.7 Keywords: | Operating System: Windows Architecture: x86 | Type of failure: Runtime crash Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ----------------------------+---------------------------------- While building Agda HEAD, GHC 7.7.20131108 for i386_unknown_mingw32 spits: {{{ [ 88 of 256] Compiling Agda.TypeChecking.Monad.Base[boot] ( src\full\Agda\TypeChecking\Monad\Base.hs-boot, dist\build\Agda\TypeChecking\Monad\Base.o-boot ) [ 89 of 256] Compiling Agda.Interaction.Response[boot] ( src\full\Agda\Interaction\Response.hs-boot, dist\build\Agda\Interaction\Response.o-boot ) [ 90 of 256] Compiling Agda.Interaction.FindFile[boot] ( src\full\Agda\Interaction\FindFile.hs-boot, dist\build\Agda\Interaction\FindFile.o-boot ) [ 91 of 256] Compiling Agda.Syntax.Abstract ( src\full\Agda\Syntax\Abstract.hs, dist\build\Agda\Syntax\Abstract.o ) Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Loading package array-0.5.0.0 ... linking ... done. Loading package deepseq-1.3.0.2 ... linking ... done. Loading package bytestring-0.10.4.0 ... linking ... done. Loading package zlib-0.5.4.1 ... linking ... done. Loading package xhtml-3000.2.1 ... linking ... done. Loading package text-0.11.3.1 ... linking ... done. Loading package hashable-1.2.1.0 ... linking ... done. Loading package unordered-containers-0.2.3.3 ... linking ... done. Loading package Win32-2.3.0.0 ... linking ... done. Loading package filepath-1.3.0.2 ... linking ... done. Loading package old-locale-1.0.0.6 ... linking ... done. Loading package time-1.4.1 ... linking ... done. Loading package directory-1.2.0.2 ... linking ... done. Loading package process-1.2.0.0 ... linking ... done. Loading package containers-0.5.3.1 ... linking ... done. Loading package parallel-3.2.0.4 ... linking ... done. Loading package old-time-1.1.0.2 ... linking ... done. Loading package cpphs-1.17.1 ... linking ... done. Loading package pretty-1.1.1.1 ... linking ... done. Loading package haskell-src-exts-1.14.0 ... linking ... done. Loading package transformers-0.3.0.0 ... linking ... done. Loading package haskeline-0.7.0.3 ... linking ... done. Loading package primitive-0.5.1.0 ... linking ... done. Loading package vector-0.10.9.1 ... ghc.exe: internal error: loadArchive: error whilst reading `C' (GHC version 7.7.20131108 for i386_unknown_mingw32) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} Btw, 7.7.20131024 has *NO* this bug, thus it was introduced quite recently. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8520 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8520: ghc.exe: internal error: loadArchive: error whilst reading `C' ----------------------------------+--------------------------- Reporter: awson | Owner: Type: bug | Status: new Priority: highest | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+--------------------------- Comment (by awson): When I initially configure Agda without -j3 GHC option I have the same error in a slightly different place: {{{ [ 88 of 256] Compiling Agda.Syntax.Abstract ( src\full\Agda\Syntax\Abstract.hs, dist\build\Agda\Syntax\Abstract.o ) Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Loading package array-0.5.0.0 ... linking ... done. Loading package deepseq-1.3.0.2 ... linking ... done. Loading package bytestring-0.10.4.0 ... linking ... done. Loading package zlib-0.5.4.1 ... linking ... done. Loading package xhtml-3000.2.1 ... linking ... done. Loading package text-0.11.3.1 ... linking ... done. Loading package hashable-1.2.1.0 ... linking ... done. Loading package unordered-containers-0.2.3.3 ... linking ... done. Loading package Win32-2.3.0.0 ... linking ... done. Loading package filepath-1.3.0.2 ... linking ... done. Loading package old-locale-1.0.0.6 ... linking ... done. Loading package time-1.4.1 ... linking ... done. Loading package directory-1.2.0.2 ... linking ... done. Loading package process-1.2.0.0 ... linking ... done. Loading package containers-0.5.3.1 ... linking ... done. Loading package parallel-3.2.0.4 ... linking ... done. Loading package old-time-1.1.0.2 ... linking ... done. Loading package cpphs-1.17.1 ... linking ... done. Loading package pretty-1.1.1.1 ... linking ... done. Loading package haskell-src-exts-1.14.0 ... linking ... done. Loading package transformers-0.3.0.0 ... linking ... done. Loading package haskeline-0.7.0.3 ... ghc.exe: internal error: loadArchive: error whilst reading `C' (GHC version 7.7.20131108 for i386_unknown_mingw32) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8520#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8520: ghc.exe: internal error: loadArchive: error whilst reading `C' ----------------------------------+--------------------------- Reporter: awson | Owner: Type: bug | Status: new Priority: highest | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+--------------------------- Comment (by akio): I tried to reproduce it because I thought this might be my fault. However the compilation was successful for me. (GHC 7.7.201311108, i386_unknown_mingw32) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8520#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8520: ghc.exe: internal error: loadArchive: error whilst reading `C' ----------------------------------+--------------------------- Reporter: awson | Owner: Type: bug | Status: new Priority: highest | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+--------------------------- Comment (by awson): The culprit is, I think, you didn't use --split-objs (--enable-split-objs for cabal-install) when building packages Agda depends on. I always test things to work with --split-objs. When I had rebuilt a couple of packages with no --split-objs flag this bug "moved further down": {{{ [ 86 of 258] Compiling Agda.TypeChecking.Monad.Base[boot] ( src\full\Agda\TypeChecking\Monad\Base.hs-boot, dist\build\Agda\TypeChecking\Monad\Base.o-boot ) [ 87 of 258] Compiling Agda.Interaction.Response[boot] ( src\full\Agda\Interaction\Response.hs-boot, dist\build\Agda\Interaction\Response.o-boot ) [ 88 of 258] Compiling Agda.Interaction.FindFile[boot] ( src\full\Agda\Interaction\FindFile.hs-boot, dist\build\Agda\Interaction\FindFile.o-boot ) [ 89 of 258] Compiling Agda.Syntax.Abstract ( src\full\Agda\Syntax\Abstract.hs, dist\build\Agda\Syntax\Abstract.o ) Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Loading package array-0.5.0.0 ... linking ... done. Loading package deepseq-1.3.0.2 ... linking ... done. Loading package bytestring-0.10.4.0 ... linking ... done. Loading package zlib-0.5.4.1 ... linking ... done. Loading package xhtml-3000.2.1 ... linking ... done. Loading package text-0.11.3.1 ... linking ... done. Loading package hashable-1.2.1.0 ... linking ... done. Loading package unordered-containers-0.2.3.3 ... linking ... done. Loading package Win32-2.3.0.0 ... linking ... done. Loading package filepath-1.3.0.2 ... linking ... done. Loading package old-locale-1.0.0.6 ... linking ... done. Loading package time-1.4.1 ... linking ... done. Loading package directory-1.2.0.2 ... linking ... done. Loading package process-1.2.0.0 ... linking ... done. Loading package containers-0.5.3.1 ... linking ... done. Loading package parallel-3.2.0.4 ... linking ... done. Loading package old-time-1.1.0.2 ... linking ... done. Loading package cpphs-1.17.1 ... linking ... done. Loading package pretty-1.1.1.1 ... linking ... done. Loading package haskell-src-exts-1.14.0 ... linking ... done. Loading package transformers-0.3.0.0 ... linking ... done. Loading package haskeline-0.7.0.3 ... linking ... done. Loading package primitive-0.5.1.0 ... linking ... done. Loading package vector-0.10.9.1 ... linking ... done. Loading package hashtables-1.1.2.1 ... linking ... done. Loading package mtl-2.1.2 ... linking ... done. Loading package template-haskell ... linking ... done. Loading package geniplate-0.6.0.3 ... linking ... done. Loading package binary-0.7.1.0 ... linking ... done. Loading package random-1.0.1.1 ... linking ... done. Loading package QuickCheck-2.6 ... ghc.exe: internal error: loadArchive: error whilst reading `C' (GHC version 7.7.20131108 for i386_unknown_mingw32) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} And I'm almost sure if all dependencies are built without --split-objs the bug won't manifest itself. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8520#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8520: ghc.exe: internal error: loadArchive: error whilst reading `C' ----------------------------------+--------------------------- Reporter: awson | Owner: Type: bug | Status: new Priority: highest | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+--------------------------- Comment (by awson): Also mention should be made this bug is somewhat nondeterministic - when building sequentially (no -j3 GHC flag) the first build crash at haskeline, and subsequent builds fail at vector. It probably can depend on particular machine also. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8520#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8520: ghc.exe: internal error: loadArchive: error whilst reading `C' ----------------------------------+--------------------------- Reporter: awson | Owner: Type: bug | Status: new Priority: highest | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+--------------------------- Comment (by awson): At last I've found the culprit: it's a lack of memory. When I set LARGEADDRESSAWARE flag for ghc.exe executable, the problem went away. AFAIUI, it is unknown whether enabling this flag is safe for GHC-generated binaries. Apparently, it works, though. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8520#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8520: ghc.exe: internal error: loadArchive: error whilst reading `C' ----------------------------------+--------------------------- Reporter: awson | Owner: Type: bug | Status: new Priority: highest | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+--------------------------- Comment (by awson): To be more precise: this depends not only on GHC, but also (and, perhaps, primarily so) on foreign C-code involved. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8520#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8520: ghc.exe: internal error: loadArchive: error whilst reading `C' ----------------------------------+--------------------------- Reporter: awson | Owner: Type: bug | Status: new Priority: low | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Operating System: Windows | Architecture: x86 Type of failure: Runtime crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ----------------------------------+--------------------------- Changes (by awson): * priority: highest => low -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8520#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC