I have been encountering random failures when running ECJ 3.4. ECJ 3.3 works fine and I did also encounter random failures with Sun's VM so I initially filed a bug at eclipse.org. However, further tests have indicated that there are two different issues here, one affecting GCJ and one affecting Sun, hence I am filing this bug report now.
The failures only occur when ECJ is run with multiple threads. They do not occur when -Djdt.compiler.useSingleThread=true is specified and they also do not occur on single core machines. I have only seen the failures on the x86_64 platform but it could possibly affect others too. The frequency of the failures varies but they usually occur around once every 10 tries. The error messages also vary but they usually look like this. java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:160) at java.lang.Thread.run(libgcj.so.90) java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.util.Util.getFileCharContent(Util.java:226) at org.eclipse.jdt.internal.compiler.batch.CompilationUnit.getContents(CompilationUnit.java:71) at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:160) at java.lang.Thread.run(libgcj.so.90) I have reproduced this on my usual Gentoo Linux system but also managed to reproduce it on a fresh installation of Ubuntu Intrepid Ibex Alpha 3 under KVM. So far, I have only tried GCC 4.3.1. For more details, see the original bug report at... https://bugs.eclipse.org/bugs/show_bug.cgi?id=241225 -- Summary: Random failures running ECJ 3.4 (threading problem?) Product: gcc Version: 4.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: chewi at aura-online dot co dot uk GCC build triplet: x86_64-pc-linux-gnu GCC host triplet: x86_64-pc-linux-gnu GCC target triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37051