I think marten range was right on the money there. It must be that one of my threads is calling EnterCriticial section multiple times without calling LeaveCriticalSection. Alas posting some simple code that reproduce the problem is really hard because my code has 20 different threads with as many criticial sections and it's hard to trace down to which thread is doing it. Thanks a lot for the info about when a critical section is locked. I go over my code more in depth. Hopefully i can fix it. Thanks
Amish