JDK-5060628 : Segmentation violation running Eclipse 3.0RC1
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 1.4.2,5.0
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86,itanium
  • Submitted: 2004-06-09
  • Updated: 2005-11-02
  • Resolved: 2005-11-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other Other JDK 6
1.4.2_11Fixed 5.0u7Resolved 6 b59Fixed
Description
Name: jl125535			Date: 06/09/2004


FULL PRODUCT VERSION :
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b51)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0-beta2-b51, mixed mode)


FULL OS VERSION :
Linux sauron 2.6.5-gentoo-r1 #1 Sat Apr 24 12:00:33 EDT 2004 x86_64 4  GNU/Linux


EXTRA RELEVANT SYSTEM CONFIGURATION :
Eclipse 3.0 RC1 download from http://www.ibiblio.org/pub/packages/development/eclipse/eclipse/downloads/dr
ops/S-3.0RC1-200405290105/download.php?dropFile=eclipse-SDK-3.0RC1-linux-gtk
-amd64.zip

Portage 2.0.50-r7 (default-amd64-2004.0, gcc-3.3.3, glibc-2.3.2-r10, 2.6.5-gentoo-r1)
=================================================================
System uname: 2.6.5-gentoo-r1 x86_64 4
Gentoo Base System version 1.4.15
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-O2"
CHOST="x86_64-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://128.213.5.34/gentoo/ http://gentoo.mirrored.ca/ http://gentoo.mirrors.pair.com/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/opt/portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib alsa amd64 apm arts artswrappersuid avi berkdb bonobo cdr crypt emacs encode esd foomaticdb gdbm gif gnome gpm gtk gtk2 gtkhtml imlib jpeg kde libg++ libwww mikmod motif mozilla mpeg multilib ncurses nls nogcj oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang spell ssl tcltk tcpd truetype xml2 xmms xosd xv zlib"



A DESCRIPTION OF THE PROBLEM :
Attached error occurs everytime I startup Eclipse.  If I run Eclipse with options as follows: eclipse -vmargs -Djava.compiler=  there is no error.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Start eclipse

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Eclipse should run
ACTUAL -
(see error message below)

ERROR MESSAGES/STACK TRACES THAT OCCUR :
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0x0000002a99eb0c10, pid=6106, tid=278546
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0-beta2-b51 mixed mode)
# Problematic frame:
# J  org.eclipse.jdt.internal.compiler.parser.Scanner.jumpOverMethodBody()V
#

---------------  T H R E A D  ---------------

Current thread (0x00000000402eb310):  JavaThread "org.eclipse.jdt.internal.ui.text.JavaReconciler" daemon [_thread_in_Java, id=6129]

siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x000000d684dcca18

Registers:
RAX=0x0000000000008083, RBX=0x0000002aea65ddb0, RCX=0x0000002aea65dd58, RDX=0x0000002adb455340
RSP=0x0000002aea65ddf0, RBP=0x0000000000000000, RSI=0x000000000000807d, RDI=0x0000000000000000
R8 =0x0000000000000028, R9 =0x00000000000080a1, R10=0x0000000000000001, R11=0x0000000000000000
R12=0x000000000000de13, R13=0x0000002adb3f539c, R14=0x0000002adb455340, R15=0x00000000402eb310
RIP=0x0000002a99eb0c10, EFL=0x0000000000010297, CSGSFS=0x0000000000001b03, ERR=0x0000000000000007
  TRAPNO=0x000000000000000e

  Top of Stack: (sp=0x0000002aea65ddf0)
0x0000002aea65ddf0:   000004e200000001 0000002adb3f53bc
0x0000002aea65de00:   0000002adb3f5318 0000002adb3f5318
0x0000002aea65de10:   0000002adb3f5328 0000002adb3f539c
0x0000002aea65de20:   00000000402eb310 0000002adb47fd60
0x0000002aea65de30:   0000002adb47fd78 0000002a0000807e
0x0000002aea65de40:   0000002ae16e7ff0 0000002a99e9fe1c
0x0000002aea65de50:   0000002ae18dae08 0000002ae226fca0
0x0000002aea65de60:   0000002ae16e8070 0000002aea65df40
0x0000002aea65de70:   0000002ae16f9770 0000002ae2251d78
0x0000002aea65de80:   0000000000000000 0000000000000000
0x0000002aea65de90:   0000000000000000 0000002adb3f1cc0
0x0000002aea65dea0:   0000002aea65dea0 0000002ae16f4a41
0x0000002aea65deb0:   0000002aea65df00 0000002ae18dae08
0x0000002aea65dec0:   0000002ae2271450 0000002a99d7d75e
0x0000002aea65ded0:   0000002aea65df40 0000002aea65df40
0x0000002aea65dee0:   0000002a99d21dfe 0000002aea65def0
0x0000002aea65def0:   0000002a99d21d1a 0000002adb3f5318
0x0000002aea65df00:   0000002adb3f1cc0 0000002aea65df08
0x0000002aea65df10:   0000002ae16f9770 0000002aea65df78
0x0000002aea65df20:   0000002ae18dae08 0000002ae2251d78
0x0000002aea65df30:   0000002ae16f98a8 0000002aea65df78
0x0000002aea65df40:   0000002aea65dfb8 0000002a99d21dfe
0x0000002aea65df50:   0000000000000000 00000000000000ff
0x0000002aea65df60:   00000000000002f5 0000000000000007
0x0000002aea65df70:   0000000000000001 0000002adb3f1cc0
0x0000002aea65df80:   0000002aea65df80 0000002ae16fa96f
0x0000002aea65df90:   0000002aea65e008 0000002ae18dae08
0x0000002aea65dfa0:   0000000000000000 0000002ae16faa28
0x0000002aea65dfb0:   0000002aea65dfe8 0000002aea65e048
0x0000002aea65dfc0:   0000002a99d21ce1 0000000000000000
0x0000002aea65dfd0:   0000000000000000 0000002adb4170a8
0x0000002aea65dfe0:   0000000000000000 00000000ffffffff

Instructions: (pc=0x0000002a99eb0c10)
0x0000002a99eb0c00:   83 e9 13 00 00 45 0f be 92 a9 00 00 00 4d 63 db
0x0000002a99eb0c10:   41 f7 5c 9e 18 45 85 d2 0f 84 4e 03 00 00 4c 8b

Stack: [0x0000002aea560000,0x0000002aea660000),  sp=0x0000002aea65ddf0,  free space=1015k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
J  org.eclipse.jdt.internal.compiler.parser.Scanner.jumpOverMethodBody()V

[error occurred during error reporting, step 120, id 0xb]


---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
=>0x00000000402eb310 JavaThread "org.eclipse.jdt.internal.ui.text.JavaReconciler" daemon
 [_thread_in_Java, id=6129]
  0x0000000041777cc0 JavaThread "Worker-0" [_thread_blocked, id=6126]
  0x0000000041754830 JavaThread "Java indexing" daemon [_thread_blocked, id=6125]
  0x000000004038f1e0 JavaThread "Reference Cleaner - 2" [_thread_blocked, id=6124]
  0x0000000040391580 JavaThread "Reference Cleaner - 1" [_thread_blocked, id=6123]
  0x0000000040511900 JavaThread "Start Level Event Dispatcher" daemon [_thread_blocked, id=6120]
  0x0000000040509d30 JavaThread "Framework Event Dispatcher" daemon [_thread_blocked, id=6119]
  0x00000000402bb580 JavaThread "process reaper" daemon [_thread_in_native, id=6117]
  0x00000000401c9b20 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=6115]
  0x00000000401c7f70 JavaThread "CompilerThread1" daemon [_thread_blocked, id=6114]
  0x00000000401c6a80 JavaThread "CompilerThread0" daemon [_thread_blocked, id=6113]
  0x00000000401c5400 JavaThread "AdapterThread" daemon [_thread_blocked, id=6112]
  0x00000000401c3e50 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=6111]
  0x00000000401b0a00 JavaThread "Finalizer" daemon [_thread_blocked, id=6110]
  0x00000000401b0190 JavaThread "Reference Handler" daemon [_thread_blocked, id=6109]
  0x0000000040115ac0 JavaThread "main" [_thread_in_native, id=6106]

Other Threads:
  0x00000000401a9ea0 VMThread [id=6108]
  0x00000000401cb6f0 WatcherThread [id=6116]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
 def new generation   total 12288K, used 9097K [0x0000002adad20000, 0x0000002adba70000,
0x0000002adc920000)
  eden space 10944K,  70% used [0x0000002adad20000, 0x0000002adb4b24f0, 0x0000002adb7d0000)
  from space 1344K,  99% used [0x0000002adb920000, 0x0000002adba6fff8, 0x0000002adba70000)
  to   space 1344K,   0% used [0x0000002adb7d0000, 0x0000002adb7d0000, 0x0000002adb920000)
 tenured generation   total 27220K, used 18370K [0x0000002adc920000, 0x0000002ade3b5000,
 0x0000002ae0120000)
   the space 27220K,  67% used [0x0000002adc920000, 0x0000002addb10988, 0x0000002addb10a00, 0x0000002ade3b5000)
 compacting perm gen  total 34368K, used 34118K [0x0000002ae0120000, 0x0000002ae22b0000,
 0x0000002ae5320000)
   the space 34368K,  99% used [0x0000002ae0120000, 0x0000002ae2271818, 0x0000002ae2271a00, 0x0000002ae22b0000)
No shared spaces configured.
[rest of stack moved to Internal Comments]

REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
Temporary workaround is to disable the JIT compiler by passing the -Djava.compiler= option to Eclipse
(Incident Review ID: 276325) 
======================================================================

###@###.### 2005-06-23 18:27:32 GMT
The crash also occurs on various flavors of linux (such as SuSE, Fedora and redhat).

Comments
EVALUATION This bug has been fixed in Mustang Build 59(b59), each week the Mustang builds are posted to the link below. http://download.java.net/jdk6/binaries/
04-11-2005

SUGGESTED FIX 1c1 < // "@(#)amd64.ad 1.44 05/10/26 11:03:17 JVM" --- > // "@(#)amd64.ad 1.43 05/09/28 07:41:30 JVM" 7057c7057 < ins_encode(REX_mem(dst), OpcP, RM_opc_mem(secondary, dst)); --- > ins_encode(REX_reg(dst), OpcP, RM_opc_mem(secondary, dst)); 7079c7079 < ins_encode(REX_mem_wide(dst), OpcP, RM_opc_mem(secondary, dst)); --- > ins_encode(REX_reg_wide(dst), OpcP, RM_opc_mem(secondary, dst));
26-10-2005

EVALUATION While I'm working on this bug, there is a better workaround then just reverting to the interpreter. Create the following file in your Eclipse directory: .hotspot_compiler With the contents of: exclude org/eclipse/jdt/internal/compiler/parser/Scanner optimizedCurrentTokenSource3 exclude org/eclipse/jdt/internal/core/util/CommentRecorderScanner recordComment Since its a dot file, it'll be hidden from ls, etc so remember to remove it when I do get this fixed :) Performance should be much better than the interpreter.
19-10-2005

EVALUATION Asked the customer to try B55 from http://java.sun.com/j2se/1.5.0/snapshots/ Still had the same failure ###@###.### 2004-06-11 Sent the customer a fastdebug build and the failure went away. Seems like something's been fixed. Waiting for B56 to show up before closing ###@###.### 2004-06-15 I ran with the following configs on RedHat AS4 (2.6.9 Kernel) with no crashes Eclipse 3.1M6 JDK1.6-b30 Eclipse 3.1M6 JDK1.5 Eclipse 3.0.2 JDK1.6-b30 Eclipse 3.0.2 JDK1.5 Since we don't have Gentoo installed here, and its not a supported platform for Java or Eclipse, I think its ok to close this bug as will not fix. ###@###.### 2005-04-06 17:14:12 GMT
06-04-2005