Eclipse freeze (tracked down to rt.jar access)
Eclipse Version: Indigo Release, Build id: 20110615-0604
Scala Plugin: 2.0.0.beta11-2_09-201110031011
Scala compiler for Eclipse: 2.9.2.r25743
I've been experiencing periodic (~hourly) Eclipse freezes for about 10-20 seconds. I have done some tracking down and pinpointed the problem to a zip file access by the Scala JDT Weaving plugin. I am working on a Java project without any Scala association so this is unacceptable behaviour in my opinion. My first reaction is to uninstall the plugin, as it interferes with my day to day work when it shouldn't even be active.
Using ProcMon I've pinpointed that the access is to "rt.jar". As I run the JVM over a RAMdisk, targeted accesses to specific entries would be almost instantaneous. So, I don't know what business the plugin has with processing the entire Java run-time library on the main thread. My suggestions are to either move this on a background task, or process zip entries incrementally with some yielding/back off co-routine in place.
Hopefully this can be fixed, as the overall impression the Scala IDE had on me and my team is very positive.
PS: This report bears similarity to #1000233 but documents a more recent version and contains more details about the kind of access performed.
Thread stack trace dump:
"main" prio=6 tid=0x008d6c00 nid=0x4990 runnable [0x0012e000]
java.lang.Thread.State: RUNNABLE
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at org.eclipse.jdt.internal.core.JavaModelManager.getZipFile(JavaModelManager.java:2673)
at org.eclipse.jdt.internal.core.JarPackageFragmentRoot.getJar(JarPackageFragmentRoot.java:153)
at org.eclipse.jdt.internal.core.ClassFile.getBytes(ClassFile.java:316)
at scala.tools.eclipse.contribution.weaving.jdt.cfprovider.ClassFileProviderAspect.ajc$around$scala_tools_eclipse_contribution_weaving_jdt_cfprovider_ClassFileProviderAspect$1$9776bbb8(ClassFileProviderAspect.aj:149)
at org.eclipse.jdt.internal.core.JarPackageFragment.computeChildren(JarPackageFragment.java:73)
at org.eclipse.jdt.internal.core.JarPackageFragment.buildStructure(JarPackageFragment.java:54)
at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:258)
at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:518)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:255)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:241)
at org.eclipse.jdt.internal.core.JavaElement.getChildren(JavaElement.java:196)
at org.eclipse.jdt.internal.core.NameLookup.seekTypesInBinaryPackage(NameLookup.java:1020)
at org.eclipse.jdt.internal.core.NameLookup.seekTypes(NameLookup.java:986)
at org.eclipse.jdt.internal.core.NameLookup.findAllTypes(NameLookup.java:327)
at org.eclipse.jdt.internal.core.NameLookup.seekTypes(NameLookup.java:962)
at org.eclipse.jdt.internal.core.SearchableEnvironment.findTypes(SearchableEnvironment.java:641)
at org.eclipse.jdt.internal.core.SearchableEnvironment.findTypes(SearchableEnvironment.java:474)
at org.eclipse.jdt.internal.core.SearchableEnvironment.findTypes(SearchableEnvironment.java:315)
at org.eclipse.jdt.internal.codeassist.SelectionEngine.select(SelectionEngine.java:953)
at org.eclipse.jdt.internal.core.Openable.codeSelect(Openable.java:162)
at org.eclipse.jdt.internal.core.CompilationUnit.codeSelect(CompilationUnit.java:377)
at org.eclipse.jdt.internal.core.CompilationUnit.codeSelect_aroundBody0(CompilationUnit.java:371)
at org.eclipse.jdt.internal.core.CompilationUnit.codeSelect_aroundBody1$advice(CompilationUnit.java:312)
at org.eclipse.jdt.internal.core.CompilationUnit.codeSelect(CompilationUnit.java:1)
at org.eclipse.jdt.internal.ui.javaeditor.JavaElementHyperlinkDetector.detectHyperlinks(JavaElementHyperlinkDetector.java:84)
at org.eclipse.ui.texteditor.HyperlinkDetectorRegistry$HyperlinkDetectorDelegate.detectHyperlinks(HyperlinkDetectorRegistry.java:80)
at org.eclipse.jface.text.hyperlink.HyperlinkManager.findHyperlinks(HyperlinkManager.java:286)
- locked <0x13914028> (a [Lorg.eclipse.jface.text.hyperlink.IHyperlinkDetector;)
at org.eclipse.jface.text.hyperlink.HyperlinkManager.findHyperlinks(HyperlinkManager.java:258)
at org.eclipse.jface.text.hyperlink.HyperlinkManager.mouseMove(HyperlinkManager.java:462)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:211)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
"VM Thread" prio=10 tid=0x4f0d1400 nid=0x4994 runnable
"VM Periodic Task Thread" prio=10 tid=0x4f0fe800 nid=0x49b8 waiting on condition
JNI global references: 1613
Heap
def new generation total 235968K, used 207692K [0x06c30000, 0x16c30000, 0x16c30000)
eden space 209792K, 92% used [0x06c30000, 0x128dbe00, 0x13910000)
from space 26176K, 55% used [0x13910000, 0x147374c0, 0x152a0000)
to space 26176K, 0% used [0x152a0000, 0x152a0000, 0x16c30000)
tenured generation total 524288K, used 130939K [0x16c30000, 0x36c30000, 0x36c30000)
the space 524288K, 24% used [0x16c30000, 0x1ec0ec50, 0x1ec0ee00, 0x36c30000)
compacting perm gen total 393216K, used 60064K [0x36c30000, 0x4ec30000, 0x4ec30000)
the space 393216K, 15% used [0x36c30000, 0x3a6d8028, 0x3a6d8200, 0x4ec30000)
Scala Plugin: 2.0.0.beta11-2_09-201110031011
Scala compiler for Eclipse: 2.9.2.r25743
I've been experiencing periodic (~hourly) Eclipse freezes for about 10-20 seconds. I have done some tracking down and pinpointed the problem to a zip file access by the Scala JDT Weaving plugin. I am working on a Java project without any Scala association so this is unacceptable behaviour in my opinion. My first reaction is to uninstall the plugin, as it interferes with my day to day work when it shouldn't even be active.
Using ProcMon I've pinpointed that the access is to "rt.jar". As I run the JVM over a RAMdisk, targeted accesses to specific entries would be almost instantaneous. So, I don't know what business the plugin has with processing the entire Java run-time library on the main thread. My suggestions are to either move this on a background task, or process zip entries incrementally with some yielding/back off co-routine in place.
Hopefully this can be fixed, as the overall impression the Scala IDE had on me and my team is very positive.
PS: This report bears similarity to #1000233 but documents a more recent version and contains more details about the kind of access performed.
Thread stack trace dump:
"main" prio=6 tid=0x008d6c00 nid=0x4990 runnable [0x0012e000]
java.lang.Thread.State: RUNNABLE
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at org.eclipse.jdt.internal.core.JavaModelManager.getZipFile(JavaModelManager.java:2673)
at org.eclipse.jdt.internal.core.JarPackageFragmentRoot.getJar(JarPackageFragmentRoot.java:153)
at org.eclipse.jdt.internal.core.ClassFile.getBytes(ClassFile.java:316)
at scala.tools.eclipse.contribution.weaving.jdt.cfprovider.ClassFileProviderAspect.ajc$around$scala_tools_eclipse_contribution_weaving_jdt_cfprovider_ClassFileProviderAspect$1$9776bbb8(ClassFileProviderAspect.aj:149)
at org.eclipse.jdt.internal.core.JarPackageFragment.computeChildren(JarPackageFragment.java:73)
at org.eclipse.jdt.internal.core.JarPackageFragment.buildStructure(JarPackageFragment.java:54)
at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:258)
at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:518)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:255)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:241)
at org.eclipse.jdt.internal.core.JavaElement.getChildren(JavaElement.java:196)
at org.eclipse.jdt.internal.core.NameLookup.seekTypesInBinaryPackage(NameLookup.java:1020)
at org.eclipse.jdt.internal.core.NameLookup.seekTypes(NameLookup.java:986)
at org.eclipse.jdt.internal.core.NameLookup.findAllTypes(NameLookup.java:327)
at org.eclipse.jdt.internal.core.NameLookup.seekTypes(NameLookup.java:962)
at org.eclipse.jdt.internal.core.SearchableEnvironment.findTypes(SearchableEnvironment.java:641)
at org.eclipse.jdt.internal.core.SearchableEnvironment.findTypes(SearchableEnvironment.java:474)
at org.eclipse.jdt.internal.core.SearchableEnvironment.findTypes(SearchableEnvironment.java:315)
at org.eclipse.jdt.internal.codeassist.SelectionEngine.select(SelectionEngine.java:953)
at org.eclipse.jdt.internal.core.Openable.codeSelect(Openable.java:162)
at org.eclipse.jdt.internal.core.CompilationUnit.codeSelect(CompilationUnit.java:377)
at org.eclipse.jdt.internal.core.CompilationUnit.codeSelect_aroundBody0(CompilationUnit.java:371)
at org.eclipse.jdt.internal.core.CompilationUnit.codeSelect_aroundBody1$advice(CompilationUnit.java:312)
at org.eclipse.jdt.internal.core.CompilationUnit.codeSelect(CompilationUnit.java:1)
at org.eclipse.jdt.internal.ui.javaeditor.JavaElementHyperlinkDetector.detectHyperlinks(JavaElementHyperlinkDetector.java:84)
at org.eclipse.ui.texteditor.HyperlinkDetectorRegistry$HyperlinkDetectorDelegate.detectHyperlinks(HyperlinkDetectorRegistry.java:80)
at org.eclipse.jface.text.hyperlink.HyperlinkManager.findHyperlinks(HyperlinkManager.java:286)
- locked <0x13914028> (a [Lorg.eclipse.jface.text.hyperlink.IHyperlinkDetector;)
at org.eclipse.jface.text.hyperlink.HyperlinkManager.findHyperlinks(HyperlinkManager.java:258)
at org.eclipse.jface.text.hyperlink.HyperlinkManager.mouseMove(HyperlinkManager.java:462)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:211)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
"VM Thread" prio=10 tid=0x4f0d1400 nid=0x4994 runnable
"VM Periodic Task Thread" prio=10 tid=0x4f0fe800 nid=0x49b8 waiting on condition
JNI global references: 1613
Heap
def new generation total 235968K, used 207692K [0x06c30000, 0x16c30000, 0x16c30000)
eden space 209792K, 92% used [0x06c30000, 0x128dbe00, 0x13910000)
from space 26176K, 55% used [0x13910000, 0x147374c0, 0x152a0000)
to space 26176K, 0% used [0x152a0000, 0x152a0000, 0x16c30000)
tenured generation total 524288K, used 130939K [0x16c30000, 0x36c30000, 0x36c30000)
the space 524288K, 24% used [0x16c30000, 0x1ec0ec50, 0x1ec0ee00, 0x36c30000)
compacting perm gen total 393216K, used 60064K [0x36c30000, 0x4ec30000, 0x4ec30000)
the space 393216K, 15% used [0x36c30000, 0x3a6d8028, 0x3a6d8200, 0x4ec30000)
Leave a comment
on 2011-11-10 11:18 *
By nicholas22
Type set to Defect
Version changed from 2.0.0-RC1-29 to 2.0.0-beta11-29
on 2011-11-10 11:22 *
By nicholas22
Description changed from Eclipse Version: Indigo Rel... to Eclipse Version: Indigo Rel...
on 2011-11-10 11:23 *
By nicholas22
Description changed from Eclipse Version: Indigo Rel... to Eclipse Version: Indigo Rel...
on 2011-11-10 11:26 *
By nicholas22
Description changed from Eclipse Version: Indigo Rel... to Eclipse Version: Indigo Rel...
on 2011-11-10 11:26 *
By nicholas22
Description changed from Eclipse Version: Indigo Rel... to Eclipse Version: Indigo Rel...
on 2011-11-10 11:34 *
By nicholas22
Summary changed from Eclipse freeze (tracked down to rt.jar) to Eclipse freeze (tracked down to rt.jar access)
on 2011-11-10 11:35 *
By nicholas22
Description changed from Eclipse Version: Indigo Rel... to Eclipse Version: Indigo Rel...
on 2011-11-10 13:50 *
By nicholas22
Description changed from Eclipse Version: Indigo Rel... to Eclipse Version: Indigo Rel...
on 2011-11-10 13:53 *
By nicholas22
Description changed from Eclipse Version: Indigo Rel... to Eclipse Version: Indigo Rel...
(In revision:e35df9d23870f3a93686d812aafc2931ab44e04c) Don't read classfile bytes if the classfile is not part of a Scala project. This may cause large delays when the class files are on a network mounted file system.
Fixed #1000742, Fixed #1000233, Fixed #1000643.
Branch: issue/plugin-reading-jars-unnecessarily-1000742
Fixed #1000742, Fixed #1000233, Fixed #1000643.
Branch: issue/plugin-reading-jars-unnecessarily-1000742
on 2011-11-10 14:48 *
By nicholas22
Thanks very much, nothing better than reporting a fixed bug :)
Keep up the good work!
Keep up the good work!
on 2011-11-10 17:07 *
By Iulian Dragos
(In revision:e35df9d23870f3a93686d812aafc2931ab44e04c) Don't read classfile bytes if the classfile is not part of a Scala project. This may cause large delays when the class files are on a network mounted file system.
Fixed #1000742, Fixed #1000233, Fixed #1000643.
Branch: master
Fixed #1000742, Fixed #1000233, Fixed #1000643.
Branch: master
on 2011-11-10 17:09 *
By Iulian Dragos
(In revision:726dd67b1e9cc6e4a7d3808eb14360c041fc297a) Don't read classfile bytes if the classfile is not part of a Scala project. This may cause large delays when the class files are on a network mounted file system.
Fixed #1000742, Fixed #1000233, Fixed #1000643.
(cherry picked from commit e35df9d23870f3a93686d812aafc2931ab44e04c)
Branch: release/scala-ide-2.0.x
Fixed #1000742, Fixed #1000233, Fixed #1000643.
(cherry picked from commit e35df9d23870f3a93686d812aafc2931ab44e04c)
Branch: release/scala-ide-2.0.x
on 2011-11-13 10:44 *
By Iulian Dragos
(In revision:e35df9d23870f3a93686d812aafc2931ab44e04c) Don't read classfile bytes if the classfile is not part of a Scala project. This may cause large delays when the class files are on a network mounted file system.
Fixed #1000742, Fixed #1000233, Fixed #1000643.
Branch: platform/indigo-3.7
Fixed #1000742, Fixed #1000233, Fixed #1000643.
Branch: platform/indigo-3.7
on 2011-11-21 09:01 *
By Iulian Dragos
(In revision:fb5cd1d83edd9c5d619ccf00c968ae45b2658efd) Don't read classfile bytes if the classfile is not part of a Scala project. This may cause large delays when the class files are on a network mounted file system.
Fixed #1000742, Fixed #1000233, Fixed #1000643.
(cherry picked from commit e35df9d23870f3a93686d812aafc2931ab44e04c)
(cherry picked from commit 726dd67b1e9cc6e4a7d3808eb14360c041fc297a)
Branch: release/scala-ide-2.0.0
Fixed #1000742, Fixed #1000233, Fixed #1000643.
(cherry picked from commit e35df9d23870f3a93686d812aafc2931ab44e04c)
(cherry picked from commit 726dd67b1e9cc6e4a7d3808eb14360c041fc297a)
Branch: release/scala-ide-2.0.0