This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | IDE keeps all Maven projects in memory indefinitely causing a memory leak | ||
---|---|---|---|
Product: | platform | Reporter: | Milos Kleint <mkleint> |
Component: | Filesystems | Assignee: | Jaroslav Havlin <jhavlin> |
Status: | NEW --- | ||
Severity: | normal | CC: | dip.sweng, jrechtacek, jskrivanek, markiewb, mmirilovic, musilt2, thurka, tzezula |
Priority: | P2 | Keywords: | 8.0_WAIVER_APPROVED, 8.1_WAIVER_APPROVED, PERFORMANCE |
Version: | 8.0 | ||
Hardware: | PC | ||
OS: | Mac OS X | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Milos Kleint
2014-03-05 08:29:49 UTC
Tomas/Jirka, could you please investigate how big impact it has on the memory, also check other project types ... thanks in advance. based on your findings we will decide to fix/reject this for 8.0. We did some testing with Jirka and similar problem exists in NB 7.4 too. In the heap dump from NB 8.0 we saw two different paths to GC root holding maven projects, none of them are similar to the one reported by Milos. There is a similar test for j2se projects and unfortunately during NB 8.0 development cycle, we were not able to fix all the project oriented leaks so this test never passed. I think, if someone has the easy fix than we can put it in, but I am afraid that there is several problems on different levels and it cannot be fixed easily. If I understand correctly, a recursive listener is registered by RepositoryUpdater.RootListeners when a source root is added, and unregistered when a source root is removed. There are 25 listeners in DeepListener.keep list, and there are 23 items in RepositoryUpdater.RootListeners.sourceRoots, corresponding to the listeners. So it seems that some source roots were not removed from the RepositoryUpdater.RootListeners, and thus the recursive listeners kept registered. One place where a reference is held is navigator panel for Maven project. Underlaying JTree of BeanTreeView holds a VisualizerNode with o.n.m.maven.execute.navigator.GoalsPanel$PluginChildren, even if the node is not in explorer manager's context. Expanding the "mock" node currently contained in the tree view seems to fix this problem. http://hg.netbeans.org/core-main/rev/f9c16934f1f5 Suggestions for some cleaner fix are welcome. Integrated into 'main-silver', will be available in build *201507180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/f9c16934f1f5 User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #242567: Refresh tree view which holds reference to closed Maven project In some cases, projects were referenced from SetMainProject action (some Swing component indirectly holding project root node). http://hg.netbeans.org/core-main/rev/0e2f6ddbd376 Integrated into 'main-silver', will be available in build *201507220303* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/0e2f6ddbd376 User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #242567: Reference projects from SetMainProject weakly Adding 8.1_WAIVER_REQUEST keyword. Some places where projects were held are already fixed. The last unresolved case seems to be related to background scanning or filesystems. Any reliable solution for it hasn't been found yet. Thank you for understanding. Bug waiver for 8.1 approved. I confirm that multi module JEE projects consumes 90% of my RAM Product Version: NetBeans IDE 8.1 (Build 201510222201) Updates: NetBeans IDE is updated to version NetBeans 8.1 Patch 1 Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11 System: Windows 7 version 6.1 running on amd64; Cp1253; en_US (nb) I don't know if this is relevant but: in maven projects having a mirror of * (look above) in settings.xml file, leads to halting the system as it consumes all memory <mirrors> <mirror> <id>some-public-group</id> <mirrorOf>*,!some-snapshots</mirrorOf> <url>https://url.of.some.com/groups/public</url> </mirror> </mirrors> if i comment out the whole mirror and restart Netbeans it does not lead to a halting system |