More information on mysterious garabage collection hang "introduced" in GCJ 3.3
Fri May 16 12:42:00 GMT 2003
I recently made a posting about my troubles with deadlock and crashes
when trying to switch to GCJ 3.3.
Some more pieces to the puzzle:
- As is indicated in my earlier posting, serial ports and
the garbage collector is somehow involved.
- I was using serialio.com's javax.comm. (The reason I started using
this serialio.com's, is that Suns javax.comm has Java Web Start issues).
- I switched back to Suns javax.comm. This requires a small trick I
picked up in Suns JWS forum:
// avoid dependency on the silly
// works for Java Web Start *and* GCJ.
String driverName = "com.sun.comm.Win32Driver";
javax.comm.CommDriver commDriver =
} catch (ClassNotFoundException e)
} catch (InstantiationException e)
} catch (IllegalAccessException e)
- I switch to compiling with GCJ 3.3
- The mysterious startup pagefault I reported earlier is gone.
My 3.2 compiled will crash once in a blue moon, even if I use
- The livelock/deadlock that I previously exprienced with my
GCJ 3.3 executable is gone
I believe these are two seperate problems, since the startup
pagefault happens regardless of serialport library used.
AFAIK, this fixes all the outstanding showstoppers I had with
GCJ 3.3 and I've cut a new release candiate of our app that is
going through QA as I write this.
>From my previous debug session, I *believe* that javax.comm from
serialio.com causes a pagefault in its finalize() method(from JNI?). The
GCJ 3.2 and GCJ 3.3 garbage collector somehow treats this
More information about the Java