| Summary: | memory leak? | ||
|---|---|---|---|
| Product: | [WebTools] Web Tools | Reporter: | cheng <chengchengji> |
| Component: | Web Standard Tools | Assignee: | Jeffrey Liu <jeffliu> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | critical | ||
| Priority: | P3 | CC: | deboer, jeffliu, pavery, thatnitind |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
I just saw Cheng's posting on the newgroup. It contains very useful information about what's going on. Cheng, I think the memory leak here is severe enough that the severity should be raised to critical. Can you do that? Thanks. If you only edit JSP files,it takes much longer time to see out of memory error,but I did see it!! To test this,I edited a project only with about 30jsp files,30 small classes and spring,hibernate for about 2 hours, and I saw out of memory error. If you start/stop tomcat,it's fast to find out of memory error! I only edit JSP files,and I opened the "progress" view,and I found that it took long time to build the workspace after I saved a JSP file.And there were many exceptions in the .log file of eclipse: !MESSAGE Problems occurred while trying to save the state of the workbench. !SUBENTRY 1 org.eclipse.core.resources 2 566 2005-05-16 14:31:44.757 !MESSAGE Problems occurred during save. !STACK 0 org.eclipse.wst.common.internal.emfworkbench.edit.ClientAccessRegistryException This exception was generated to indicate an invalid usage of reference counts. Please examine the stack trace. Client Access Exception of type DANGLING_REFERENCE org.eclipse.wst.common.internal.emfworkbench.edit.ClientAccessRegistryException This exception was generated to indicate an invalid usage of reference counts. Please examine the stack trace. Client Access Exception of type DANGLING_REFERENCE at org.eclipse.wst.common.internal.emfworkbench.edit.ClientAccessRegistry.complain (ClientAccessRegistry.java:87) at org.eclipse.wst.common.internal.emfworkbench.edit.ClientAccessRegistry.complain (ClientAccessRegistry.java:82) at org.eclipse.wst.common.internal.emfworkbench.edit.ClientAccessRegistry.access (ClientAccessRegistry.java:43) at org.eclipse.wst.common.internal.emfworkbench.integration.EditModel.access (EditModel.java:919) at org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchContext.getEditModelFo rRead(EMFWorkbenchContext.java:124) at org.eclipse.wst.common.internal.emfworkbench.integration.EditModelNature.getEdi tModelForRead(EditModelNature.java:49) at org.eclipse.wst.common.internal.emfworkbench.integration.EditModelNature.getEdi tModelForRead(EditModelNature.java:39) at org.eclipse.wst.common.componentcore.ModuleCoreNature.getModuleStructuralModelF orRead(ModuleCoreNature.java:231) at org.eclipse.wst.common.componentcore.internal.StructureEdit.<init> (StructureEdit.java:340) at org.eclipse.wst.common.componentcore.internal.StructureEdit.getStructureEditFor Read(StructureEdit.java:112) at org.eclipse.wst.common.componentcore.internal.resources.VirtualResource.getProj ectRelativePath(VirtualResource.java:109) at org.eclipse.wst.common.componentcore.internal.resources.VirtualFolder.getUnderl yingFolder(VirtualFolder.java:106) at org.eclipse.wst.common.componentcore.internal.resources.VirtualFolder.getUnderl yingFolders(VirtualFolder.java:110) at org.eclipse.jst.common.jdt.internal.classpath.AbstractFlexibleProjectContainer. getClasspathEntries(AbstractFlexibleProjectContainer.java:129) at org.eclipse.jst.j2ee.internal.web.classpath.WebAppContainer.getClasspathEntries (WebAppContainer.java:47) at org.eclipse.jdt.internal.core.JavaModelManager.saving (JavaModelManager.java:1789) at org.eclipse.core.internal.resources.SaveManager.executeLifecycle (SaveManager.java:314) at org.eclipse.core.internal.resources.SaveManager$1.run(SaveManager.java:146) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:1021) at org.eclipse.core.runtime.Platform.run(Platform.java:757) at org.eclipse.core.internal.resources.SaveManager.broadcastLifecycle (SaveManager.java:149) at org.eclipse.core.internal.resources.SaveManager.save(SaveManager.java:940) at org.eclipse.core.internal.resources.Workspace.save(Workspace.java:1748) at org.eclipse.ui.internal.ide.IDEWorkbenchAdvisor$2.run (IDEWorkbenchAdvisor.java:280) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:113) !! org.eclipse.wst.common.internal.emfworkbench.edit.Snapshot: IWAE0016E Locking Insurance Stack Trace at org.eclipse.wst.common.internal.emfworkbench.edit.ClientAccessRegistry.access (ClientAccessRegistry.java:35) at org.eclipse.wst.common.internal.emfworkbench.integration.EditModel.access (EditModel.java:919) at org.eclipse.wst.common.internal.emfworkbench.EMFWorkbenchContext.getEditModelFo rRead(EMFWorkbenchContext.java:124) at org.eclipse.wst.common.internal.emfworkbench.integration.EditModelNature.getEdi tModelForRead(EditModelNature.java:49) at org.eclipse.wst.common.internal.emfworkbench.integration.EditModelNature.getEdi tModelForRead(EditModelNature.java:39) at org.eclipse.wst.common.componentcore.ModuleCoreNature.getModuleStructuralModelF orRead(ModuleCoreNature.java:231) at org.eclipse.wst.common.componentcore.internal.StructureEdit.<init> (StructureEdit.java:340) at org.eclipse.wst.common.componentcore.internal.StructureEdit.getStructureEditFor Read(StructureEdit.java:112) at org.eclipse.wst.common.componentcore.internal.resources.VirtualResource.getProj ectRelativePath(VirtualResource.java:109) at org.eclipse.wst.common.componentcore.internal.resources.VirtualFile.getUnderlyi ngFile(VirtualFile.java:90) at org.eclipse.wst.common.componentcore.internal.resources.VirtualFile.getUnderlyi ngResource(VirtualFile.java:82) at org.eclipse.jst.common.jdt.internal.classpath.AbstractFlexibleProjectContainer. getClasspathEntries(AbstractFlexibleProjectContainer.java:116) at org.eclipse.jst.j2ee.internal.web.classpath.WebAppContainer.getClasspathEntries (WebAppContainer.java:47) at org.eclipse.jdt.internal.core.JavaModelManager.saving (JavaModelManager.java:1789) at org.eclipse.core.internal.resources.SaveManager.executeLifecycle (SaveManager.java:314) at org.eclipse.core.internal.resources.SaveManager$1.run(SaveManager.java:146) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:1021) at org.eclipse.core.runtime.Platform.run(Platform.java:757) at org.eclipse.core.internal.resources.SaveManager.broadcastLifecycle (SaveManager.java:149) at org.eclipse.core.internal.resources.SaveManager.save(SaveManager.java:940) at org.eclipse.core.internal.resources.DelayedSnapshotJob.run (DelayedSnapshotJob.java:44) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:67) And just now,I worked with wtp1.0m4 and I started/stopped tomcat several times,and eclipse crashed! there are the following exception in the .log file: !SUBENTRY 1 org.eclipse.debug.core 4 120 2005-05-18 16:11:51.296 !MESSAGE Unable to access archive E:\MyWork\intokr2\.metadata\.plugins\org.eclipse.wst.server.core\tmp0 \work\Catalina\localhost\webframe !STACK 0 java.util.zip.ZipException: ¾Ü¾ø·ÃÎÊ¡£ 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.debug.internal.core.sourcelookup.SourceLookupUtils.getZipFile (SourceLookupUtils.java:67) at org.eclipse.debug.core.sourcelookup.containers.ExternalArchiveSourceContainer.g etArchive(ExternalArchiveSourceContainer.java:193) at org.eclipse.debug.core.sourcelookup.containers.ExternalArchiveSourceContainer.f indSourceElements(ExternalArchiveSourceContainer.java:79) at org.eclipse.debug.core.sourcelookup.containers.CompositeSourceContainer.findSou rceElements(CompositeSourceContainer.java:78) at org.eclipse.debug.core.sourcelookup.containers.CompositeSourceContainer.findSou rceElements(CompositeSourceContainer.java:45) at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupParticipant.findSourceE lements(AbstractSourceLookupParticipant.java:60) at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector$SourceLookupQu ery.run(AbstractSourceLookupDirector.java:129) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:1021) at org.eclipse.core.runtime.Platform.run(Platform.java:757) at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector.doSourceLookup (AbstractSourceLookupDirector.java:467) at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector.getSourceEleme nt(AbstractSourceLookupDirector.java:717) at org.eclipse.jdt.internal.debug.ui.actions.OpenTypeAction.findSourceElement (OpenTypeAction.java:190) at org.eclipse.jdt.internal.debug.ui.console.JavaStackTraceHyperlink.getSourceElem ent(JavaStackTraceHyperlink.java:125) at org.eclipse.jdt.internal.debug.ui.console.JavaStackTraceHyperlink.linkActivated (JavaStackTraceHyperlink.java:75) at org.eclipse.ui.console.TextConsoleViewer.mouseUp(TextConsoleViewer.java:575) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:136) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2894) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2527) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1570) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1534) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:306) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:228) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:156) 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.core.launcher.Main.invokeFramework(Main.java:315) at org.eclipse.core.launcher.Main.basicRun(Main.java:268) at org.eclipse.core.launcher.Main.run(Main.java:942) at org.eclipse.core.launcher.Main.main(Main.java:926) !ENTRY org.eclipse.debug.core 4 120 2005-05-18 16:11:51.336 !MESSAGE Error logged from Debug Core: !STACK 1 org.eclipse.core.runtime.CoreException[120]: java.util.zip.ZipException: ¾Ü¾ø·ÃÎÊ¡£ 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.debug.internal.core.sourcelookup.SourceLookupUtils.getZipFile (SourceLookupUtils.java:67) at org.eclipse.debug.core.sourcelookup.containers.ExternalArchiveSourceContainer.g etArchive(ExternalArchiveSourceContainer.java:193) at org.eclipse.debug.core.sourcelookup.containers.ExternalArchiveSourceContainer.f indSourceElements(ExternalArchiveSourceContainer.java:79) at org.eclipse.debug.core.sourcelookup.containers.CompositeSourceContainer.findSou rceElements(CompositeSourceContainer.java:78) at org.eclipse.debug.core.sourcelookup.containers.CompositeSourceContainer.findSou rceElements(CompositeSourceContainer.java:45) at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupParticipant.findSourceE lements(AbstractSourceLookupParticipant.java:60) at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector$SourceLookupQu ery.run(AbstractSourceLookupDirector.java:129) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:1021) at org.eclipse.core.runtime.Platform.run(Platform.java:757) at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector.doSourceLookup (AbstractSourceLookupDirector.java:467) at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector.getSourceEleme nt(AbstractSourceLookupDirector.java:717) at org.eclipse.jdt.internal.debug.ui.actions.OpenTypeAction.findSourceElement (OpenTypeAction.java:190) at org.eclipse.jdt.internal.debug.ui.console.JavaStackTraceHyperlink.getSourceElem ent(JavaStackTraceHyperlink.java:125) at org.eclipse.jdt.internal.debug.ui.console.JavaStackTraceHyperlink.linkActivated (JavaStackTraceHyperlink.java:75) at org.eclipse.ui.console.TextConsoleViewer.mouseUp(TextConsoleViewer.java:575) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:136) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:842) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2894) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2527) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1570) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1534) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:306) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:228) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:156) 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.core.launcher.Main.invokeFramework(Main.java:315) at org.eclipse.core.launcher.Main.basicRun(Main.java:268) at org.eclipse.core.launcher.Main.run(Main.java:942) at org.eclipse.core.launcher.Main.main(Main.java:926) I noticed that if I use the open type function several times,it eated much memory and cpu! I opened the sources of org.apache.velocity.tools.view.servlet.VelocityViewServlet, org.apache.velocity.tools.struts.TilesTool and org.apache.struts.action.RequestProcessor and eclipse is obviously slowed down.And every time I changed from a class to another, it took 99% cpu for >1 seconds. After reading the source code about several minutes, eclipse crashed! But in 1.0m3,it's ok. Hope these help! The starting/stopping tomcat several times is probably this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=96208 But you said that "only" editing JSP files you still see OOM error? Or is it only when you are debugging JSPs? In the progress view when it's taking a long time to build workspace, does it indicate which jobs are taking a long time? (also is the "show sleeping and system task preference checked in the progress view toolbar?) I'm not sure which "open type" function you're talking about. Are you referring to F3 "open on" from the JSP editor, if you select a Java element then press f3? or something else? I'll try to recreate this in my own workspace (w/ M4 target) to track further. Hi Phil, bug 96208 suggests it is a generic server bug. Specifically, it is the AntRunner that's leaking memory. However, Cheng is using Tomcat, which I believe does not use the generic server framework underneath the cover. In another word, it doesn't use the AntRunner. By cc-ing Tim, can you confirm this? Tim, are you aware of any memory leak with starting/stopping Tomcat? Is it possible that some Tomcat process is left behind? I just wanted to isolate if there are 2 different memory leaks here or just one. Hi Jeffrey, I can confirm that bug 96208 is only when using JBoss or JONaS. It will never be an issue when using Tomcat, Geronimo, or other servers. There is only one other memory leak I am aware of, and that's bug 95700 which Jeffrey recently reported when opening and closing the Servers view multiple times, but I think that is unlikely to be the cause of this problem. Hi, Jeffrey Liu I am sorry that for some reason I did not have my notebook with me for serveral days.So I can't reply this mail in time. I said I "only" editing JSP files means that I only new/modify jsp files or new/modify java classes,I did not start tomcat server, and did not debug jsp files. I checked the "show sleeping and system task" preference, and the progress whick took long time was named "building the workspace"! "open type" function means that I want to see some classes' source code,so I use the "open type" button in the toolbar, and I input the class's name into the inputbox. Cheng, I'm resolving this bug as a dup of 95960. We have found quite a few memory leaks in the JSP editor and we have put in fixes for them. So, this problem should be fixed now. Please verify the fixes in our latest Integration build or M5 build (M5 will be available in a week or so). Thanks for contributing to the successful of WTP. Jeff *** This bug has been marked as a duplicate of 95960 *** Marking as verified as I know this issue is fixed (or correctly categorized). If, as originator, you disagree or still see, please re-open, or open a new bug. Thanks very much for reporting and helping make WTP better. Closing bug. |
I found that with the same project,in wtp1.0m3,I can work for a whole day and no any out of memory error and eclipse works fast and smooth, but in wtp1.0m4,there are many out of memory errors in about 10 or 20 minutes and eclipse is very slow! I start eclipse with the following arguments: -flash 60 -vmargs -Xverify:none -XX:+UseParallelGC -XX:PermSize=20M -Xms128m -Xmx256m but it's of no use. Well,I can start eclipse with -Xmx512m, but how can 1.0m4 use so much more memory than 1.0m3?? in 1.0m4,I installed fewer plugins than in 1.0m3. And the project is not so fat,only a web project with about ten jsp files and ten classes with spring,struts,tiles and velocity.