Ticket #7134 (new bug)

Opened 9 months ago

Last modified 2 months ago

ghc-7.6.0.20120810-x86_64-windows.exe -> internal error R_X86_64_PC32

Reported by: cetinsert Owned by: igloo
Priority: highest Milestone: 7.8.1
Component: GHCi Version: 7.6.1-rc1
Keywords: R_X86_64_PC32 Cc: bos@…
Operating System: Windows Architecture: x86_64 (amd64)
Type of failure: GHCi crash Difficulty: Unknown
Test Case: Blocked By: #3658
Blocking: Related Tickets:

Description

I downloaded ghc-7.6.0.20120810-x86_64-windows.exe and attempting to run GHCi dumps the following error message:

C:\Users\Cetin>ghci
GHCi, version 7.6.0.20120810: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... ghc.exe: internal error: R_X86_64_PC32: Hig
h bits are set in 7f9585f95a0 for WaitForSingleObject
    (GHC version 7.6.0.20120810 for x86_64_unknown_mingw32)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Tested on Windows 8 Release Preview 64-bit.

Change History

  Changed 9 months ago by pcapriotti

  • difficulty set to Unknown
  • version set to 7.6.1-rc1
  • milestone set to 7.6.1

  Changed 9 months ago by pcapriotti

Thanks for the report.

  Changed 9 months ago by igloo

  • priority changed from normal to highest
  • milestone changed from 7.6.1 to 7.8.1

This works for me, on Windows 7 64bit.

As it only affects ghci, probably only on Windows 8, and isn't a regression (as Win64 wasn't supported at all before) I've milestoned it for 7.8.

  Changed 9 months ago by simonmar

  • milestone changed from 7.8.1 to 7.6.2

Given that it appears to kill GHCi completely on this platform, I think 7.6.2 would be a better milestone.

  Changed 9 months ago by igloo

  • blockedby 3658 added

  Changed 6 months ago by igloo

  • owner set to igloo

  Changed 6 months ago by igloo

  • status changed from new to infoneeded

If you run

peflags --bigaddr=0 c:/ghc/ghc-7.6.1/bin/ghc.exe

then does ghci work afterwards?

  Changed 6 months ago by cetinsert

I would like to test this but cannot find anything named peflags to run.

  Changed 6 months ago by cetinsert

Would it be possible to put the ghc binary that results from peflags --bigaddr=0 online, then I could download and report back immediately? Or the peflags binary itself at least.

  Changed 6 months ago by igloo

Thanks cetinsert. I've put the bigaddr=0 version of the ghc.exe from the 7.6.1 release here: http://www.haskell.org/ghc/dist/tmp/peflags-7.6.1/

  Changed 6 months ago by cetinsert

Sorry TRAC kept saying “error: database is locked” so I had to try contacting you by email.

Good news, GHCI runs successfully without any errors when I use the binary you uploaded!

Thanks a lot for fixing this issue! Looking forward to 7.6.2!

Screenshot:  http://snag.gy/cey48.jpg http://snag.gy/cey48.jpg

follow-up: ↓ 13   Changed 6 months ago by awson

  • status changed from infoneeded to new

But after this "fix" ghc is unable to use more than 2GB of memory, AFAIK.

in reply to: ↑ 12   Changed 6 months ago by igloo

  • milestone changed from 7.6.2 to 7.8.1

Thanks for testing. Fixed in 7.6 by:

commit 418a8c926703ac284f7b1a39900722efa02d0834
Author: Ian Lynagh <igloo@earth.li>
Date:   Sun Dec 2 14:48:20 2012 +0000

    On Win64, mark executables as not supporting bigaddr; fixes #7134

    This is a kludge, and means that ghc/haddock won't be able to use
    more than 2G of RAM. But it'll make sure that ghci works in the short
    term while we work on a proper fix.

Replying to awson:

But after this "fix" ghc is unable to use more than 2GB of memory, AFAIK.

Yes, hopefully we'll have a better fix for 7.8.

  Changed 4 months ago by simonmar

Also reported in #7568.

  Changed 4 months ago by bos

  • cc bos@… added

  Changed 4 months ago by morabbin

Is this a dup of #7357? For the record, I see this same linker error when building cabal-dev HEAD with 7.6.1 on Windows 8:

...
[ 8 of 19] Compiling Distribution.Dev.CabalInstall ( src\Distribution\Dev\CabalInstall.hs, dist\build\cabal-dev\cabal-dev-tmp\Distribution\Dev\CabalInstall.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... ghc.exe: internal error: R_X86_64_PC32: High bits are set in 7fa7fcb95a0 for WaitForSingleObject
    (GHC version 7.6.1 for x86_64_unknown_mingw32)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
cabal.exe: Error: some packages failed to install:
cabal-dev-0.9.1 failed during the building phase. The exception was:
ExitFailure 255

  Changed 4 months ago by simonmar

#7357 is already closed as a dup of this one.

  Changed 3 months ago by gmainland

I am seeing the same error on Win8 x64 with GHC 7.6.2 (x64).

$ cabal install language-c-quote
Resolving dependencies...
[1 of 1] Compiling Main             ( C:\Users\gmainlan\AppData\Local\Temp\language-c-quote-0.4.4-5516\language-c-quote-0.4.4\Setup.hs, C:\Users\gmainlan\AppData\Local\Temp\language-c-quote-0.4.4-5516\language-c-quote-0.4.4\dist\setup\Main.o )
Linking C:\Users\gmainlan\AppData\Local\Temp\language-c-quote-0.4.4-5516\language-c-quote-0.4.4\dist\setup\setup.exe ...
Configuring language-c-quote-0.4.4...
Building language-c-quote-0.4.4...
Preprocessing library language-c-quote-0.4.4...
unused terminals: 4
[ 1 of 15] Compiling Language.C.Syntax ( Language\C\Syntax.hs, dist\build\Language\C\Syntax.o )
[ 2 of 15] Compiling Language.C.Parser.Tokens ( Language\C\Parser\Tokens.hs, dist\build\Language\C\Parser\Tokens.o )
[ 3 of 15] Compiling Language.C.Parser.Monad ( Language\C\Parser\Monad.hs, dist\build\Language\C\Parser\Monad.o )
[ 4 of 15] Compiling Language.C.Parser.Lexer ( dist\build\Language\C\Parser\Lexer.hs, dist\build\Language\C\Parser\Lexer.o )
[ 5 of 15] Compiling Language.C.Pretty ( Language\C\Pretty.hs, dist\build\Language\C\Pretty.o )
[ 6 of 15] Compiling Language.C.Parser.Parser ( dist\build\Language\C\Parser\Parser.hs, dist\build\Language\C\Parser\Parser.o )
[ 7 of 15] Compiling Language.C.Parser ( Language\C\Parser.hs, dist\build\Language\C\Parser.o )
[ 8 of 15] Compiling Language.C.Quote.Base ( Language\C\Quote\Base.hs, dist\build\Language\C\Quote\Base.o )
[ 9 of 15] Compiling Language.C.Quote ( Language\C\Quote.hs, dist\build\Language\C\Quote.o )
[10 of 15] Compiling Language.C.Quote.C ( Language\C\Quote\C.hs, dist\build\Language\C\Quote\C.o )
[11 of 15] Compiling Language.C.Smart ( Language\C\Smart.hs, dist\build\Language\C\Smart.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array-0.4.0.1 ... linking ... done.
Loading package deepseq-1.3.0.1 ... linking ... done.
Loading package containers-0.5.0.0 ... linking ... done.
Loading package syb-0.3.7 ... linking ... done.
Loading package symbol-0.1.4 ... linking ... done.
Loading package srcloc-0.3.0 ... linking ... done.
Loading package bytestring-0.10.0.2 ... linking ... done.
Loading package text-0.11.2.3 ... linking ... done.
Loading package mainland-pretty-0.2.5 ... linking ... done.
Loading package Win32-2.3.0.0 ... linking ... ghc.exe: internal error: R_X86_64_PC32: High bits are set in 7fcaf075d29 for DefDlgProcW
    (GHC version 7.6.2 for x86_64_unknown_mingw32)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Failed to install language-c-quote-0.4.4
cabal.exe: Error: some packages failed to install:
language-c-quote-0.4.4 failed during the building phase. The exception was:
ExitFailure 3

  Changed 2 months ago by bezirg

I also have the same error on Win8 x64 with GHC 7.6.1 x64 and GHC 7.6.2 x64. I suggest using for now the x86 version bundle of GHC 7.6.1, which works fine on Win8x64.

Note: See TracTickets for help on using tickets.