[Gc] Crashs and Deadlocks in the GC on windows-xp

Lothar Scholz scholz at scriptolutions.com
Mon Mar 13 23:53:13 PST 2006


Hello,

I just spend this morning to write a multithreading, garbage collector
stress test program and found two serious problems.

First, after a few seconds of thread creation and destruction i always
run into an error that GC_stop_world calls SuspendThread on an invalid
handle. The windows GetLastError() code is 6. This happens with 6.6
and 6.7 and is very repeatable for me. First i tried to catch this
situation and simply close the handle in the thread table when such a
situation came up but this did not help very much.

Also the comment above in the function told me that i'm not the
first one who had this problem.

So i solved it by using GC_CreateThread and linking to a static
compiled library instead of using the DLL magic. I never had invalid handles
anymore.

But there is still one problem left: It looks like i run into a deadlocks
after some time. But it maybe something different as my dual processor
is having a 50% CPU load. Is there any spinlock blocking that might
cause this behaviour ? Is anybody out there who also saw this in the past ?
At the moment, i'm 75% convinced that it is a GC bug.


-- 
Best regards,
 Lothar Scholz              mailto:scholz at scriptolutions.com



More information about the Gc mailing list