no stacktrace available

Boehm, Hans hans.boehm@hp.com
Tue Dec 14 22:39:00 GMT 2004


I am not a NetBSD expert.  But my impression is that NetBSD thread
support is relatively new.

The garbage collector used by libgcj
needs to know a little about the thread package it's running on.
For a new pthreads implementation, the port is often pretty simple.
In some cases it involves more work.  (At this point,
the GC actually relies on very little beyond the pthread standard.
But it does rely on some marginally legal things working.  And it
seems to be quite good at exercising subtle bugs and misfeatures in
threads libraries.  And some thread libraries that claim to be
Posix compatible omit a few pieces that it needs.)

As far as I can tell, this work of porting the GC simply hasn't been
done yet.  Hence I don't know how much is missing.  But there is
missing code.  At a minimum someone would have to go through the
tests for e.g. GC_FREEBSD_THREADS, and adjust the code to behave
similarly for GC_NETBSD_THREADS.  (There are some FreeBSD bug
workarounds which probably don't apply.  And the signal numbers
used by the GC may have to be reconfigured.  And other stuff may
break.)

I'm not entirely sure why this hasn't been noticed.  Often a lot of
the libgcj tests pass with a completely broken GC.  That's probably a
misfeature of the libgcj tests.

Hans
 

> -----Original Message-----
> From: Bart Locanthi [mailto:bart@sabl.com]
> Sent: Tuesday, December 14, 2004 2:07 PM
> To: Boehm, Hans
> Cc: Michael Koch; java@gcc.gnu.org
> Subject: Re: no stacktrace available
> 
> 
> i thought one of the big changes w/ netbsd 2.0 was native threads.
> 
> perhaps the netbsd binary package for gcj isn't configured to 
> use them? 
> what's your guess as to the right thing to say to configure?
> 
> Boehm, Hans wrote:
> 
> >I believe the GC currently has not thread support under NetBSD,
> >at least not in my version.  The symptom below is typical for an
> >attempt to run the single-threaded GC in a multi-threaded
> >environment.
> >
> >If your application doesn't need threads (and uses at most trivial
> >finalizers), you might be able to get gcj up without thread
> >support.
> >
> >Jerome Laban posted about an attempt to fix the GC (July 9,
> >http://news.gmane.org/gmane.comp.programming.garbage-collecti
> on.boehmgc)
> >but I don't believe that resulted in a final patch.  I think he
> >ended up trying to fix real-time signals, which the collector
> >uses on some platforms for stopping threads, but are not 
> essential for
> >the GC.  (They're not currently used on Linux.)
> >
> >I don't know what the status of his work is.  Nor do I understand why
> >the Linux code doesn't just work.  But I haven't personally tried
> >to get the collector up on NetBSD.
> >
> >Hans
> >
> >  
> >
> >>-----Original Message-----
> >>From: java-owner@gcc.gnu.org 
> >>[mailto:java-owner@gcc.gnu.org]On Behalf Of
> >>Michael Koch
> >>Sent: Tuesday, December 14, 2004 5:51 AM
> >>To: Bart Locanthi
> >>Cc: java@gcc.gnu.org
> >>Subject: Re: no stacktrace available
> >>
> >>
> >>Am Dienstag, 14. Dezember 2004 14:43 schrieb Bart Locanthi:
> >>    
> >>
> >>>oops, i spoke too soon. got a core dump that may again be related
> >>>to threading/gc. i vaguely remember the form of the error - an
> >>>infinite stack trace.
> >>>
> >>>...
> >>>#494 0x485f01b0 in GC_clear_stack_inner () from
> >>>/usr/pkg/gcc3/lib/libgcj.so.4
> >>>#495 0x485f01b0 in GC_clear_stack_inner () from
> >>>/usr/pkg/gcc3/lib/libgcj.so.4
> >>>#496 0x485f01b0 in GC_clear_stack_inner () from
> >>>/usr/pkg/gcc3/lib/libgcj.so.4
> >>>#497 0x485f01b0 in GC_clear_stack_inner () from
> >>>/usr/pkg/gcc3/lib/libgcj.so.4
> >>>#498 0x485f01b0 in GC_clear_stack_inner () from
> >>>/usr/pkg/gcc3/lib/libgcj.so.4
> >>>#499 0x485f01b0 in GC_clear_stack_inner () from
> >>>/usr/pkg/gcc3/lib/libgcj.so.4
> >>>#500 0x485f01b0 in GC_clear_stack_inner () from
> >>>/usr/pkg/gcc3/lib/libgcj.so.4
> >>>#501 0x485f01b0 in GC_clear_stack_inner () from
> >>>/usr/pkg/gcc3/lib/libgcj.so.4
> >>>#502 0x485f01b0 in GC_clear_stack_inner () from
> >>>/usr/pkg/gcc3/lib/libgcj.so.4
> >>>#503 0x485f01b0 in GC_clear_stack_inner () from
> >>>/usr/pkg/gcc3/lib/libgcj.so.4
> >>>#504 0x485f01b0 in GC_clear_stack_inner () from
> >>>/usr/pkg/gcc3/lib/libgcj.so.4
> >>>#505 0x485f01b0 in GC_clear_stack_inner () from
> >>>/usr/pkg/gcc3/lib/libgcj.so.4
> >>>      
> >>>
> >>For this I can only say: Try newest GCJ from CVS and see if 
> its still 
> >>not fixed.
> >>
> >>
> >>Michael
> >>-- 
> >>Homepage: http://www.worldforge.org/
> >>
> >>    
> >>
> 



More information about the Java mailing list