http://bugs.winehq.org/show_bug.cgi?id=29147
--- Comment #13 from Vincent Povirk madewokherd@gmail.com 2012-03-14 16:47:16 CDT --- 0009:trace:module:MODULE_InitDLL (0x7e8c0000 L"rpcrt4.dll",PROCESS_DETACH,0x1) - CALL 0024:err:ntdll:RtlpWaitForCriticalSection section 0x110060 "heap.c: main process heap section" wait timed out in thread 0024, blocked by 0009, retrying (60 sec)
This doesn't explain why thread 0009 never finishes PROCESS_DETACH, or lets go of the heap critical section.
Also, the process is shutting down by the time the critical section failures happen, so maybe the real failure is earlier.
Maybe rpcrt4's DllMain should just return if the process is shutting down?