[GHC] #15508: concprog001 fails with various errors when compiled with -prof
GHC
ghc-devs at haskell.org
Sun Aug 12 07:15:38 UTC 2018
#15508: concprog001 fails with various errors when compiled with -prof
-------------------------------------+-------------------------------------
Reporter: osa1 | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Profiling | Version: 8.5
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): Phab:D5051 | Wiki Page:
-------------------------------------+-------------------------------------
I'm observing a few different runtime errors. I'm not sure if they're
because of different bugs so I'm filing one ticket for now.
Reproduce with GHC HEAD:
{{{
prog001 git:(master) $ ghc-stage2 Mult.hs -prof -fprof-auto -fforce-recomp
-debug
[1 of 7] Compiling Stream ( Stream.hs, Stream.o )
[2 of 7] Compiling Converter ( Converter.hs, Converter.o )
[3 of 7] Compiling Thread ( Thread.hs, Thread.o )
[4 of 7] Compiling Utilities ( Utilities.hs, Utilities.o )
[5 of 7] Compiling Trit ( Trit.hs, Trit.o )
[6 of 7] Compiling Arithmetic ( Arithmetic.hs, Arithmetic.o )
[7 of 7] Compiling Main ( Mult.hs, Mult.o )
Linking Mult ...
prog001 git:(master) $ ./Mult +RTS -DS
Mult: internal error: ASSERTION FAILED: file rts/sm/Sanity.c, line 210
(GHC version 8.7.20180809 for x86_64_unknown_linux)
Please report this as a GHC bug:
http://www.haskell.org/ghc/reportabug
zsh: abort (core dumped) ./Mult +RTS -DS
}}}
I tried to fix this in Phab:D5051 but it's causing a segfault in test
`T11108` when run with profiling. Not sure what the problem is yet.
It's very easy to trigger other kind of panics in `concprog001`, just try
different compile and runtime flag combinations:
{{{
prog001 git:(master) $ ghc-stage2 Mult.hs -prof -fprof-auto -fforce-recomp
-threaded
[1 of 7] Compiling Stream ( Stream.hs, Stream.o )
[2 of 7] Compiling Converter ( Converter.hs, Converter.o )
[3 of 7] Compiling Thread ( Thread.hs, Thread.o )
[4 of 7] Compiling Utilities ( Utilities.hs, Utilities.o )
[5 of 7] Compiling Trit ( Trit.hs, Trit.o )
[6 of 7] Compiling Arithmetic ( Arithmetic.hs, Arithmetic.o )
[7 of 7] Compiling Main ( Mult.hs, Mult.o )
Linking Mult ...
prog001 git:(master) $ ./Mult +RTS -N2
zsh: segmentation fault (core dumped) ./Mult +RTS -N2
}}}
Yet another way:
{{{
prog001 git:(master) $ ghc-stage2 Mult.hs -prof -fprof-auto -fforce-recomp
-threaded -debug
[1 of 7] Compiling Stream ( Stream.hs, Stream.o )
[2 of 7] Compiling Converter ( Converter.hs, Converter.o )
[3 of 7] Compiling Thread ( Thread.hs, Thread.o )
[4 of 7] Compiling Utilities ( Utilities.hs, Utilities.o )
[5 of 7] Compiling Trit ( Trit.hs, Trit.o )
[6 of 7] Compiling Arithmetic ( Arithmetic.hs, Arithmetic.o )
[7 of 7] Compiling Main ( Mult.hs, Mult.o )
Linking Mult ...
prog001 git:(master) $ ./Mult +RTS -N2
Mult: internal error: invalid closure, info=0x947edc
(GHC version 8.7.20180809 for x86_64_unknown_linux)
Please report this as a GHC bug:
http://www.haskell.org/ghc/reportabug
zsh: abort (core dumped) ./Mult +RTS -N2
}}}
It seems to work fine when not compiled for profiling so marking this bug
as a profiler bug.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15508>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list