Bug 548689 - Eclipse crashing the JVM during installation
Summary: Eclipse crashing the JVM during installation
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.13   Edit
Hardware: PC Windows 10
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-26 18:49 EDT by Dusan Boskovic CLA
Modified: 2019-09-12 21:01 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dusan Boskovic CLA 2019-06-26 18:49:08 EDT
Installing Eclipse with the OpenJDK Java 8 with J9 causes the JVM to raise an ASSERTION ERROR. This is a result of the native code method Java_org_eclipse_oomph_jreinfo_JREInfo_getAllWin() in Eclipse that is calling the JNI method newStringUTF() as it passes the parameter (const char *bytes)

It looks like Eclipse code is  re-using the same address for multiple threads.  So the content of the memory is corrupted


Location of Assertion Failure:

16:44:15.691837316 *0x000000000364ba00 j9mm.353            Entry      >createJavaLangString entry data ??  ???  stringFlags 0x4
16:44:15.691839416  0x000000000364ba00 j9mm.703            Entry      >Trc_MM_createJavaLangString_XXX1 entry length=16 data=0x1671e330 stringFlags 0x4
16:44:15.691839816  0x000000000364ba00 j9mm.107            Assert     * ** ASSERTION FAILED ** at StringTable.cpp:1005: ((false && (0 < consumed)))



The stack:

11 00000000`1671e430 00000000`630414c1 j9vm29!newStringUTF(
            struct JNIEnv_ * env = 0x00000000`00000000, 
            char * bytes = 0x00000000`0292d300 "0???")+0xca [s:\pmrs\ts002397317\21sdk\jre\bin\compressedrefs\vm\jnimisc.cpp @ 525] 
12 00000000`1671e470 00007fff`64502433 jreinfo!Java_org_eclipse_oomph_jreinfo_JREInfo_getAllWin+0x71
13 00000000`1671e4c0 00007fff`6450200c j9vm29!ffi_call_win64(void)+0x77 [S:\pmrs\TS002397317\21sdk\jre\bin\compressedrefs\libffi\win64.asm @ 988] 
14 00000000`1671e510 00007fff`64405450 j9vm29!ffi_call(
            struct ffi_cif * cif = 0x00007fff`81419620, 
            <function> * fn = 0x00000000`1671e8a8, 
            void * rvalue = 0x00000000`000004b0, 
            void ** avalue = 0x00000000`1671e890)+0x9c [s:\pmrs\ts002397317\21sdk\jre\bin\compressedrefs\libffi\x86\ffi.c @ 412] 
*** WARNING: Unable to verify checksum for jvm.dll
15 00000000`1671e570 00007fff`81419620 j9vm29!VM_BytecodeInterpreter::run+0x141c0



Bogus pointer:

> xx 0292d300
0x000000000292d300 :  000000001671E330 0000000000000000 000000000292D520 900003002FAE7263 [ 0.q............. .......cr./....]
0x000000000292d320 :  0000000055F72180 0000000000000001 0000000000000000 900004002FA87261 [ .!.U....................ar./....]
> xx 000000001671E330
0x000000001671e330 :  0000000000000000 0000000000000010 000000000364BA00 0000000000D60DC0 [ ..................d.............]
0x000000001671e350 :  0000000000000000 00000000FF277D48 000000001671E330 00007FFF640F3718 [ ........H}'.....0.q......7.d....]



JNI method:

NewStringUTF
jstring NewStringUTF(JNIEnv *env, const char *bytes);

Constructs a new java.lang.String object from an array of characters in modified UTF-8 encoding.
Comment 1 Dusan Boskovic CLA 2019-06-27 09:02:04 EDT
These are the steps to reproduce the problem:

1. Downloaded *eclipse-inst-win64.exe* from https://www.eclipse.org/downloads/download.php?file=/oomph/epp/2019-06/R/eclipse-inst-win64.exe using the *Download from: United States - OSU Open Source Lab (http)* mirror.

2. Run *eclipse-inst-win64.exe* as Administrator.  Splash screen is shown and then installer fails with a Java crash.
Comment 2 Dusan Boskovic CLA 2019-06-27 09:34:37 EDT
In addition to those steps, the JAVA_HOME and the PATH environment variables need to be set to the location of the OpenJDK Java 8 with J9 executable.