Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 186711

Summary: Significant memory leak when collecting profiling data
Product: z_Archived Reporter: Asaf Yaffe <asaf.yaffe>
Component: TPTPAssignee: Marius Slavescu <slavescu>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P1 CC: jkubasta, popescu
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: closed460

Description Asaf Yaffe CLA 2007-05-13 06:49:01 EDT
Driver: 200705080100A (TPTP 4.4.i3 Candidate, Patch A)
Eclipse 3.3 M7.
Windows XP, IA-32

(Not sure to whether Platform.Execution is the correct component classification)

When collecting profiling data, the Workbench JVM Heap grows dramatically due to the amount of data being processed. When the profiling session ends, most of the memory is not freed, even when all Profiling views are closed and the profiling data is discarded. The result is that after several consecutive profiling session, an OutOfMemoryError is inevitable...

To reproduce:
1. Start Eclipse, go to "Preferences | General", and enable the "Show heap status" option. The initial Heap size is usually less than 20 M at this stage.
2. Start a profiling session (any one) that generates some data. For example, run execution time analysis on a HelloWorld application without any filters.
3. Notice that the Heap size grows dramatically during profiling, and stays high after the session ends.
4. Close all views, close the Profiling and Logging perspective and do not save the data. Then, click the Run Garbage Collector button next to the Heap Size widget, and notice that the size is still much higher than the one recorded at step 1.
Comment 1 Guru Nagarajan CLA 2007-05-16 01:26:36 EDT
It seems like a data model issue. I have observed this as well.
Comment 2 Marius Slavescu CLA 2007-05-24 09:51:28 EDT
Bug 182620 is related with this problem, it seems that the Log and Trace data is kept in memory by some actions or UI managers even after the perspective is closed. I'll keep this bug for the Trace part as it is triggered by different parts of the code then bug 182620.
Comment 3 Valentina Popescu CLA 2007-06-18 12:55:13 EDT
I had tried the same scenario and noticed that the memory leaks occurs even no view or UI actions are executed. I have started a few profiling sessions without opening any views or running any actions. The heap size increased and running gc did free some of the memory but still didn't get to the initial size. This would be an expected behavior since the profiling data is still available under the profiling monitor view.
I then closed the Profiling perspective without saving the data ( not saving the data should be irrelevant since the memory should be freed up anyway but I tried to follow the same scenario ). Run gc again and noticed the memory usage went down but far from the initial memory size.
Comment 4 Valentina Popescu CLA 2007-06-26 11:13:26 EDT
Marius, please add size estimates
Comment 5 Marius Slavescu CLA 2007-07-05 08:49:56 EDT
Fixed as part of defect bug 194544.
Comment 6 Paul Slauenwhite CLA 2009-06-30 13:47:50 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.
Comment 7 Paul Slauenwhite CLA 2009-06-30 13:59:03 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.