[kaffe] race during thread creation and gc invocation

Adam Heath doogie at brainfood.com
Mon Dec 20 11:49:43 PST 2004


On Mon, 20 Dec 2004, Helmer [ISO-8859-15] Krämer wrote:

> On Sat, 11 Dec 2004 21:50:54 +0100
> Alexander Boettcher <ab764283 at os.inf.tu-dresden.de> wrote:
>
> Hi Alexander,
>
> > i have a race condition in thread.c found which (may) causes Kaffe to
> > hang - for our L4 system it happens.
>
> [skipping lame excuses for not responding earlier]
>
> thanks for the detailed analysis :) I suspect that this may also be
> the cause for some of the regression test failures on smp systems.

Nope, doesn't help.  Still get deadlocks in the regression system.

> >  So, jlThread can not be used in this form, a other pointer would be
> > necessary in the threadData structure or the gc may not assume that
> > jlThread is of type VMThread and has to handle it.
> >
> >  What do you think ?
>
> Probably the easiest way would be to simply skip uninitialized
> threads in liveThreadWalker. To determine whether a thread is
> properly initialized, we can (ab)use threadData.jniEnv and define
> a thread as initialized iff threadData.jniEnv is not NULL. The
> attached patch does exactly that and seems to work on my i386.
> Could you probably give it a try?
>
> Thanks,
> Helmer
>



More information about the kaffe mailing list