GCJ 3.4.3 and 3.3 classloading problem

David Daney ddaney@caviumnetworks.com
Wed Sep 9 15:19:00 GMT 2009

Tom Tromey wrote:
>>>>>> "Craig" == Craig Vanderborgh <craigvanderborgh@gmail.com> writes:
> Craig> Please try not to dismiss this inquiry because we're using an
> Craig> "older version".
> Ok.
> Craig> The application exhibiting the classloading trouble is a port of the
> Craig> Jetty application server to arm-wince-pe-gcj.  Jetty and most of the
> Craig> infrastructure it uses (e.g. Spring, Velocity) are gcj-compiled (to
> Craig> .o) and statically linked, but the webapp application code consists
> Craig> .class files that are classloaded by gcj from a .war file by Jetty.
> Nice.
> Craig> The faults usually occur somewhere in string processing,
> Craig> typically in java::lang::String::getChars.
> I don't recall seeing any problems like this.  Of course, since these
> releases were so long ago, I wouldn't really expect to remember...
> Did you search bugzilla for closed bugs along these lines?
> That might yield something.
> The String thing is interesting.  We've had various bugs involving
> String.intern and also java.lang.ref that might cause inappropriate
> collection.
> I don't have a theory that covers why changing the executable helps.
> Craig> We are in a position where I have to fix this at any cost.  If I have
> Craig> to climb Mount Everest, I will do that.  Any ideas on where to start
> Craig> or what we could look at would be greatly appreciated.
> This is a tough sort of problem.  I hesitate to suggest any approaches
> without knowing what you've tried.  (Also my libgcj debugging expertise
> is not completely fresh...)

Getting a test case that can run under GDB is invaluable.  Also the 
files dumped out from gnu.gcj.util.GCInfo may be of use.  It basically 
gives you a 'core file' of all live objects.  You can use it to manually 
follow all the references in the system.  We added it to the trunk after 
the versions you are using, but it was originally developed on 3.3 and 
3.4 and shouldn't be difficult to backport again.

David Daney

More information about the Java mailing list