While writing a test case for a Java-Gnome memory leak, I found that my test case hangs every once in a while. Attached is the test case with all the unrelated code removed.
The commented out lines ([1][2] and [3]) just change the frequencey of the hang. It doenst always hang so I just do this: while true; do ./TestGCJGC ; done untill it hangs gcj -v: Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.1 20070105 (Red Hat 4.1.1-51) -- Summary: Memory collection deadlock Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: swagiaal at redhat dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30886