https://bugs.winehq.org/show_bug.cgi?id=39270
Bug ID: 39270 Summary: Microsoft .NET 2.x/3.x Framework: "mscorsvw" compile worker hangs occasionally while generating native images from assemblies in GAC (heap lock timeout reported) Product: Wine Version: 1.7.51 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
while revisiting bug 36628 I forgot to install .NET 3.x via 'winetricks' which is a required prerequisite for GFWL.
The GFWL installer executed .NET Framework 2.0 and 3.0 installers in order. At one point I finally caught one of these mysterious 'mscorsvw' compile worker process shutdown races that are still happening once in a while when NGENing assemblies into GAC.
See bug 30162 ("Microsoft .NET 2.0 Framework: "mscorsvw" compile worker hangs sometimes while generating native images from assemblies in GAC (loader section block reported)") - except it's not the loader lock but heap here.
Normal process tree:
--- snip --- Wine-dbg>info process pid threads executable (all id:s are in hex) 00000023 4 'explorer.exe' 0000000e 6 'services.exe' 000000d7 4 _ 'mscorsvw.exe' 0000001a 3 _ 'plugplay.exe' 00000012 4 _ 'winedevice.exe' 00000008 1 'setup.exe' 0000002c 6 _ 'msiexec.exe' 00000028 2 _ 'gfwlivesetup.exe' 0000000c 1 _ 'GFWLIVESetupStub.exe' 0000003b 2 _ 'dotnetfx3.exe' 0000003e 3 _ 'setup.exe' 000000de 5 _ 'ngen.exe' 000000e0 13 _ 'mscorsvw.exe' --- snip ---
Symptoms:
* critical section timeouts printed in terminal * orphaned 'mscorsvw' compile worker process
--- snip --- err:ntdll:RtlpWaitForCriticalSection section 0x110060 "/home/focht/projects/wine/wine.repo/src/dlls/ntdll/heap.c: main process heap section" wait timed out in thread 007d, blocked by 005c, retrying (60 sec) --- snip ---
Orphaned 'mscorsvw.exe' (wpid 0x9d):
--- snip --- Wine-dbg>info process pid threads executable (all id:s are in hex) 0000009d 1 'mscorsvw.exe' 00000023 4 'explorer.exe' 0000000e 6 'services.exe' 000000d7 4 _ 'mscorsvw.exe' 0000001a 3 _ 'plugplay.exe' 00000012 4 _ 'winedevice.exe' 00000008 1 'setup.exe' 0000002c 6 _ 'msiexec.exe' 00000028 2 _ 'gfwlivesetup.exe' 0000000c 1 _ 'GFWLIVESetupStub.exe' 0000003b 2 _ 'dotnetfx3.exe' 0000003e 2 _ 'setup.exe' --- snip ---
--- snip --- 11600 ./setup.exe 11603 /home/focht/projects/wine/wine.repo/install/bin/wineserver 11609 C:\windows\system32\services.exe 11613 C:\windows\system32\winedevice.exe MountMgr 11621 C:\windows\system32\plugplay.exe 11630 C:\windows\system32\explorer.exe /desktop 11680 MSIEXEC.EXE /i d:\RESIDENT EVIL 5.msi TRANSFORMS=1033.MST SETUPEXEDIR... 11718 d:\redist\gfwlivesetup.exe /q 11722 c:\d8befac01b420b330b\GFWLIVESetupStub.exe /q 11739 pkg\dotnetfx3.exe /norestart /qb 11742 c:\584a7a7d10077d6603\setup.exe /norestart /qb 11966 C:\windows\Microsoft.NET\Framework\v2.0.50727\mscorsvw.exe --- snip ---
--- snip --- Wine-dbg>info thread process tid prio (all id:s are in hex) ... 00000028 gfwlivesetup.exe 0000000d 0 00000027 0 0000000c GFWLIVESetupStub.exe 00000016 0 000000d7 mscorsvw.exe 000000dd 0 000000dc 0 000000db 0 000000d8 0 0000009d (D) C:\windows\Microsoft.NET\Framework\v2.0.50727\mscorsvw.exe 0000007d 0 <== 000000b7 setup.exe 000000c1 0 000000bc 0 ...
Backtracing for thread 007d in process 009d (C:\windows\Microsoft.NET\Framework\v2.0.50727\mscorsvw.exe):
Backtrace: =>0 0xf77a6c10 __kernel_vsyscall+0x10() in [vdso].so (0x00000000) 1 0xf74a1dc7 syscall+0x26() in libc.so.6 (0x00000000) 2 0x7bc4b2a4 futex_wait+0x3f(addr=0x110070, val=0, timeout=0x33f3c4) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/critsection.c:69] in ntdll (0x0033f3a8) 3 0x7bc4b3ae fast_wait+0x40(crit=0x110060, timeout=0x3c) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/critsection.c:108] in ntdll (0x0033f3d8) 4 0x7bc4b509 wait_semaphore+0x24(crit=0x110060, timeout=0x3c) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/critsection.c:229] in ntdll (0x0033f518) 5 0x7bc4b9ad RtlpWaitForCriticalSection+0x128(crit=<couldn't compute location>) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/critsection.c:452] in ntdll (0x0033f5d8) 6 0x7bc4bc88 RtlEnterCriticalSection+0xd0(crit=<couldn't compute location>) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/critsection.c:566] in ntdll (0x0033f618) 7 0x7bc61f10 RtlAllocateHeap+0xfd(heap=<couldn't compute location>, flags=<couldn't compute location>, size=<couldn't compute location>) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/heap.c:1675] in ntdll (0x0033f6a8) 8 0x7bc866aa RtlAnsiStringToUnicodeString+0x83(uni=<couldn't compute location>, ansi=<couldn't compute location>, doalloc=1) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/rtlstr.c:689] in ntdll (0x0033f708) 9 0x7ec6878c RegSetValueExA+0x158(hkey=<couldn't compute location>, name=<couldn't compute location>, reserved=<couldn't compute location>, type=<couldn't compute location>, data=<couldn't compute location>, count=<couldn't compute location>) [/home/focht/projects/wine/wine.repo/src/dlls/advapi32/registry.c:1294] in advapi32 (0x0033f768) 10 0x7d6efa68 MSACM_WriteCache+0x7e(padid=0x5060138) [/home/focht/projects/wine/wine.repo/src/dlls/msacm32/internal.c:262] in msacm32 (0x0033f7b8) 11 0x7d6f0ff6 MSACM_UnregisterAllDrivers+0x22() [/home/focht/projects/wine/wine.repo/src/dlls/msacm32/internal.c:804] in msacm32 (0x0033f7e8) 12 0x7d6f1b2c DllMain+0xbb(hInstDLL=<couldn't compute location>, fdwReason=<couldn't compute location>, lpvReserved=<couldn't compute location>) [/home/focht/projects/wine/wine.repo/src/dlls/msacm32/msacm32_main.c:57] in msacm32 (0x0033f828) 13 0x7d6f6afd __wine_spec_dll_entry+0x64(inst=<couldn't compute location>, reason=<couldn't compute location>, reserved=<couldn't compute location>) [/home/focht/projects/wine/wine.repo/src/dlls/winecrt0/dll_entry.c:40] in msacm32 (0x0033f868) 14 0x7bc640aa call_dll_entry_point+0x15() in ntdll (0x0033f898) 15 0x7bc665c1 MODULE_InitDLL+0x1ea(wm=0x3ea5c60, reason=0, lpReserved=0x1) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/loader.c:1091] in ntdll (0x0033f9f8) 16 0x7bc66c08 process_detach+0x88() [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/loader.c:1260] in ntdll (0x0033fa28) 17 0x7bc6a77c LdrShutdownProcess+0x5d() [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/loader.c:2702] in ntdll (0x0033fa58) 18 0x7bc6a7c0 RtlExitUserProcess+0x41(status=<couldn't compute location>) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/loader.c:2714] in ntdll (0x0033fa78) 19 0x7b872fda ExitProcess+0x11() in kernel32 (0x0033fa94) 20 0x00000000 (0x0033fa94) 21 0x79f96d9c in mscorwks (+0x126d9b) (0x0033fb2c) --- snip ---
Thread 0x5c is already gone with heap lock held. Unfortunately not reliably reproducible for me - kind of trying to hit the jackpot.
$ wine --version wine-1.7.51-102-ga7e294c
Regards
https://bugs.winehq.org/show_bug.cgi?id=39270
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |dotnet, download, Installer URL| |http://www.microsoft.com/do | |wnloads/details.aspx?Family | |ID=0856eacb-4362-4b0d-8edd- | |aab15c5e04f5
https://bugs.winehq.org/show_bug.cgi?id=39270
--- Comment #1 from Anastasius Focht focht@gmx.net --- Created attachment 52349 --> https://bugs.winehq.org/attachment.cgi?id=52349 mscorsvw compile worker threads live view
Hello folks,
apparently it's a matter of triggering GAC update often enough to hit it ...
With .NET Frameworks 2.x/3.x installed:
--- snip --- $ wine "c:\windows\Microsoft.NET\Framework\v2.0.50727\ngen.exe" update --- snip ---
Another orphaned process (wpid=0x19) with one remaining thread blocking on heap lock:
--- snip ---
Wine-dbg>info process pid threads executable (all id:s are in hex) 00000014 4 'explorer.exe' 0000000e 6 'services.exe' 00000023 3 _ 'plugplay.exe' 0000001d 4 _ 'winedevice.exe' 00000012 4 _ 'mscorsvw.exe' 00000008 6 'ngen.exe' 0000005d 14 _ 'mscorsvw.exe' 00000019 1 _ 'mscorsvw.exe'
Wine-dbg>bt Backtrace:
=>0 0xf77f1c10 __kernel_vsyscall+0x10() in [vdso].so (0x00000000) 1 0xf74ecdc7 syscall+0x26() in libc.so.6 (0x00000000) 2 0x7bc4b2a4 futex_wait+0x3f(addr=0x110070, val=0, timeout=0x33f284) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/critsection.c:69] in ntdll (0x0033f268) 3 0x7bc4b3ae fast_wait+0x40(crit=0x110060, timeout=0x3c) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/critsection.c:108] in ntdll (0x0033f298) 4 0x7bc4b509 wait_semaphore+0x24(crit=0x110060, timeout=0x3c) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/critsection.c:229] in ntdll (0x0033f3d8) 5 0x7bc4b9ad RtlpWaitForCriticalSection+0x128(crit=<couldn't compute location>) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/critsection.c:452] in ntdll (0x0033f498) 6 0x7bc4bc88 RtlEnterCriticalSection+0xd0(crit=<couldn't compute location>) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/critsection.c:566] in ntdll (0x0033f4d8) 7 0x7bc61f10 RtlAllocateHeap+0xfd(heap=<couldn't compute location>, flags=<couldn't compute location>, size=<couldn't compute location>) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/heap.c:1675] in ntdll (0x0033f568) 8 0x7bc4b6bc RtlInitializeCriticalSectionEx+0xb5(crit=<couldn't compute location>, spincount=<couldn't compute location>, flags=<couldn't compute location>) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/critsection.c:326] in ntdll (0x0033f5b8) 9 0x7b88069c InitializeCriticalSectionEx+0x2a(crit=<couldn't compute location>, spincount=<couldn't compute location>, flags=<couldn't compute location>) [/home/focht/projects/wine/wine.repo/src/dlls/kernel32/sync.c:354] in kernel32 (0x0033f5f8) 10 0x7b88062b InitializeCriticalSection+0x2c(crit=<couldn't compute location>) [/home/focht/projects/wine/wine.repo/src/dlls/kernel32/sync.c:311] in kernel32 (0x0033f628) 11 0x7d9a0871 msvcrt_initialize_mlock+0x25(locknum=0x1c) [/home/focht/projects/wine/wine.repo/src/dlls/msvcrt/lock.c:50] in msvcrt (0x0033f658) 12 0x7d9a0a74 _lock+0xf1(locknum=<couldn't compute location>) [/home/focht/projects/wine/wine.repo/src/dlls/msvcrt/lock.c:102] in msvcrt (0x0033f698) 13 0x7d990ccf MSVCRT__lock_file+0x3b(file=<couldn't compute location>) [/home/focht/projects/wine/wine.repo/src/dlls/msvcrt/file.c:1263] in msvcrt (0x0033f6c8) 14 0x7d9902cc MSVCRT_fflush+0x2f(file=0x7da05320) [/home/focht/projects/wine/wine.repo/src/dlls/msvcrt/file.c:978] in msvcrt (0x0033f708) 15 0x7d990216 msvcrt_flush_all_buffers+0x54(mask=0x3) [/home/focht/projects/wine/wine.repo/src/dlls/msvcrt/file.c:948] in msvcrt (0x0033f758) 16 0x7d99029a MSVCRT__flushall+0x14() [/home/focht/projects/wine/wine.repo/src/dlls/msvcrt/file.c:964] in msvcrt (0x0033f778) 17 0x7d9908f0 msvcrt_free_io+0xa() [/home/focht/projects/wine/wine.repo/src/dlls/msvcrt/file.c:1172] in msvcrt (0x0033f7a8) 18 0x7d9a0f6a DllMain+0x1a9(hinstDLL=<couldn't compute location>, fdwReason=<couldn't compute location>, lpvReserved=<couldn't compute location>) [/home/focht/projects/wine/wine.repo/src/dlls/msvcrt/main.c:130] in msvcrt (0x0033f828) 19 0x7d9d5fdd __wine_spec_dll_entry+0x64(inst=<couldn't compute location>, reason=<couldn't compute location>, reserved=<couldn't compute location>) [/home/focht/projects/wine/wine.repo/src/dlls/winecrt0/dll_entry.c:40] in msvcrt (0x0033f868) 20 0x7bc640aa call_dll_entry_point+0x15() in ntdll (0x0033f898) 21 0x7bc665c1 MODULE_InitDLL+0x1ea(wm=0x41fdf00, reason=0, lpReserved=0x1) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/loader.c:1091] in ntdll (0x0033f9f8) 22 0x7bc66c08 process_detach+0x88() [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/loader.c:1260] in ntdll (0x0033fa28) 23 0x7bc6a77c LdrShutdownProcess+0x5d() [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/loader.c:2702] in ntdll (0x0033fa58) 24 0x7bc6a7c0 RtlExitUserProcess+0x41(status=<couldn't compute location>) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/loader.c:2714] in ntdll (0x0033fa78) 25 0x7b872fda ExitProcess+0x11() in kernel32 (0x0033fa94) 26 0x00000000 (0x0033fa94) 27 0x79f96d9c in mscorwks (+0x126d9b) (0x0033fb2c) --- snip ---
I managed to attach a debugger fast enough to catch a long running worker that is still alive (some seconds) - unfortunately that one exited cleanly. Usually around 13-14 threads, many of them RPC workers. See attachment for reference.
Regards
https://bugs.winehq.org/show_bug.cgi?id=39270
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=39270
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
revisiting. Haven't seen this bug in a while, so assuming fixed.
$ wine --version wine-3.1
Regards
https://bugs.winehq.org/show_bug.cgi?id=39270
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.2.
https://bugs.winehq.org/show_bug.cgi?id=39270
Vitaly Lipatov lav@etersoft.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |lav@etersoft.ru
https://bugs.winehq.org/show_bug.cgi?id=39270
--- Comment #4 from Anastasius Focht focht@gmx.net --- Hello folks,
adding stable download link via Internet Archive.
https://web.archive.org/web/20051029064215/http://download.microsoft.com/dow...
https://www.virustotal.com/gui/file/46693d9b74d12454d117cc61ff2e9481cabb100b...
$ sha1sum dotnetfx.exe a3625c59d7a2995fb60877b5f5324892a1693b2a dotnetfx.exe
$ du -sh dotnetfx.exe 23M dotnetfx.exe
Regards
https://bugs.winehq.org/show_bug.cgi?id=39270
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.microsoft.com/do |https://web.archive.org/web |wnloads/details.aspx?Family |/20051029064215/http://down |ID=0856eacb-4362-4b0d-8edd- |load.microsoft.com/download |aab15c5e04f5 |/5/6/7/567758a3-759e-473e-b | |f8f-52154438565a/dotnetfx.e | |xe