[kaffe] race during thread creation and gc invocation

Guilhem Lavaux guilhem at kaffe.org
Tue Dec 21 04:20:04 PST 2004


Helmer Krämer wrote:

>Guilhem Lavaux <guilhem at kaffe.org> wrote:
>
>  
>
>>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.
>>    
>>
>
>Ok, I've checked it in.
>
>BTW, what are your plans regarding the boehm-gc  integration? I've
>stumbled across a function pointer called GC_push_other_roots which
>can be used by the application to push root references the gc can't
>know about. So it looks like we could use it to traverse the list of
>running threads using jthread_walkLiveThreads, just like kaffe-gc
>does. This in turn would mean that we could make boehm-gc use the
>jthread layer (provided that we find a way to trick boehm-gc into
>using jthread_suspendall). Have you had a look at this possibility?
>
>Regards,
>Helmer
>
>  
>

My first goal was to make the class allocation/destruction procedure
compatible with the boehm-gc. But I'm stopped with a not easy
understable SEGV. I am trying to isolate the reference which is
wrongly garbage but it takes time. I can send you the current state
where I use strong reference to protect native code.

I've just had another look at the boehm-gc and it may be possible to
override GC_default_push_roots by our own method to mark the stack.
I do not yet know if it is fully feasible. In the other case we will only
support pthreads.

Regards,

Guilhem.




More information about the kaffe mailing list