[fedora-java] gij OOM

Andrew Haley aph at redhat.com
Wed Apr 18 08:25:52 UTC 2007


Andrew Overholt writes:
 > This shouldn't be expected, right?
 > 
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > Exception in thread "OutputReader" GC Warning: Out of Memory!  Returning
 > NIL!
 > java.lang.OutOfMemoryError
 > *** Got java.lang.OutOfMemoryError while trying to print stack trace.
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > Error while logging event loop exception:
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > Exception in thread "Worker-1" GC Warning: Out of Memory!  Returning
 > NIL!
 > java.lang.OutOfMemoryError
 > GC Warning: Out of Memory!  Returning NIL!
 > *** Catastrophic failure while handling uncaught exception.
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > Exception in thread "ErrorReader" GC Warning: Out of Memory!  Returning
 > NIL!
 > java.lang.OutOfMemoryError
 > GC Warning: Out of Memory!  Returning NIL!
 > *** Catastrophic failure while handling uncaught exception.
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > *** Catastrophic failure while handling uncaught exception.
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > GC Warning: Out of Memory!  Returning NIL!
 > *** Catastrophic failure while handling uncaught exception.
 > GC Warning: Out of Memory!  Returning NIL!
 > 
 > Anything I can do to help track this down?  I was just running Eclipse
 > (installed via RPMs ... eclipse-{sdk,cdt-sdk,mylar-bugzilla,changelog})
 > and trying to build cacao as per [1].  I didn't notice when the actual
 > messages were printed to the console, but it was sometime during the
 > build.
 > 
 > Note that to get classpath and cacao to build I had to install
 > libXtst-devel and libtool-ltdl-devel on top of what I already had on my
 > system (YMMV).  I'm on rawhide i386.

Here's what I'd do.  Add this code to gij.cc:

   {
      FILE *poo = fopen("/tmp/log", "a");

      for (int i = 0; i < argc; i++)
	fprintf (poo, "\"%s\" ", argv[i]);
      fprintf (poo, "\n");
      fclose (poo);
    }

You might want to print getpid() here too.  Find the OOM printer in
the gc, and add getpid() to that too.
   
Find the *exact* list of args that was passed to the gij process that
caused the OOM.  Paste them to this list.

Andrew.

-- 
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903




More information about the java-devel mailing list