
#15808: Master sefaults on windows during aeson build when stage2 libs have dwarf enabled. -------------------------------------+------------------------------------- Reporter: AndreasK | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by AndreasK): The error happens during linking (for TH I assume): The exact moment it happens differs when the memory usage of the compiler changes. If I pass different -H values, different verbosity flags and so on it either fails earlier, later or not at all. When it fails it's always during linking. So I assume there is some issue that arises when GC kicks in during linking, where we then access a pointer that hasn't been updated properly. {{{ !!! ByteCodeGen [Ghci1]: finished in 0.00 milliseconds, allocated 0.049 megabytes *** gcc: "E:\ghc_dwarf\inplace\lib\../mingw/bin/gcc.exe" "-fno-stack-protector" "-DTABLES_NEXT_TO_CODE" "--print-search-dirs" Loading package ghc-prim-0.5.3 ... linking ... done. Loading package integer-gmp-1.0.2.0 ... linking ... done. Loading package base-4.12.0.0 ... linking ... done. Loading package array-0.5.2.0 ... linking ... done. Loading package deepseq-1.4.4.0 ... linking ... done. Loading package transformers-0.5.5.0 ... linking ... done. Loading package primitive-0.6.4.0 ... linking ... done. Loading package vector-0.12.0.1 ... linking ... done. Loading package bytestring-0.10.8.2 ... linking ... done. Loading package containers-0.6.0.1 ... linking ... done. Loading package binary-0.8.6.0 ... linking ... done. Loading package text-1.2.3.1 ... linking ... done. Loading package hashable-1.2.7.0 ... linking ... done. Loading package filepath-1.4.2.1 ... linking ... done. Loading package Win32-2.6.1.0 ... linking ... done. Loading package time-1.8.0.2 ... linking ... done. Loading package random-1.1 ... linking ... done. Loading package uuid-types-1.0.3 ... linking ... done. Loading package unordered-containers-0.2.9.0 ... linking ... done. Loading package time-locale-compat-0.1.1.5 ... linking ... done. Loading package ghc-boot-th-8.7 ... linking ... done. Loading package pretty-1.1.3.6 ... linking ... done. Loading package template-haskell-2.14.0.0 ... linking ... done. Loading package th-abstraction-0.2.8.0 ... linking ... done. Loading package tagged-0.8.6 ... linking ... done. Loading package dlist-0.8.0.5 ... linking ... done. Loading package base-compat-0.10.5 ... linking ... done. Loading package integer-logarithms-1.0.2.2 ... linking ... done. Loading package scientific-0.3.6.2 ... linking ... done. Loading package attoparsec-0.13.2.2 ... linking ... done. Search directories (user): Search directories (gcc): E://ghc_dwarf//inplace//mingw//bin/ E://ghc_dwarf//inplace//mingw//bin/../lib/ E://ghc_dwarf//inplace//mingw//bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/ E:/ghc_dwarf/inplace/mingw/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/ E:/ghc_dwarf/inplace/mingw/bin/../lib/gcc/ E:/ghc_dwarf/inplace/mingw/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib/../lib/ E:/ghc_dwarf/inplace/mingw/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../lib/ E:/ghc_dwarf/inplace/mingw/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib/ E:/ghc_dwarf/inplace/mingw/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../ C:\WINDOWS\system32 Loading object (static archive) E:/ghc_dwarf/inplace/mingw/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/lib/../lib/libpthread.dll.a ... done final link ... done Access violation in generated code when executing data at 0xffffffff800ba2c8 Attempting to reconstruct a stack trace... Frame Code address * 0x845dae0 0xffffffff800ba2c8 }}} Another variant: {{{ !!! CorePrep [Data.Aeson.Encoding]: finished in 0.00 milliseconds, allocated 0.061 megabytes *** Stg2Stg: *** CodeGen [Data.Aeson.Encoding]: !!! CodeGen [Data.Aeson.Encoding]: finished in 0.00 milliseconds, allocated 0.514 megabytes *** Assembler: "E:\ghc_dwarf\inplace\lib\../mingw/bin/gcc.exe" "-fno-stack-protector" "-DTABLES_NEXT_TO_CODE" "-iquote.\Data\Aeson" "-IC:\ghc\msys64\home\Andi\aeson_repro\dist- newstyle\build\x86_64-windows\ghc-8.7.20181025\aeson-1.4.1.0\build" "-IC:\ghc\msys64\home\Andi\aeson_repro\dist- newstyle\build\x86_64-windows\ghc-8.7.20181025\aeson-1.4.1.0\build" "-IC:\ghc\msys64\home\Andi\aeson_repro\dist- newstyle\build\x86_64-windows\ghc-8.7.20181025\aeson-1.4.1.0\build\autogen" "-IC:\ghc\msys64\home\Andi\aeson_repro\dist- newstyle\build\x86_64-windows\ghc-8.7.20181025\aeson-1.4.1.0\build\global- autogen" "-IC:\ghc\msys64\home\Andi\aeson_repro\dist- newstyle\build\x86_64-windows\ghc-8.7.20181025\aeson-1.4.1.0\build" "-Iinclude" "-IC:\ghc\msys64\home\Andi\aeson_repro\dist- newstyle\build\x86_64-windows\ghc-8.7.20181025\aeson-1.4.1.0\build\include" "-no-pie" "-x" "assembler" "-c" "C:\ghc\msys64\tmp\ghc173148_0\ghc_72.s" "-o" "C:\ghc\msys64\home\Andi\aeson_repro\dist- newstyle\build\x86_64-windows\ghc-8.7.20181025\aeson-1.4.1.0\build\Data\Aeson\Encoding.o" *** Deleting temp files: Deleting: C:\ghc\msys64\tmp\ghc173148_0\ghc_71.s C:\ghc\msys64\tmp\ghc173148_0\ghc_72.s C:\ghc\msys64\tmp\ghc173148_0\ghc_73.c Warning: deleting non-existent C:\ghc\msys64\tmp\ghc173148_0\ghc_71.s Warning: deleting non-existent C:\ghc\msys64\tmp\ghc173148_0\ghc_73.c compile: input file C:\ghc\msys64\tmp\ghc173148_0\ghc_15.hscpp *** Checking old interface for Data.Aeson.Types.ToJSON (use -ddump-hi- diffs for more details): [18 of 25] Compiling Data.Aeson.Types.ToJSON ( Data\Aeson\Types\ToJSON.hs, C:\ghc\msys64\home\Andi\aeson_repro\dist- newstyle\build\x86_64-windows\ghc-8.7.20181025\aeson-1.4.1.0\build\Data\Aeson\Types\ToJSON.o ) *** Parser [Data.Aeson.Types.ToJSON]: !!! Parser [Data.Aeson.Types.ToJSON]: finished in 15.63 milliseconds, allocated 109.276 megabytes *** Renamer/typechecker [Data.Aeson.Types.ToJSON]: *** Simplify [expr]: !!! Simplify [expr]: finished in 0.00 milliseconds, allocated 0.554 megabytes *** CorePrep [expr]: !!! CorePrep [expr]: finished in 0.00 milliseconds, allocated 0.011 megabytes *** ByteCodeGen [Ghci1]: !!! ByteCodeGen [Ghci1]: finished in 0.00 milliseconds, allocated 0.049 megabytes *** gcc: "E:\ghc_dwarf\inplace\lib\../mingw/bin/gcc.exe" "-fno-stack-protector" "-DTABLES_NEXT_TO_CODE" "--print-search-dirs" Loading package ghc-prim-0.5.3 ... linking ... done. Loading package integer-gmp-1.0.2.0 ... linking ... done. Loading package base-4.12.0.0 ... linking ... Access violation in generated code when executing data at 0x103fec440 Attempting to reconstruct a stack trace... Frame Code address * 0x845d9c0 0x103fec440 * 0x845da20 0x400c0f8 E:\ghc_dwarf\inplace\bin\ghc- stage2.crash.exe+0x3c0c0f8 * 0x845da80 0x3fec9a1 E:\ghc_dwarf\inplace\bin\ghc- stage2.crash.exe+0x3bec9a1 * 0x845dab0 0x3feca31 E:\ghc_dwarf\inplace\bin\ghc- stage2.crash.exe+0x3beca31 * 0x845dab8 0x34c8934 E:\ghc_dwarf\inplace\bin\ghc- stage2.crash.exe+0x30c8934 * 0x845dac0 0x1 * 0x845dac8 0xa5c2030 * 0x845dad0 0xc * 0x845dad8 0x231c3190 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15808#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler