http://bugs.winehq.org/show_bug.cgi?id=33555
Bug #: 33555 Summary: Peachtree Quantum 2010 Accountant Edition post-install COM inproc server registration hangs on PEB lock (process exit) Product: Wine Version: 1.5.29 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: kernel32 AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net Classification: Unclassified
Hello folks,
while investigating bug 18935 I noticed a problem in COM inproc server registration during post-install of "Peachtree Quantum 2010 Accountant Edition".
The COM inproc server in question is a mixed mode assembly (.NET 2.0).
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/Sage Software/Peachtree
$ file PAWLegacy.dll PAWLegacy.dll: PE32 executable (DLL) (GUI) Intel 80386 Mono/.Net assembly, for MS Windows
$ wine regsvr32 "C:\PROG~FBU\SAGE~XMD\PEAC~IU0\PAWLegacy.dll" ... 000a:Starting process L"C:\windows\system32\regsvr32.exe" (entryproc=0x7effcfd4) ... 000a:Call KERNEL32.LoadLibraryExA(0011515d "C:\PROG~FBU\SAGE~XMD\PEAC~IU0\PAWLegacy.dll",00000000,00000008) ret=7effc7f2 ... 000a:Ret PE DLL (proc=0x109ed6aa,module=0x10000000 L"PAWLegacy.dll",reason=PROCESS_ATTACH,res=(nil)) retval=1 000a:Ret KERNEL32.LoadLibraryExA() retval=10000000 ret=7effc7f2 000a:Call KERNEL32.GetProcAddress(10000000,7effd24e "DllRegisterServer") ret=7effc844 000a:Ret KERNEL32.GetProcAddress() retval=00e04f39 ret=7effc844 000a:CALL PAWLegacy.DllRegisterServer(<unknown, check return>) ret=7effc8e1 ... Successfully registered DLL C:\PROG~FBU\SAGE~XMD\PEAC~IU0\PAWLegacy.dll 000a:Call KERNEL32.FreeLibrary(10000000) ret=7effc945 000a:Ret KERNEL32.FreeLibrary() retval=00000001 ret=7effc945 000a:Call ole32.OleUninitialize() ret=7effcfc3 ... 000a:Ret ole32.OleUninitialize() retval=00000000 ret=7effcfc3 000a:Call KERNEL32.ExitProcess(00000000) ret=7effd062 000a:Call PE DLL (proc=0xf60c66d0,module=0xf60c0000 L"comcat.dll",reason=PROCESS_DETACH,res=0x1) 000a:Ret PE DLL (proc=0xf60c66d0,module=0xf60c0000 L"comcat.dll",reason=PROCESS_DETACH,res=0x1) retval=1 000a:Call PE DLL (proc=0x7907e547,module=0x79060000 L"mscorjit.dll",reason=PROCESS_DETACH,res=0x1) ... 000a:Ret PE DLL (proc=0x6f11db,module=0x6d0000 L"pscore3.dll",reason=PROCESS_DETACH,res=0x1) retval=1 000a:Call PE DLL (proc=0xf69ff77c,module=0xf69f0000 L"mpr.dll",reason=PROCESS_DETACH,res=0x1) 000a:Ret PE DLL (proc=0xf69ff77c,module=0xf69f0000 L"mpr.dll",reason=PROCESS_DETACH,res=0x1) retval=1 000a:Call PE DLL (proc=0x19082444,module=0x19000000 L"Pchlib32.dll",reason=PROCESS_DETACH,res=0x1) 000a:CALL mfc90.1241(190bd408,00000000) ret=19060e1c 000a:Call msvcrt.memset(786dbb50,00000000,00001800) ret=78610ded 000a:Ret msvcrt.memset() retval=786dbb50 ret=78610ded 000a:RET mfc90.1241() retval=786dbb50 ret=19060e1c 000a:Call KERNEL32.DeleteAtom(0000c000) ret=19060f51 000a:Ret KERNEL32.DeleteAtom() retval=00000000 ret=19060f51 000a:Call KERNEL32.DeleteAtom(0000c001) ret=19060f5f 000a:Ret KERNEL32.DeleteAtom() retval=00000000 ret=19060f5f 000a:Call msvcrt.free(001c38b8) ret=1903e047 000a:Call ntdll.RtlFreeHeap(00110000,00000000,001c38b8) ret=f7377f2b 000a:Ret ntdll.RtlFreeHeap() retval=00000001 ret=f7377f2b 000a:Ret msvcrt.free() retval=00000001 ret=1903e047 000a:Call ole32.CoUninitialize() ret=19060f90 000a:Call KERNEL32.SetEvent(0000021c) ret=7ecb64f0 0026:Ret KERNEL32.WaitForMultipleObjects() retval=00000001 ret=7ecb5b8f 0026:Call KERNEL32.CloseHandle(00000220) ret=7ecb5baa 000a:Ret KERNEL32.SetEvent() retval=00000001 ret=7ecb64f0 000a:Call KERNEL32.WaitForSingleObject(00000224,ffffffff) ret=7ecb6509 0026:Ret KERNEL32.CloseHandle() retval=00000001 ret=7ecb5baa 0026:Call KERNEL32.CloseHandle(00000234) ret=7ecb61b0 0026:Ret KERNEL32.CloseHandle() retval=00000001 ret=7ecb61b0 001a:Ret KERNEL32.WaitForSingleObjectEx() retval=00000102 ret=79e77fd1 001a:Call KERNEL32.GetLastError() ret=79e74ab4 001a:Ret KERNEL32.GetLastError() retval=00000000 ret=79e74ab4 001a:Call KERNEL32.GetLastError() ret=79e74ade 001a:Ret KERNEL32.GetLastError() retval=00000000 ret=79e74ade 001a:Call KERNEL32.WaitForMultipleObjects(00000002,7a381bb8,00000000,ffffffff) ret=79f8d98a 000e:err:ntdll:RtlpWaitForCriticalSection section 0x7bcd0dc0 "/home/focht/projects/wine/wine-git/dlls/ntdll/rtl.c: peb_lock" wait timed out in thread 000e, blocked by 000a, retrying (60 sec) 0026:err:ntdll:RtlpWaitForCriticalSection section 0x7bcd0dc0 "/home/focht/projects/wine/wine-git/dlls/ntdll/rtl.c: peb_lock" wait timed out in thread 0026, blocked by 000a, retrying (60 sec --- snip ---
The additional threads are .NET CLR/COM remoting helper threads.
I remembered some recent changes in that area, specifically process exit behaviour (PEB lock).
http://source.winehq.org/git/wine.git/commitdiff/77f222505cdb392f28809326710... ("kernel32: Hold PEB lock during process exit.")
Indeed, reverting that commit lets regsvr32 successfully exit.
Regards