[Ubuntu Maverick] Eclipse Helios SR2 crash while navigating linux kernel source

Monday, April 18, 2011
0 意見
For work purpose, I've installed CDT with newest eclipse-jee helios SR2, but the eclipse always crashed(killed by OS) when it was doing C/C++ indexing. By investigating this, I found there are error dumps resides at the installation directory of eclipse, filename looks like hs_err_pidXXXX.log, where XXXX was the pid killed by OS.

The beginning of the file would be something like the following:

#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fc77d932c8c, pid=17060, tid=140494693254912
#
# JRE version: 6.0_24-b07
# Java VM: Java HotSpot(TM) 64-Bit Server VM (19.1-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x5d5c8c]

Well, it seems like an buffer overrun bug of JVM, and I think I don't have time to dig in XD.

But, I just switched my VM from sun-java5 to sun-java6 yesterday, and before that I can
use eclipse to trace kernel source without any problem. So, I'm gonna give it a try by changing the VM used by eclipse back to sun-java5.

Here's the steps:

Add the red part in $ECLIPSE_HOME/eclipse.ini

--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
/usr/lib/jvm/java-1.5.0-sun/bin/java

-vmargs
-Dosgi.requiredJavaVersion=1.5

And finally, this solved the crash problem.
My eclipse just works like a charm now.