11 Replies Latest reply on Oct 13, 2006 4:20 PM by mazz

    JBossIDE causing Eclipse to pause and do alot of disk IO/eat

    mazz Master

      I've been noticing lately that once during an Eclipse session (that is, this happens one time after starting Eclipse), that Eclipse hangs for several minutes and I hear the drive cranking along with CPU usage going up.

      I ran Eclipse with java.exe so I can hit CONTROL-BREAK in the console when this happens. The last time it happened, I found this thread as the probable culprit. Once the "hang" went away and Eclipse woke up and acted normally, this stack went away (its a thread in a thread pool, so the thread itself didn't go away, but the thread went idle at the same time I noticed Eclipse "woke" up).

      Can someone talk about what JBoss IDE is doing here in this thread so I can figure out what I can do to stop this?

      "Worker-10" prio=6 tid=0x3a3365b0 nid=0x520 runnable [0x3b9de000..0x3b9dfae8]
       at java.util.zip.ZipFile.open(Native Method)
       at java.util.zip.ZipFile.<init>(ZipFile.java:203)
       at java.util.jar.JarFile.<init>(JarFile.java:132)
       at java.util.jar.JarFile.<init>(JarFile.java:97)
       at org.jboss.ide.eclipse.as.core.module.factory.ArchiveModuleFactory.supports(ArchiveModuleFactory.java:65)
       at org.jboss.ide.eclipse.as.core.module.factory.ArchiveModuleFactory.acceptAddition(ArchiveModuleFactory.java:33)
       at org.jboss.ide.eclipse.as.core.module.factory.JBossModuleFactory$1.visit(JBossModuleFactory.java:88)
       at org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:105)
       at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:57)
       at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:81)
       at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
       at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
       at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
       at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
       at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
       at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
       at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
       at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
       at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
       at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
       at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:126)
       at org.eclipse.core.internal.resources.Resource.accept(Resource.java:67)
       at org.eclipse.core.internal.resources.Resource.accept(Resource.java:103)
       at org.eclipse.core.internal.resources.Resource.accept(Resource.java:87)
       at org.jboss.ide.eclipse.as.core.module.factory.JBossModuleFactory.cacheModules(JBossModuleFactory.java:86)
       at org.jboss.ide.eclipse.as.core.module.factory.JBossModuleFactory.getModules(JBossModuleFactory.java:66)
       at org.eclipse.wst.server.core.internal.ModuleFactory.getModules(ModuleFactory.java:133)
       at org.eclipse.wst.server.core.ServerUtil.getModules(ServerUtil.java:247)
       at org.eclipse.wst.server.core.ServerUtil.getModule(ServerUtil.java:47)
       at org.eclipse.wst.server.core.internal.ResourceManager.publishHandleProjectChange(ResourceManager.java:916)
       at org.eclipse.wst.server.core.internal.ResourceManager$1.visit(ResourceManager.java:110)
       at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:67)
       at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:76)
       at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:48)
       at org.eclipse.wst.server.core.internal.ResourceManager$ServerResourceChangeListener.resourceChanged(ResourceManager.java:104)
       at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:280)
       at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
       at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:274)
       at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:148)
       at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:256)
       at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:958)
       at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:45)
       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
      
      
      



        • 1. Re: JBossIDE causing Eclipse to pause and do alot of disk IO
          Rob Stryker Master

          Max has experienced the same problem. He's told me about it, but I didn't take any action because I wasn't sure what would be a better way to implement what I've been doing using the current API. I'll spend more time investigating it today.

          Unfortunately, there's no way to turn this off right now.

          What's going on:
          The server tools framework is calling all module factories and getting a list of the modules that the factory has created. The factory needs to have them all ready at once, because the API for a ModuleFactoryDelegate only has one relevent API element: getModules();

          There's no getModule(String id), or any other API, which could let me create the modules upon request or demand. Instead the API seems to dictate that I find everything I'd consider a module right away.

          So what this thread specifically is doing is searching the workspace for any and all Jar files (war, ear, jar, etc) and adding them as potentially deployable modules so that on request of getModules(), they're all ready.

          So the thread is just searching for jar files in your workspace. In a very big workspace, this slows everything down.

          I could take a long hard look into who and what call getModules() and see if there's any way for me to anticipate it, or at least anticipate which they're hoping to find so I can turn just those specific jar files into "modules", but I really don't think the API is designed for that, and I don't think it will work very well.

          The relevent plugin is the AS bridge: org.jboss.ide.eclipse.as.core

          • 2. Re: JBossIDE causing Eclipse to pause and do alot of disk IO
            mazz Master

            OK. That's probably it. I have a very large workspace with SVN (so, wonder if this searching includes the .svn directories too?).

            I don't use the deployment features of JBossIDE - I just use it to start and stop a JBossAS instance. If, in the short term, you can figure out a way to code up a "disable" mechanism that people can elect to use, that would be good (for me anyway).

            • 3. Re: JBossIDE causing Eclipse to pause and do alot of disk IO
              Rob Stryker Master

              Well because this has been mentioned by two people now I'll consider it relatively high priority, and it will be fixed, one way or another ;)

              • 4. Re: JBossIDE causing Eclipse to pause and do alot of disk IO
                mazz Master

                I didn't see it mentioned in the release notifications, so I assume the answer is no, but figured I'd ask anyway. Is this problem somehow fixed or worked around in the beta release? I've disabled my JBoss IDE due to this problem and would like to re-enable it, so I await with bated breath :)

                • 5. Re: JBossIDE causing Eclipse to pause and do alot of disk IO
                  Max Rydahl Andersen Master

                  I saw a commit message that hinted it should be fixed.

                  You are more than welcome to try and update and reenable jbosside to see if the problem has been removed.

                  • 6. Re: JBossIDE causing Eclipse to pause and do alot of disk IO
                    mazz Master

                    I believe I'm still seeing this, albeit not at startup.

                    I'm still getting very long hang times in Eclipse and when I look at the thread dumps, I am seeing:

                    "Worker-17" prio=6 tid=0x3a205b20 nid=0x5d0 runnable [0x3b43f000..0x3b43fa68]
                     at java.util.zip.ZipFile.open(Native Method)
                     at java.util.zip.ZipFile.<init>(ZipFile.java:203)
                     at java.util.jar.JarFile.<init>(JarFile.java:132)
                     at java.util.jar.JarFile.<init>(JarFile.java:97)
                     at org.jboss.ide.eclipse.as.core.module.factory.ArchiveModuleFactory.sup
                    ports(ArchiveModuleFactory.java:65)
                     at org.jboss.ide.eclipse.as.core.module.factory.ArchiveModuleFactory.acc
                    eptAddition(ArchiveModuleFactory.java:33)
                     at org.jboss.ide.eclipse.as.core.module.factory.JBossModuleFactory$1.vis
                    it(JBossModuleFactory.java:88)


                    So, I'm assuming this thread is the cause of my issue. This issue is devestating to the usability of Eclipse. Can you guys add a setting within JBoss IDE somewhere that I can turn off this scanning of the files? Even if it means turning off some feature - I'm willing to lose a piece of capability within JBoss IDE if I can workaround this issue.

                    Note that I'm using JBoss IDE 2.0.0.beta1

                    • 7. Re: JBossIDE causing Eclipse to pause and do alot of disk IO
                      Rob Stryker Master

                      Mazz: Can you show a bit longer of a stack trace? Thanks.

                      • 8. Re: JBossIDE causing Eclipse to pause and do alot of disk IO
                        mazz Master

                        "Worker-17" prio=6 tid=0x3a205b20 nid=0x5d0 runnable [0x3b43f000..0x3b43fa68]
                        at java.util.zip.ZipFile.open(Native Method)
                        at java.util.zip.ZipFile.(ZipFile.java:203)
                        at java.util.jar.JarFile.(JarFile.java:132)
                        at java.util.jar.JarFile.(JarFile.java:97)
                        at org.jboss.ide.eclipse.as.core.module.factory.ArchiveModuleFactory.supports(ArchiveModuleFactory.java:65)
                        at org.jboss.ide.eclipse.as.core.module.factory.ArchiveModuleFactory.acceptAddition(ArchiveModuleFactory.java:33)
                        at org.jboss.ide.eclipse.as.core.module.factory.JBossModuleFactory$1.visit(JBossModuleFactory.java:88)
                        at org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:105)
                        at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:57)
                        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:81)
                        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
                        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
                        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
                        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
                        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
                        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
                        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
                        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
                        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
                        at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:126)
                        at org.eclipse.core.internal.resources.Resource.accept(Resource.java:67)
                        at org.eclipse.core.internal.resources.Resource.accept(Resource.java:103)
                        at org.eclipse.core.internal.resources.Resource.accept(Resource.java:87)
                        at org.jboss.ide.eclipse.as.core.module.factory.JBossModuleFactory.cacheModules(JBossModuleFactory.java:86)
                        at org.jboss.ide.eclipse.as.core.module.factory.JBossModuleFactory.contains(JBossModuleFactory.java:203)
                        at org.jboss.ide.eclipse.as.core.module.factory.JBossModuleFactory.resourceEvent(JBossModuleFactory.java:187)
                        at org.jboss.ide.eclipse.as.core.model.ModuleModel.resourceChanged(ModuleModel.java:313)
                        at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:280)
                        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
                        at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:274)
                        at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:148)
                        at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:256)
                        at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:958)
                        at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:45)
                        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

                        • 9. Re: JBossIDE causing Eclipse to pause and do alot of disk IO
                          Rob Stryker Master

                          Compared the trace to head... the line numbers don't match at all nor does the trace even line up. I guess the fix didnt make the beta1 release and will be in beta2.

                          • 10. Re: JBossIDE causing Eclipse to pause and do alot of disk IO
                            mazz Master

                            OK, I installed JBoss IDE 2.0.0.beta2 and this just happened (its the first time I ran with 2.0.0.beta2 and the first time I saw this behavior with this stack dump - I'm assuming they are related). The IDE again hung for about a 30secs to a minute. Control-Break showed all the threads in a normal state but this one. NOTE: There is NO jboss specific classes in this stack dump. But for sure this just happened as soon as I installed JBoss IDE.

                            "main" prio=6 tid=0x00034d88 nid=0xba0 runnable [0x0007e000..0x0007fc44]
                             at java.util.zip.ZipFile.getNextEntry(Native Method)
                             at java.util.zip.ZipFile.access$700(ZipFile.java:35)
                             at java.util.zip.ZipFile$3.nextElement(ZipFile.java:421)
                             - locked <0x037a2590> (a java.util.zip.ZipFile)
                             at java.util.zip.ZipFile$3.nextElement(ZipFile.java:415)
                             at org.eclipse.wst.sse.core.internal.util.JarUtilities.getEntryNames(JarUtilities.java:142)
                             at org.eclipse.wst.sse.core.internal.util.JarUtilities.getEntryNames(JarUtilities.java:132)
                             at org.eclipse.wst.sse.core.internal.util.JarUtilities.getEntryNames(JarUtilities.java:128)
                             at org.eclipse.jst.jsp.core.taglib.ProjectDescription.updateJAR(ProjectDescription.java:1661)
                             at org.eclipse.jst.jsp.core.taglib.ProjectDescription$Indexer.visit(ProjectDescription.java:133)
                             at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:57)
                             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:81)
                             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
                             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
                             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
                             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
                             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
                             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
                             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
                             at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
                             at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:126)
                             at org.eclipse.core.internal.resources.Resource.accept(Resource.java:67)
                             at org.eclipse.jst.jsp.core.taglib.ProjectDescription.index(ProjectDescription.java:1052)
                             at org.eclipse.jst.jsp.core.taglib.ProjectDescription.restoreReferences(ProjectDescription.java:1337)
                             at org.eclipse.jst.jsp.core.taglib.ProjectDescription.<init>(ProjectDescription.java:502)
                             at org.eclipse.jst.jsp.core.taglib.TaglibIndex.createDescription(TaglibIndex.java:627)
                             at org.eclipse.jst.jsp.core.taglib.TaglibIndex$ClasspathChangeListener.handleClasspathChange(TaglibIndex.java:150)
                             at org.eclipse.jst.jsp.core.taglib.TaglibIndex$ClasspathChangeListener.elementChanged(TaglibIndex.java:100)
                             at org.eclipse.jst.jsp.core.taglib.TaglibIndex$ClasspathChangeListener.elementChanged(TaglibIndex.java:87)
                             at org.eclipse.jst.jsp.core.taglib.TaglibIndex$ClasspathChangeListener.elementChanged(TaglibIndex.java:72)
                             at org.eclipse.jdt.internal.core.DeltaProcessor$3.run(DeltaProcessor.java:1458)
                             at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
                             at org.eclipse.jdt.internal.core.DeltaProcessor.notifyListeners(DeltaProcessor.java:1448)
                             at org.eclipse.jdt.internal.core.DeltaProcessor.firePostChangeDelta(DeltaProcessor.java:1296)
                             at org.eclipse.jdt.internal.core.DeltaProcessor.fire(DeltaProcessor.java:1275)
                             at org.eclipse.jdt.internal.core.DeltaProcessor.resourceChanged(DeltaProcessor.java:1833)
                             at org.eclipse.jdt.internal.core.DeltaProcessingState.resourceChanged(DeltaProcessingState.java:444)
                             at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:280)
                             at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
                             at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:274)
                             at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:148)
                             at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:256)
                             at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:958)
                             at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1746)
                             at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:113)
                             - locked <0x10356538> (a org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation)
                             at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:73)
                             at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:63)
                             at org.eclipse.ui.editors.text.TextFileDocumentProvider.executeOperation(TextFileDocumentProvider.java:460)
                             at org.eclipse.ui.editors.text.TextFileDocumentProvider.saveDocument(TextFileDocumentProvider.java:744)
                             at org.eclipse.ui.texteditor.AbstractTextEditor.performSave(AbstractTextEditor.java:3796)
                             at org.eclipse.ui.texteditor.AbstractTextEditor.doSave(AbstractTextEditor.java:3585)
                             at org.eclipse.ant.internal.ui.editor.AntEditor.doSave(AntEditor.java:1176)
                             at org.eclipse.ui.internal.SaveableHelper$1.run(SaveableHelper.java:131)
                             at org.eclipse.ui.internal.SaveableHelper$4.run(SaveableHelper.java:252)
                             at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
                             at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
                             at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:763)
                             at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
                             at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:760)
                             at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2283)
                             at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:258)
                             at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:136)
                             at org.eclipse.ui.internal.EditorManager.savePart(EditorManager.java:1386)
                             at org.eclipse.ui.internal.WorkbenchPage.savePart(WorkbenchPage.java:2995)
                             at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3008)
                             at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:67)
                             at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
                             at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539)
                             at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
                             at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:441)
                             at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
                             at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
                             at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
                             at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
                             at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
                             at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
                             at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
                             at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
                             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:400)
                             at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
                             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:585)
                             at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
                             at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
                             at org.eclipse.core.launcher.Main.run(Main.java:977)
                             at org.eclipse.core.launcher.Main.main(Main.java:952)
                            


                            • 11. Re: JBossIDE causing Eclipse to pause and do alot of disk IO
                              mazz Master

                              One other thing - the last log message I saw come out of Eclipse before the hang was this:

                              [org.jboss.ide.eclipse.as.core.module.factory.ArchiveModuleFactory] Caching factory