[kaffe] race during thread creation and gc invocation

Guilhem Lavaux guilhem at kaffe.org
Mon Dec 20 04:03:28 PST 2004


Helmer 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.
>
>  
>
>> 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
>  
>

[I am also guilty of not having seen this message]

Hi,

I think that we may skip the marking of thread and its internals but we 
should continue to mark the stack of the thread. So I suggest we move 
the call to TwalkThreads at the beginning of liveThreadWalker and do as 
you have suggested.

Regards,

Guilhem Lavaux.



More information about the kaffe mailing list