After looking at this, it's not really the debugger which is to blame...
what happens is a nice deadlock in the debugger/process creation code
what happens is as follows:
- the debugger D creates a new process P using CreateProcess
- upon P creation, several interactions occur between creator of P
(aka process D), P itself and the server (with events and such)
- more precisely, D waits until P has reached some stage in init (mainly
after main module for P (and all its dependancies, including here opengl32)
has been loaded
- if an exception occurs before, P sends an exception to the server, which
lets P wait until D grabs it
- but D is waiting for P creation to be completed (still in CreateProcess
code)
hence the deadlock
I'm not sure of a correct fix. Alexandre ?
Andreas Mohr wrote:
>
> Hi Eric,
>
> I just had the following problem:
>
> An OpenGL benchmark crashed during loading opengl32.dll, so I decided
> to fire up winedbg instead.
> What happened ?
> Well, not much, that's for sure.
> It just printed
> Starting WineDbg...
> and that was it.
> And that's probably because (-debugmsg +all):
> trace:module:MODULE_GetLoadOrder Looking for 'OPENGL32.dll' (OPENGL32), found
>'opengl32'
> trace:module:MODULE_LoadLibraryExA Trying built-in 'OPENGL32.dll'
> trace:string:lstrcpynA (0xbffff3b8, "OPENGL32.dll", 260)
> trace:seh:EXC_RtlRaiseException code=c0000005 flags=0
> 081fc5c8: exception_event(
>record={code=c0000005,flags=0,rec=(nil),addr=0x40760b96,params={0,4}, first=1,
>context={flags=00000000,eax=00000000,ebx=405453f0,ecx=00000000,edx=40210504,esi=405453e0,edi=40210504,ebp=bfffedec,eip=40760b96,esp=bfffedec,eflags=00010246,cs=0023,ds=002b,es=002b,fs=008f,gs=0000,dr0=00000000,dr1=00000000,dr2=00000000,dr3=4015b6d6,dr6=40212800,dr7=4037af40,float={00000000,00000000,00000000,00000000,00000000,00000000,23000000,53203637,4d207461,32207961,32322030,3a39303a,43203130,407fea08,04000000,402c0868,00000000,4015b8ca,40212800,4037af60,00000003,00000000,00000000,00000000,bfffec9c,4015f3ad,65430e08,00000000}}
> )
> 081e07e8: select() = 0 { signaled=0 }
> trace:timer:SERVICE_Loop Wait returned: 0
> trace:x11:TSXFlush Call XFlush
> trace:x11:TSXFlush Ret XFlush
> trace:timer:SERVICE_Loop Waiting for 3 objects
> 081e07e8: select( count=3, flags=2, timeout=-1, handles={44,36,28} )
> 081e07e8: select() = 0 { signaled=0 }
> trace:timer:SERVICE_Loop Wait returned: 0
> trace:x11:TSXFlush Call XFlush
> trace:x11:TSXFlush Ret XFlush
> trace:timer:SERVICE_Loop Waiting for 3 objects
> 081e07e8: select( count=3, flags=2, timeout=-1, handles={44,36,28} )
> 081e07e8: select() = 0 { signaled=0 }
> trace:timer:SERVICE_Loop Wait returned: 0
> trace:x11:TSXFlush Call XFlush
> trace:x11:TSXFlush Ret XFlush
> trace:timer:SERVICE_Loop Waiting for 3 objects
> 081e07e8: select( count=3, flags=2, timeout=-1, handles={44,36,28} )
> 081e07e8: select() = 0 { signaled=0 }
> trace:timer:SERVICE_Loop Wait returned: 0
> trace:x11:TSXFlush Call XFlush
> trace:x11:TSXFlush Ret XFlush
> trace:timer:SERVICE_Loop Waiting for 3 objects
> 081e07e8: select( count=3, flags=2, timeout=-1, handles={44,36,28} )
> 081e07e8: select() = 0 { signaled=0 }
> trace:timer:SERVICE_Loop Wait returned: 0
> trace:x11:TSXFlush Call XFlush
> trace:x11:TSXFlush Ret XFlush
> trace:timer:SERVICE_Loop Waiting for 3 objects
> 081e07e8: select( count=3, flags=2, timeout=-1, handles={44,36,28} )
> 081e07e8: select() = 0 { signaled=0 }
> trace:timer:SERVICE_Loop Wait returned: 0
> trace:x11:TSXFlush Call XFlush
>
> and so on until eternity is over...
>
> Any idea why winedbg hangs ?
>
> Newest CVS, of course...
>
> --
> Andreas Mohr Tel.: +49 7159 800604 private (preferred)
> Stauferstr. 6 927883 main line (family)
> D-71272 Renningen +49 172 6197363 mobile
> Germany http://home.germany.net/100-30936/
--
---------------
Eric Pouech (http://perso.wanadoo.fr/eric.pouech/)
"The future will be better tomorrow", Vice President Dan Quayle