[Gc] Win32 hang with MPROTECT_VDB

Boehm, Hans hans.boehm at hp.com
Wed May 20 18:21:07 PDT 2009


I think the offending scenario is as follows:

- thread A takes a protection fault, and is somewhere inside ntdll, holding a system lock.
- thread B starts a GC, suspending A.
- thread B reprotects the heap.
- thread B subsequently tries to restart the world, in the process, setting t -> suspended to FALSE, for some t.
- the access to t faults; B tries to invoke the protection handler.
- A hasn't yet been restarted; hence it still holds the system lock.

oops.

We probably need to be more careful about causing protection faults with the world stopped.  I'm not sure if there is a way to avoid suspending a thread while it's in the fault handler.

This was A LOT easier to debug once I figured out how to get ntdll symbols ...

Hans
 


More information about the Gc mailing list