Bug 50345 - IBM jre hangs Eclipse M6
Summary: IBM jre hangs Eclipse M6
Status: VERIFIED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords: vm
Depends on:
Blocks:
 
Reported: 2004-01-21 13:36 EST by Tanya Wolff CLA
Modified: 2004-03-02 15:30 EST (History)
1 user (show)

See Also:


Attachments
vm dump from java console (438.97 KB, text/plain)
2004-01-27 18:11 EST, Tanya Wolff CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tanya Wolff CLA 2004-01-21 13:36:31 EST
Not sure if this is core, but I will contact the IBM jre folks too.

I'm using Eclipse M6, stable build 1218, and IBM J2RE 1.4.1 windows 32 build 
cn1411-20030930 (JIT enabled: jitc)).

When I'm switching perspectives it Eclipse hangs and I have to kill the IDE 
with the task manager. This does not happen using the Sun jre, nor Eclipse M5. 

The simple steps to reproduce are:
1. Start Eclipse, 
2. Open java perspective,
3. switch to resource and back to java perspective several times (between 4 and 
7 times).
Eclipse hangs. 

Reproducible on 3 W2K machines. Switching, opening, closing perspectives all do 
the trick too. It seems to be the lower number of switches if there are 
projects in the workspace.
Comment 1 John Arthorne CLA 2004-01-26 11:18:56 EST
Can you attach a VM dump from when it hangs?  Ctrl+Break from the java console
should generate a dump file (unless the VM itself is hosed).
Comment 2 Tanya Wolff CLA 2004-01-26 14:03:23 EST
I couldn't get it to generate a dump file in Java Console (started from control 
panel->Java Plug-in). Neither are there any entries in the .metadata/.log file.
Comment 3 John Arthorne CLA 2004-01-27 17:23:16 EST
By console, I meant the window that pops up when you launch java.exe.  You may
be using javaw.exe, which does not open a window. In this case, restart Eclipse
like so:

eclipse -data .... -vm c:\jre\bin\java.exe
Comment 4 Tanya Wolff CLA 2004-01-27 18:11:30 EST
Created attachment 7600 [details]
vm dump from java console

Thanks, here's the coredump.
Comment 5 John Arthorne CLA 2004-01-29 17:13:48 EST
I can reproduce consistently in 3.0 M6 (win2K) with the same steps:

1) Open brand new workspace
2) Open Java perspective
3) Toggle perspectives rapidly using Ctrl+F8

Deadlock is inside a native method:

 at org.eclipse.swt.internal.win32.OS.SendMessageW(Native Method)
 at org.eclipse.swt.internal.win32.OS.SendMessage(OS.java(Compiled Code))
 at org.eclipse.swt.widgets.CoolBar.setLocked(CoolBar.java(Compiled Code))

I cannot reproduce at all on I20040128 (1459).  Moving to SWT for further
investigation.
Comment 6 Grant Gayed CLA 2004-01-29 17:35:39 EST
FH, coolbar?  Please take a look.
Comment 7 Felipe Heidrich CLA 2004-01-29 17:58:07 EST
Steve, take a look at this problem, I don't see how SWT could cause this hang.
John, I couldn't reproduce the problem on my machine (WinXP). Nevertheless, 
you said it is working in the last integration build ?
Tanya, can you download last Eclipse integration build and verify that this 
problem doesn't happen on it ?
Comment 8 John Arthorne CLA 2004-01-30 10:22:20 EST
I could reproduce very easily in M6 (only tried Win2k), but was unable to in
latest integration builds. My concern is that perhaps changes in the workbench
are causing the bug to no longer be manifested in current builds but an
underlying problem may still exist. Note that it only occurs with J9SC (IBM) VM.
I am using the most recently available VM drop:

build 1.4.1, J2RE 1.4.1 IBM Windows 32 build cn1411-20031212 (JIT enabled: jitc)
Comment 9 Tanya Wolff CLA 2004-01-30 11:59:36 EST
Sorry, it still happened in Integration build I20040129-win32.
Comment 10 Steve Northover CLA 2004-01-30 12:44:40 EST
Can we confirm that it happens only with the IBM JRE?  Can someone test it 
against the JDK?  Thanks.
Comment 11 John Arthorne CLA 2004-01-30 13:21:26 EST
I cannot reproduce with a Sun JDK 1.4.2
Comment 12 Steve Northover CLA 2004-01-30 13:29:36 EST
I'm not sure then how this is an SWT problem.  The API in question should be 
fine.  There are 2 reasons it could hang as far as I can tell:

1) An inifinite loop in the operating system
2) Deadlock

For 1), the difference could be in the JNI (somehow a different value is 
getting through on IBM JRE vs JDK).

For 2) the IBM JRE might have a ui-thread somewhere and be playing games with 
low level Windows event queue functions.  (I doubt this is the case).


Try printing out the arguments from both JRE's.  Next, hack the C code for the 
particular SendMessage() to make sure the values get to the other side.

That's all I can think of.

Comment 13 Mathieu Lapensée CLA 2004-02-12 15:34:11 EST
Tried I20040205 with IBM JRE 1.4.2 

The bug is not reproducible.
Comment 14 Steve Northover CLA 2004-02-12 16:09:07 EST
I'm not sure what to do with this one.  John, since you can make it happen, do 
you want to own it.  It seems like a VM problem which really has nothing to do 
with SWT or Eclipse.  Your thoughts?
Comment 15 John Arthorne CLA 2004-02-12 16:28:04 EST
I agree it looks like a VM bug.  I will contact the VM team and see if they want
to follow up.
Comment 16 John Arthorne CLA 2004-02-12 16:34:02 EST
Mathieu, please be more specific with VM version info. Can you tell us the
result of invoking "java -version" with the 1.4.2 VM you mentioned?
Comment 17 Mathieu Lapensée CLA 2004-02-16 11:18:29 EST
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)
Classic VM (build 1.4.2, J2RE 1.4.2 IBM Windows 32 build cndev-20040128 (JIT ena
bled: jitc))
Comment 18 John Arthorne CLA 2004-02-16 15:50:56 EST
Not reproducible with J9SC.  Only reproducible with JIT disabled.
Comment 19 John Arthorne CLA 2004-02-23 10:10:28 EST
I have contacted the VM vendor and they are working on a fix.  They have
recommended as a workaround to set the following VM option:

JITC_COMPILEOPT=NREORDERCODE

I.e.,

eclipse -vm d:\jre\bin\java -vmargs -DJITC_COMPILEOPT=NREORDERCODE
Comment 20 John Arthorne CLA 2004-03-02 11:59:07 EST
This is caused by a VM defect.  The defect was reported to the VM vendor (IBM).
 They have produced a fix, and I have verified their fix. Closing as invalid
since no action was required in the Eclipse code base.
Comment 21 Tanya Wolff CLA 2004-03-02 15:30:55 EST
Verified.
Thanks John, I can no longer reproduce it with the new jitc.dll from IBM VM, in 
Eclipse M6 or M7.