Bug 135713 - [launcher] Problems running with gcj
Summary: [launcher] Problems running with gcj
Status: CLOSED DUPLICATE of bug 191254
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: vm
Depends on:
Blocks:
 
Reported: 2006-04-08 10:48 EDT by Mike Wilson CLA
Modified: 2009-09-08 13:55 EDT (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Wilson CLA 2006-04-08 10:48:43 EDT
The most recent time I re-started M6 on my existing workspace, I got the walkback shown below. I'm not sure if this is a problem with startup view creation or a PDE or JDT issue. Sending to UI for initial consideration...

java.lang.IllegalMonitorStateException: current thread not owner
   at java.lang.Object.notifyAll (libgcj.so.7)
   at java.lang.Class.initializeClass (libgcj.so.7)
   at org.eclipse.pde.internal.core.WorkspaceModelManager.getWorkspaceModel (WorkspaceModelManager.java:187)
   at org.eclipse.pde.internal.core.WorkspaceModelManager.getWorkspacePluginModel (WorkspaceModelManager.java:206)
   at org.eclipse.pde.internal.core.PluginModelManager.findEntry (PluginModelManager.java:170)
   at org.eclipse.pde.internal.core.RequiredPluginsInitializer.initialize (RequiredPluginsInitializer.java:37)
   at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer (JavaModelManager.java:1897)
   at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer (JavaModelManager.java:1261)
   at org.eclipse.jdt.core.JavaCore.getClasspathContainer (JavaCore.java:1472)
   at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath (JavaProject.java:2160)
   at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath (JavaProject.java:2064)
   at org.eclipse.jdt.core.JavaCore.setClasspathContainer (JavaCore.java:4178)
   at org.eclipse.jdt.internal.launching.JREContainerInitializer.initialize (JREContainerInitializer.java:59)
   at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer (JavaModelManager.java:1897)
   at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer (JavaModelManager.java:1261)
   at org.eclipse.jdt.core.JavaCore.getClasspathContainer (JavaCore.java:1472)
   at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath (JavaProject.java:2160)
   at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath (JavaProject.java:2064)
   at org.eclipse.jdt.internal.core.JavaModelManager.determineIfOnClasspath (JavaModelManager.java:805)
   at org.eclipse.jdt.internal.core.JavaModelManager.create (JavaModelManager.java:697)
   at org.eclipse.jdt.internal.core.JavaModelManager.create (JavaModelManager.java:626)
   at org.eclipse.jdt.core.JavaCore.create (JavaCore.java:1385)
   at org.eclipse.jdt.internal.ui.ResourceAdapterFactory.getAdapter (ResourceAdapterFactory.java:44)
   at org.eclipse.core.internal.runtime.AdapterFactoryProxy.getAdapter (AdapterFactoryProxy.java:63)
   at org.eclipse.core.internal.runtime.AdapterManager.getAdapter (AdapterManager.java:253)
   at org.eclipse.core.runtime.PlatformObject.getAdapter (PlatformObject.java:65)
   at org.eclipse.jdt.internal.ui.filters.NamePatternFilter.select (NamePatternFilter.java:62)
   at org.eclipse.jdt.internal.ui.viewsupport.ProblemTreeViewer.isFiltered (ProblemTreeViewer.java:183)
   at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$PackageExplorerProblemTreeViewer.isFiltered (PackageExplorerPart.java:298)
   at org.eclipse.jdt.internal.ui.viewsupport.ProblemTreeViewer.isExpandable (ProblemTreeViewer.java:170)
   at org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable (AbstractTreeViewer.java:1851)
   at org.eclipse.jface.viewers.AbstractTreeViewer.updatePlus (AbstractTreeViewer.java:2422)
   at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem (AbstractTreeViewer.java:739)
   at org.eclipse.jface.viewers.AbstractTreeViewer$1.run (AbstractTreeViewer.java:714)
   at org.eclipse.swt.custom.BusyIndicator.showWhile (BusyIndicator.java:69)
   at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren (AbstractTreeViewer.java:721)
   at org.eclipse.jface.viewers.TreeViewer.createChildren (TreeViewer.java:870)
   at org.eclipse.jface.viewers.AbstractTreeViewer$5.run (AbstractTreeViewer.java:1240)
   at org.eclipse.jface.viewers.StructuredViewer.preservingSelection (StructuredViewer.java:1294)
   at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$PackageExplorerProblemTreeViewer.preservingSelection (PackageExplorerPart.java:399)
   at org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged (AbstractTreeViewer.java:1246)
   at org.eclipse.jface.viewers.ContentViewer.setInput (ContentViewer.java:251)
   at org.eclipse.jface.viewers.StructuredViewer.setInput (StructuredViewer.java:1518)
   at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart.createPartControl (PackageExplorerPart.java:634)
   at org.eclipse.ui.internal.ViewReference.createPartHelper (ViewReference.java:334)
   at org.eclipse.ui.internal.ViewReference.createPart (ViewReference.java:197)
   at org.eclipse.ui.internal.WorkbenchPartReference.getPart (WorkbenchPartReference.java:566)
   at org.eclipse.ui.internal.WorkbenchPage$ActivationList.setActive (WorkbenchPage.java:3808)
   at org.eclipse.ui.internal.WorkbenchPage.restoreState (WorkbenchPage.java:2842)
   at org.eclipse.ui.internal.WorkbenchWindow.restoreState (WorkbenchWindow.java:1932)
   at org.eclipse.ui.internal.Workbench.doRestoreState (Workbench.java:2857)
   at org.eclipse.ui.internal.Workbench.access$14 (Workbench.java:2805)
   at org.eclipse.ui.internal.Workbench$19.run (Workbench.java:1682)
   at org.eclipse.ui.internal.Workbench.runStartupWithProgress (Workbench.java:1422)
   at org.eclipse.ui.internal.Workbench.restoreState (Workbench.java:1679)
   at org.eclipse.ui.internal.Workbench.access$12 (Workbench.java:1650)
   at org.eclipse.ui.internal.Workbench$17.run (Workbench.java:1529)
   at org.eclipse.core.runtime.SafeRunner.run (SafeRunner.java:37)
   at org.eclipse.ui.internal.Workbench.restoreState (Workbench.java:1550)
   at org.eclipse.ui.internal.WorkbenchConfigurer.restoreState (WorkbenchConfigurer.java:183)
   at org.eclipse.ui.application.WorkbenchAdvisor.openWindows (WorkbenchAdvisor.java:702)
   at org.eclipse.ui.internal.Workbench.init (Workbench.java:1085)
   at org.eclipse.ui.internal.Workbench.runUI (Workbench.java:1847)
   at org.eclipse.ui.internal.Workbench.createAndRunWorkbench (Workbench.java:419)
   at org.eclipse.ui.PlatformUI.createAndRunWorkbench (PlatformUI.java:143)
   at org.eclipse.ui.internal.ide.IDEApplication.run (IDEApplication.java:95)
   at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:78)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication (EclipseAppLauncher.java:92)
   at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start (EclipseAppLauncher.java:68)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:376)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:169)
   at java.lang.reflect.Method.invoke (libgcj.so.7)
   at org.eclipse.core.launcher.Main.invokeFramework (Main.java:336)
   at org.eclipse.core.launcher.Main.basicRun (Main.java:281)
   at org.eclipse.core.launcher.Main.run (Main.java:978)
   at org.eclipse.core.launcher.Main.main (Main.java:952)
Comment 1 Billy Biggs CLA 2006-04-08 13:40:40 EDT
The logs show you are using gcj as your JVM.  Can you also try
with a commercial JVM?
Comment 2 Eric Moffatt CLA 2006-04-10 10:04:20 EDT
Thanks Billy! I'm going to send this to teh PDE group for the first look...
Comment 3 Wassim Melhem CLA 2006-04-10 10:13:51 EDT
JohnA, smells like a VM thing?
Comment 4 Mike Wilson CLA 2006-04-10 10:19:36 EDT
Billy, your comment is perfectly correct, but there is a bit of a new wrinkle here: I didn't do *anything* to get a VM. I simply downloaded Eclipse and double clicked on the executable. Because this now actually works in modern linux distros, it feels like we must either make sure we run on GCJ, or detect it explicitely and say "Eclipse won't run on this VM".

Essentially, everyone who runs Eclipse on a clean linux install will hit this, since there's no indication that it will not work.

(btw, I was running FC5)
Comment 5 John Arthorne CLA 2006-04-10 10:40:14 EDT
This definitely looks like a bug in the VM or class libraries - the monitor it is failing to aquire is in java.lang.Class.  Andrew, do you know of a bug like this in gcj/classpath? I agree with McQ that if users on major distros are going to run into this we should consider a workaround or at least a prominent readme entry.
Comment 6 Andrew Overholt CLA 2006-04-10 11:03:46 EDT
(In reply to comment #5)
> This definitely looks like a bug in the VM or class libraries - the monitor it
> is failing to aquire is in java.lang.Class.  Andrew, do you know of a bug like
> this in gcj/classpath? I agree with McQ that if users on major distros are
> going to run into this we should consider a workaround or at least a prominent
> readme entry.

We'll try to see what the problem is.
Comment 7 Pascal Rapicault CLA 2006-04-10 11:44:34 EDT
The startup.jar already has the ability to check a vm version. We might be able to add a check against a vendor or something like that. 
Comment 8 Andrew Overholt CLA 2006-04-10 12:13:51 EDT
(In reply to comment #5)
> This definitely looks like a bug in the VM or class libraries - the monitor it
> is failing to aquire is in java.lang.Class.  Andrew, do you know of a bug like
> this in gcj/classpath? I agree with McQ that if users on major distros are
> going to run into this we should consider a workaround or at least a prominent
> readme entry.

I downloaded M6, uncompressed and ran it.  I used an existing workspace (~/workspace) and it worked fine.  I had some views set as Fast View and the fast view bar looked odd but other than that things went okay.
Comment 9 Tom Tromey CLA 2006-04-10 12:51:02 EDT
Hmm, haven't seen this bug before.  The code in libgcj is
definitely ok... there is no unsynchronized notifyAll call
in initializeClass.  So, maybe we're seeing a compiler bug
or maybe we're seeing a bug in the mutex code.

Also, could you install the debuginfo packages and try again?
That should let us see line numbers in the stack trace.

Will this happen with a clean workspace?  I'm wondering whether
there is a simple way for me to reproduce it on my FC5 box...
Comment 10 Mike Wilson CLA 2006-04-10 14:17:09 EDT
First off, the problem may be timing related. I started Eclipse, connected to two repositories, loaded some projects, exitted, and restarted, and got this error. However, I did not see it the following two times I started Eclipse. (This is not my development machine; I don't run on it regularly.)

It *might* be a compiler bug, but this is less likely since we haven't seen it on Sun or IBM VMs. (Not impossible, but less likely). We did see problems that felt similar to this in the early betas of the IBM VM, which were eventually traced down to JIT bugs.

I'll try to get steps to replicate it, but I won't have a chance to do this until at least next weekend.
Comment 11 Tom Tromey CLA 2006-04-10 14:19:56 EDT
Sorry for the confusion... when I said it might be a compiler
bug, I meant a bug in g++ when compiling libgcj's
Class::initializeClass method.
Comment 12 DJ Houghton CLA 2007-03-27 17:41:20 EDT
Old summary: Unable to create view at startup.

Mike, have you seen this problem in the 3.3 builds?
Comment 13 Mike Wilson CLA 2007-03-28 13:48:22 EDT
I have not seen it, but unfortunately I have been running exclusively on Mac lately, so can't tell you whether or not it still happens.
Comment 14 Andrew Niefer CLA 2009-09-08 13:55:10 EDT
Starting on 3.4 there is a warning when running on gcj, which can be turned off by setting the system property "eclipse.gcj=true"

*** This bug has been marked as a duplicate of bug 191254 ***