racket / drracket

DrRacket, IDE for Racket
http://www.racket-lang.org/
Other
453 stars 93 forks source link

Crash on Windows 10 during pkgs "Copy from Version": heap overflow #131

Open gregid opened 7 years ago

gregid commented 7 years ago

Every time I try to migrate packages from 6.9 to current 6.10 version DrRacket crashes (not a BSOD). The Visual Studio debugger reports it as a heap overflow error in ntdll.dll. By ignoring the errors in the debugger I was able to finish migration.

samth commented 7 years ago

Can you provide any more of the error that you got, including the backtrace?

gregid commented 7 years ago

This is what I could get so far:

Call Stack:
>   ntdll.dll!RtlReportCriticalFailure()   Unknown
    ntdll.dll!RtlpHeapHandleError()    Unknown
    ntdll.dll!RtlpLogHeapFailure() Unknown
    ntdll.dll!RtlFreeHeap() Unknown
    msvcrt.dll!free()  Unknown
    libracket3m_a36f0g.dll!0000000070b7b3ac()   Unknown
    libracket3m_a36f0g.dll!0000000070b7c9fa()   Unknown
    libracket3m_a36f0g.dll!00000000708b389b()   Unknown
    libracket3m_a36f0g.dll!00000000708a463a()   Unknown
    [External Code] 
    libracket3m_a36f0g.dll!00000000709bd130()   Unknown
    [External Code] 

Dump Summary
------------
Dump File:  DrRacket.dmp : F:\Users\Grzegorz\Documents\DrRacket.dmp
Last Write Time:    01.09.2017 16:46:20
Process Name:   DrRacket.exe : C:\Program Files\Racket\DrRacket.exe
Process Architecture:   x64
Exception Code: 0xC0000374
Exception Information:  
Heap Information:   Present

System Information
------------------
OS Version: 10.0.15063
CLR Version(s): 

Modules
-------
Module Name Module Path Module Version
----------- ----------- --------------
DrRacket.exe    C:\Program Files\Racket\DrRacket.exe    6.9.0.900
ntdll.dll   C:\Windows\System32\ntdll.dll   10.0.15063.447
kernel32.dll    C:\Windows\System32\kernel32.dll    10.0.15063.296
KERNELBASE.dll  C:\Windows\System32\KERNELBASE.dll  10.0.15063.502
apphelp.dll C:\Windows\System32\apphelp.dll 10.0.15063.0
advapi32.dll    C:\Windows\System32\advapi32.dll    10.0.15063.0
msvcrt.dll  C:\Windows\System32\msvcrt.dll  7.0.15063.0
sechost.dll C:\Windows\System32\sechost.dll 10.0.15063.0
rpcrt4.dll  C:\Windows\System32\rpcrt4.dll  10.0.15063.0
user32.dll  C:\Windows\System32\user32.dll  10.0.15063.0
win32u.dll  C:\Windows\System32\win32u.dll  10.0.15063.0
gdi32.dll   C:\Windows\System32\gdi32.dll   10.0.15063.0
gdi32full.dll   C:\Windows\System32\gdi32full.dll   10.0.15063.413
msvcp_win.dll   C:\Windows\System32\msvcp_win.dll   10.0.15063.0
ucrtbase.dll    C:\Windows\System32\ucrtbase.dll    10.0.15063.413
imm32.dll   C:\Windows\System32\imm32.dll   10.0.15063.0
libracket3m_a36f0g.dll  C:\Program Files\Racket\lib\libracket3m_a36f0g.dll  0.0.0.0
shell32.dll C:\Windows\System32\shell32.dll 10.0.15063.502
cfgmgr32.dll    C:\Windows\System32\cfgmgr32.dll    10.0.15063.0
SHCore.dll  C:\Windows\System32\SHCore.dll  10.0.15063.0
combase.dll C:\Windows\System32\combase.dll 10.0.15063.296
bcryptPrimitives.dll    C:\Windows\System32\bcryptPrimitives.dll    10.0.15063.0
windows.storage.dll C:\Windows\System32\windows.storage.dll 10.0.15063.502
shlwapi.dll C:\Windows\System32\shlwapi.dll 10.0.15063.502
kernel.appcore.dll  C:\Windows\System32\kernel.appcore.dll  10.0.15063.0
powrprof.dll    C:\Windows\System32\powrprof.dll    10.0.15063.0
profapi.dll C:\Windows\System32\profapi.dll 10.0.15063.0
ws2_32.dll  C:\Windows\System32\ws2_32.dll  10.0.15063.0
longdouble.dll  C:\Program Files\Racket\lib\longdouble.dll  0.0.0.0
uxtheme.dll C:\Windows\System32\uxtheme.dll 10.0.15063.0
ole32.dll   C:\Windows\System32\ole32.dll   10.0.15063.502
oleaut32.dll    C:\Windows\System32\oleaut32.dll    10.0.15063.332
clbcatq.dll C:\Windows\System32\clbcatq.dll 2001.12.10941.16384
propsys.dll C:\Windows\System32\propsys.dll 7.0.15063.0
libiconv-2.dll  C:\Program Files\Racket\lib\libiconv-2.dll  1.14.0.0
libintl-8.dll   C:\Program Files\Racket\lib\libintl-8.dll   0.18.3.0
libglib-2.0-0.dll   C:\Program Files\Racket\lib\libglib-2.0-0.dll   2.39.92.0
winmm.dll   C:\Windows\System32\winmm.dll   10.0.15063.0
WINMMBASE.dll   C:\Windows\System32\WINMMBASE.dll   10.0.15063.0
libgthread-2.0-0.dll    C:\Program Files\Racket\lib\libgthread-2.0-0.dll    2.39.92.0
libgmodule-2.0-0.dll    C:\Program Files\Racket\lib\libgmodule-2.0-0.dll    2.39.92.0
libffi-6.dll    C:\Program Files\Racket\lib\libffi-6.dll    0.0.0.0
libgobject-2.0-0.dll    C:\Program Files\Racket\lib\libgobject-2.0-0.dll    2.39.92.0
psapi.dll   C:\Windows\System32\psapi.dll   10.0.15063.0
zlib1.dll   C:\Program Files\Racket\lib\zlib1.dll   1.2.8.0
libpng16-16.dll C:\Program Files\Racket\lib\libpng16-16.dll 0.0.0.0
libexpat-1.dll  C:\Program Files\Racket\lib\libexpat-1.dll  0.0.0.0
libfreetype-6.dll   C:\Program Files\Racket\lib\libfreetype-6.dll   0.0.0.0
libfontconfig-1.dll C:\Program Files\Racket\lib\libfontconfig-1.dll 0.0.0.0
libpixman-1-0.dll   C:\Program Files\Racket\lib\libpixman-1-0.dll   0.0.0.0
libcairo-2.dll  C:\Program Files\Racket\lib\libcairo-2.dll  0.0.0.0
msimg32.dll C:\Windows\System32\msimg32.dll 10.0.15063.0
libpango-1.0-0.dll  C:\Program Files\Racket\lib\libpango-1.0-0.dll  1.36.6.0
libpangowin32-1.0-0.dll C:\Program Files\Racket\lib\libpangowin32-1.0-0.dll 1.36.6.0
usp10.dll   C:\Windows\System32\usp10.dll   10.0.15063.0
libharfbuzz-0.dll   C:\Program Files\Racket\lib\libharfbuzz-0.dll   0.0.0.0
libpangoft2-1.0-0.dll   C:\Program Files\Racket\lib\libpangoft2-1.0-0.dll   1.36.6.0
libpangocairo-1.0-0.dll C:\Program Files\Racket\lib\libpangocairo-1.0-0.dll 1.36.6.0
libjpeg-9.dll   C:\Program Files\Racket\lib\libjpeg-9.dll   0.0.0.0
comctl32.dll    C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.15063.483_none_26002d27e7c744a2\comctl32.dll 6.10.15063.483
comdlg32.dll    C:\Windows\System32\comdlg32.dll    10.0.15063.502
opengl32.dll    C:\Windows\System32\opengl32.dll    10.0.15063.0
glu32.dll   C:\Windows\System32\glu32.dll   10.0.15063.0
msctf.dll   C:\Windows\System32\msctf.dll   10.0.15063.332
dwmapi.dll  C:\Windows\System32\dwmapi.dll  10.0.15063.0
TextInputFramework.dll  C:\Windows\System32\TextInputFramework.dll  10.0.15063.502
CoreMessaging.dll   C:\Windows\System32\CoreMessaging.dll   10.0.15063.502
CoreUIComponents.dll    C:\Windows\System32\CoreUIComponents.dll    10.0.15063.502
ntmarta.dll C:\Windows\System32\ntmarta.dll 10.0.15063.0
usermgrcli.dll  C:\Windows\System32\usermgrcli.dll  10.0.15063.0
WinTypes.dll    C:\Windows\System32\WinTypes.dll    10.0.15063.0
libeay32.dll    C:\Program Files\Racket\lib\libeay32.dll    1.0.2.11
ssleay32.dll    C:\Program Files\Racket\lib\ssleay32.dll    1.0.2.11
secur32.dll C:\Windows\System32\secur32.dll 10.0.15063.0
sspicli.dll C:\Windows\System32\sspicli.dll 10.0.15063.0
sqlite3.dll C:\Program Files\Racket\lib\sqlite3.dll 0.0.0.0
mswsock.dll C:\Windows\System32\mswsock.dll 10.0.15063.0
dnsapi.dll  C:\Windows\System32\dnsapi.dll  10.0.15063.0
nsi.dll C:\Windows\System32\nsi.dll 10.0.15063.0
IPHLPAPI.DLL    C:\Windows\System32\IPHLPAPI.DLL    10.0.15063.0
rasadhlp.dll    C:\Windows\System32\rasadhlp.dll    10.0.15063.0
FWPUCLNT.DLL    C:\Windows\System32\FWPUCLNT.DLL    10.0.15063.0
bcrypt.dll  C:\Windows\System32\bcrypt.dll  10.0.15063.0
cryptsp.dll C:\Windows\System32\cryptsp.dll 10.0.15063.0
rsaenh.dll  C:\Windows\System32\rsaenh.dll  10.0.15063.0
CRYPTBASE.dll   C:\Windows\System32\CRYPTBASE.dll   10.0.15063.0
crypt32.dll C:\Windows\System32\crypt32.dll 10.0.15063.296
msasn1.dll  C:\Windows\System32\msasn1.dll  10.0.15063.0
gregid commented 7 years ago

The problem seems to be more package installation than migration itself. The same exception happens when I install racketscript package from GUI package manager -> available from Catalog.

gregid commented 7 years ago

The heap exception is then followed by hundreds of Access Violation errors, here a sample:

Exception thrown at 0x000000000CC40E76 in DrRacket.exe: 0xC0000005: Access violation writing location 0x0000000017226138.

Exception thrown at 0x0000000070AD9D46 (libracket3m_a36f0g.dll) in DrRacket.exe: 0xC0000005: Access violation writing location 0x000000000B460448.
Exception thrown at 0x00000000708F2E18 (libracket3m_a36f0g.dll) in DrRacket.exe: 0xC0000005: Access violation writing location 0x000000002AB4B208.
Exception thrown at 0x00000000708983EE (libracket3m_a36f0g.dll) in DrRacket.exe: 0xC0000005: Access violation writing location 0x00000000032A00D8.

Ignoring erros allows package installation to complete.

Edit: Installing from command line is successful (no errors). Edit2: I was running DrRacket with Administrative Rights when errors occured. Edit3: Running command line without Administrative Rights resulted in Access Violation.

mflatt commented 7 years ago

@gregid Thanks for the report! I think you're probably hitting a bug related to symbolic links on Windows, and we tentatively plan to create a 6.10.1 release to address the problem.

When I try to install "racketscript", I get an error about not being able to create a symbolic link. I expect that running as administrator would avoid that error, and then having a symbolic link could cause other things to go wrong in 6.10.

gregid commented 7 years ago

I tested it on Racket 6.10.1 and here is what happened. The first time I run the migration it crashed, unfortunately I forgot to look at the exception so I opened DrRacket second time and run the migration tool again... this time it finished without crashing.

It seems Racket 6.10.1 may have fixed the problem and I cannot recreate the mystery crash that happened the first time.