[GHC] #14496: Invoking GHC 8.2.1 executable anywhere results in access violation on Windows 10

#14496: Invoking GHC 8.2.1 executable anywhere results in access violation on Windows 10 -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Keywords: | Operating System: Windows Architecture: | Type of failure: GHC doesn't work Unknown/Multiple | at all Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- This apparently started to happen somewhat recently, as I've been able to run GHC 8.2.1 on Windows before. (Perhaps it was a recent update that changed things?) In any case, any attempt to run GHC or GHCi 8.2.1 immediately results in an access violation, and always at the same memory location: {{{ $ ghc --version The Glorious Glasgow Haskell Compilation System, version 8.2.1 $ ghc Access violation in generated code when reading 000000001170399e $ ghci WARNING: GHCi invoked via 'ghci.exe' in MinTTY consoles (e.g., Cygwin or MSYS) doesn't handle Ctrl-C well; use the 'ghcii.sh' shell wrapper instead GHCi, version 8.2.1: http://www.haskell.org/ghc/ :? for help Access violation in generated code when reading 000000001170399e }}} Strangely enough, GHC 8.0.2 and older do not suffer from this issue, just 8.2.1. In case it's useful, here's the `strace` output: {{{ $ strace ghc Access violation in generated code when reading 000000001170399e create_child: ghc --- Process 10324 created --- Process 10324 loaded C:\Windows\System32\ntdll.dll at 00007ffa31280000 --- Process 10324 loaded C:\Windows\System32\kernel32.dll at 00007ffa31170000 --- Process 10324 loaded C:\Windows\System32\KernelBase.dll at 00007ffa2dd40000 --- Process 10324 loaded C:\Windows\System32\apphelp.dll at 00007ffa2b500000 --- Process 10324 loaded C:\Windows\System32\AcLayers.dll at 00007ffa03630000 --- Process 10324 loaded C:\Windows\System32\msvcrt.dll at 00007ffa30ab0000 --- Process 10324 loaded C:\Windows\System32\user32.dll at 00007ffa2e850000 --- Process 10324 loaded C:\Windows\System32\win32u.dll at 00007ffa2dba0000 --- Process 10324 loaded C:\Windows\System32\gdi32.dll at 00007ffa2ec30000 --- Process 10324 loaded C:\Windows\System32\gdi32full.dll at 00007ffa2da00000 --- Process 10324 loaded C:\Windows\System32\msvcp_win.dll at 00007ffa2d960000 --- Process 10324 loaded C:\Windows\System32\ucrtbase.dll at 00007ffa2dbc0000 --- Process 10324 loaded C:\Windows\System32\shlwapi.dll at 00007ffa2e7f0000 --- Process 10324 loaded C:\Windows\System32\combase.dll at 00007ffa30e50000 --- Process 10324 loaded C:\Windows\System32\rpcrt4.dll at 00007ffa2e9e0000 --- Process 10324 loaded C:\Windows\System32\bcryptprimitives.dll at 00007ffa2dcc0000 --- Process 10324 loaded C:\Windows\System32\sfc.dll at 0000000180000000 --- Process 10324 loaded C:\Windows\System32\winspool.drv at 00007ffa1db00000 --- Process 10324 loaded C:\Windows\System32\IPHLPAPI.DLL at 00007ffa2cb90000 --- Process 10324 loaded C:\Windows\System32\bcrypt.dll at 00007ffa2d0d0000 --- Process 10324 loaded C:\Windows\System32\sfc_os.dll at 00007ffa1c2e0000 --- Process 10324 loaded C:\Windows\System32\imm32.dll at 00007ffa31220000 --- Process 10324 loaded C:\Windows\System32\shell32.dll at 00007ffa2ef80000 --- Process 10324 loaded C:\Windows\System32\cfgmgr32.dll at 00007ffa2e700000 --- Process 10324 thread 3948 created --- Process 10324 loaded C:\Windows\System32\SHCore.dll at 00007ffa30cf0000 --- Process 10324 loaded C:\Windows\System32\windows.storage.dll at 00007ffa2dfb0000 --- Process 10324 loaded C:\Windows\System32\advapi32.dll at 00007ffa30da0000 --- Process 10324 loaded C:\Windows\System32\sechost.dll at 00007ffa2eb00000 --- Process 10324 thread 4764 created --- Process 10324 loaded C:\Windows\System32\kernel.appcore.dll at 00007ffa2d660000 --- Process 10324 loaded C:\Windows\System32\powrprof.dll at 00007ffa2d5f0000 --- Process 10324 loaded C:\Windows\System32\profapi.dll at 00007ffa2d5d0000 --- Process 10324 thread 3852 created --- Process 10324 loaded C:\Windows\System32\wsock32.dll at 00007ffa1c2b0000 --- Process 10324 loaded C:\Windows\System32\ws2_32.dll at 00007ffa2ef10000 --- Process 10324 loaded C:\Windows\System32\ws2_32.dll at 0000000000150000 --- Process 10324 unloaded DLL at 0000000000150000 --- Process 10324 thread 4872 created --- Process 10324 thread 5780 created --- Process 10324 thread 8360 created --- Process 10324, exception c0000005 at 00007ffa3129c12e --- Process 10324 thread 8360 exited with status 0x1 --- Process 10324 thread 5780 exited with status 0x1 --- Process 10324 thread 4872 exited with status 0x1 --- Process 10324 thread 3852 exited with status 0x1 --- Process 10324 thread 4764 exited with status 0x1 --- Process 10324 thread 3948 exited with status 0x1 --- Process 10324 exited with status 0x1 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14496 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14496: Invoking GHC 8.2.1 executable anywhere results in access violation on Windows 10 -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Windows | Architecture: Type of failure: GHC doesn't work | Unknown/Multiple at all | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Phyx-): Could you use https://docs.microsoft.com/en- us/sysinternals/downloads/procdump to generate a crash dump for me? using `-t -ma`. Also what's your OS version? (use powershell and `Get-CimInstance Win32_OperatingSystem | Select-Object Caption, Version, ServicePackMajorVersion, OSArchitecture | Format-List *` -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14496#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14496: Invoking GHC 8.2.1 executable anywhere results in access violation on Windows 10 -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Windows | Architecture: Type of failure: GHC doesn't work | Unknown/Multiple at all | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): Replying to [comment:1 Phyx-]:
Could you use https://docs.microsoft.com/en- us/sysinternals/downloads/procdump to generate a crash dump for me? using `-t -ma`.
Here's the PowerShell output: {{{ $ .\Procdump\procdump64.exe -t -ma -e 1 -x . C:\Users\RyanGlScott\Software\ghc-8.2.1\bin\ghc.exe ProcDump v9.0 - Sysinternals process dump utility Copyright (C) 2009-2017 Mark Russinovich and Andrew Richards Sysinternals - www.sysinternals.com Process: ghc.exe (9372) CPU threshold: n/a Performance counter: n/a Commit threshold: n/a Threshold seconds: n/a Hung window check: Disabled Log debug strings: Disabled Exception monitor: First Chance+Unhandled Exception filter: [Includes] * [Excludes] Terminate monitor: Enabled Cloning type: Disabled Concurrent limit: n/a Avoid outage: n/a Number of dumps: 1 Dump folder: .\ Dump filename/mask: PROCESSNAME_YYMMDD_HHMMSS Queue to WER: Disabled Kill after dump: Disabled Press Ctrl-C to end monitoring without terminating the process. [07:35:22] Exception: C0000005.ACCESS_VIOLATION [07:35:22] Dump 1 initiated: .\ghc.exe_171121_073522.dmp [07:35:24] Dump 1 writing: Estimated dump file size is 124 MB. [07:35:26] Dump 1 complete: 124 MB written in 4.0 seconds Access violation in generated code when reading 000000001170399e [07:35:27] Dump count reached. }}} I'll attach the full log separately.
Also what's your OS version? (use powershell and `Get-CimInstance Win32_OperatingSystem | Select-Object Caption, Version, ServicePackMajorVersion, OSArchitecture | Format-List *`
{{{ $ Get-CimInstance Win32_OperatingSystem | Select-Object Caption, Version, ServicePackMajorVersion, OSArchitecture | Format-List * Caption : Microsoft Windows 10 Home Version : 10.0.16299 ServicePackMajorVersion : 0 OSArchitecture : 64-bit }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14496#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14496: Invoking GHC 8.2.1 executable anywhere results in access violation on Windows 10 -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Windows | Architecture: Type of failure: GHC doesn't work | Unknown/Multiple at all | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): The dump file is too large to attach, so here's a link: https://www.dropbox.com/s/efm2pmm6t3875g9/ghc.exe_171121_073522.dmp?dl=0 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14496#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14496: Invoking GHC 8.2.1 executable anywhere results in access violation on Windows 10 -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: Operating System: Windows | Architecture: Type of failure: GHC doesn't work | Unknown/Multiple at all | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): It's also worth noting that this does not happen on GHC 8.2.2 or HEAD builds. So only 8.2.1 seems to suffer from this issue! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14496#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14496: Invoking GHC 8.2.1 executable anywhere results in access violation on Windows 10 -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: wontfix | Keywords: Operating System: Windows | Architecture: Type of failure: GHC doesn't work | Unknown/Multiple at all | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => closed * resolution: => wontfix Comment: It seems we never did figure out what was causing this. But 8.2.2 works, so I'm opting to close this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14496#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC