[GHC] #11190: Hello "schedule: re-entered unsafely."

#11190: Hello "schedule: re-entered unsafely." --------------------------------+---------------------------------- Reporter: Chobbes | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Keywords: | Operating System: Linux Architecture: arm | Type of failure: Runtime crash Test Case: | Blocked By: Blocking: | Related Tickets: 951 Differential Rev(s): | Wiki Page: --------------------------------+---------------------------------- After compiling the following program on ARM: {{{#!hs main = putStrLn "Hello, world!" }}} using `ghc hello.hs` I receive the following error when running the compiled code: {{{ $ ./hello hello: schedule: re-entered unsafely. Perhaps a 'foreign import unsafe' should be 'safe'? }}} I'm trying to get GHC running on my Raspberry Pi 2, running Raspbian Jessie Light, which can be found here: https://www.raspberrypi.org/downloads/raspbian/ I was following the instructions for installing the compiler on a freshly flashed RPI2 from here: http://statusfailed.com/blog/2015/11/29/haskell-and-servant-on-scaleway- arm-servers.html This was using the Linux ARMv7 binaries: https://www.haskell.org/ghc/download_ghc_7_10_3#linux_armv7 https://www.haskell.org/ghc/download_ghc_7_10_2#linux_armv7 Additionally trying to upgrade cabal with `cabal install cabal-install` seems to hang forever. It gets stuck in various Setup.hs files and doesn't seem to progress. No CPU is taken up using this. Some summary information: - llvm 3.5 - gcc 4.9.2 - original GHC from Raspbian is 7.6.3 - cabal-install from Raspbian is 1.20.0.3 - cabal is 1.20.0.2 - This same problem affects both 7.10.2, and 7.10.3 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11190 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11190: Hello "schedule: re-entered unsafely." ----------------------------------+---------------------------------- Reporter: Chobbes | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: 951, #9920 | Differential Rev(s): Wiki Page: | ----------------------------------+---------------------------------- Changes (by bgamari): * status: new => infoneeded * related: 951 => 951, #9920 Comment: I believe I encountered the same issue not so long ago when using Debian's LLVM 3.5 version, which is unfortunately missing some rather critical fixes (see #9920 for details). Can you reproduce this with LLVM 3.5.2? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11190#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11190: Hello "schedule: re-entered unsafely." ----------------------------------+---------------------------------- Reporter: Chobbes | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: 951, #9920 | Differential Rev(s): Wiki Page: | ----------------------------------+---------------------------------- Comment (by Chobbes): Replying to [comment:1 bgamari]:
I believe I encountered the same issue not so long ago when using Debian's LLVM 3.5 version, which is unfortunately missing some rather critical fixes (see #9920 for details).
Can you reproduce this with LLVM 3.5.2?
I have been trying a [https://haskellembedded.github.io/posts/2015-12-15-arm.html number of things desperately (don't judge)], so I am a bit turned around as to what I have tried. I might not have done this on the Pi yet. I noticed this issue in trac as well, so I have been trying higher LLVM versions where possible. It did seem like a different error, however. Do you have a program which can reproduce the results in #9920? Currently I have tested with Gentoo LLVM versions 3.5.0, 3.5.2, and 3.6.2 which have all had the same problem. This is in a fresh qemu-user-arm chroot (as described in the above post). This is also using the ARMv7 binaries provided for GHC 7.10.3. I will try to get LLVM 3.5.2 on my pi tomorrow to confirm. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11190#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11190: Hello "schedule: re-entered unsafely." ----------------------------------+---------------------------------- Reporter: Chobbes | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: #951, #9920 | Differential Rev(s): Wiki Page: | ----------------------------------+---------------------------------- Changes (by Chobbes): * related: 951, #9920 => #951, #9920 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11190#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11190: Hello "schedule: re-entered unsafely." ----------------------------------+------------------------------ Reporter: Chobbes | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: fixed | Keywords: Operating System: Linux | Architecture: arm Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: #951, #9920 | Differential Rev(s): Wiki Page: | ----------------------------------+------------------------------ Changes (by Chobbes): * status: infoneeded => closed * resolution: => fixed Comment: Replying to [comment:1 bgamari]:
I believe I encountered the same issue not so long ago when using Debian's LLVM 3.5 version, which is unfortunately missing some rather critical fixes (see #9920 for details).
Can you reproduce this with LLVM 3.5.2?
Turns out you were completely correct! I had mistakenly not cleaned object files left over from previous runs. This is now working with LLVM 3.5.2. My apologies for the mistake, and thank you very much for pointing out the issue. I can now generate executables in my QEMU environment for the RPI2, which work :). Thanks again, cheers! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11190#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11190: Hello "schedule: re-entered unsafely." ----------------------------------+------------------------------ Reporter: Chobbes | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Linux | Architecture: arm Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: #951, #9920 | Differential Rev(s): Wiki Page: | ----------------------------------+------------------------------ Changes (by bgamari): * status: closed => new * resolution: fixed => -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11190#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11190: Hello "schedule: re-entered unsafely." ----------------------------------+------------------------------ Reporter: Chobbes | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: invalid | Keywords: Operating System: Linux | Architecture: arm Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: #951, #9920 | Differential Rev(s): Wiki Page: | ----------------------------------+------------------------------ Changes (by bgamari): * status: new => closed * resolution: => invalid -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11190#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC