Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363032 - [codegen] Fix memory leak
Summary: [codegen] Fix memory leak
Status: CLOSED FIXED
Alias: None
Product: OCL
Classification: Modeling
Component: Core (show other bugs)
Version: 3.2.0   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: M4   Edit
Assignee: OCL Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-07 04:57 EST by Ed Willink CLA
Modified: 2014-05-27 09:53 EDT (History)
0 users

See Also:


Attachments
Heap trace in 64MB (40.71 KB, image/png)
2012-06-25 10:51 EDT, Ed Willink CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2011-11-07 04:57:52 EST
46 Xtext tests now fail on Hudson with a 32 MB VM, although they pass on Win32.

As a workaround the VM has been increased to 64 MB.

The new codegen tests probably have a memory leak.
Comment 1 Ed Willink CLA 2011-11-12 02:49:27 EST
(In reply to comment #0)
> The new codegen tests probably have a memory leak.

No problem with the new codegen tests; they don't do much allocation.

The MarkupTests had significant leaks, and a few other tests also leaked. Probably the extra classes and tests for the codegen tipped the balance via PermGen.

[When debugging use Visual VM and see what MetaModelManager classes persist. Additionally uncomment references to LiveInstances in MetaModelManagerResourceAdapter to get diagnostic help.]

Now works in 25MB (but not 24 MB) on Win 32.

Pushed to master.
Comment 2 Ed Willink CLA 2011-11-12 11:25:27 EST
Instrumenting ResourseSet rather than MetaModelManager reveal 19 live instances after 366 tets. Many of these are referrenced via statics.
- one in PivotTestSuite
- one for each editor injector
- the global package registry

It seems quite hard to get them all released, particularly without affecting the startup of subsequent tests. e.g we need to unregister Ecore.ecore and reregister without using the normal statics.

This therefore seems an unrealistic effort. Just set the VM back to 64 MB.
Comment 3 Ed Willink CLA 2012-06-25 10:51:59 EDT
Created attachment 217813 [details]
Heap trace in 64MB

Tests started to fail again on Hudson.

Immediate problem was increased usage by UML stereotypes.

On investigation, failure to wipe the EValidator.Registry and non-weak references in the ExecutorStandardLibrary locked in steadily increasing resources.

Attached shows a successful run of /org.eclipse.ocl.examples.xtext.tests/.settings/org.eclipse.ocl.examples.xtext.tests (standalone) (64M).launch on a quad-core 32 bit Intel Vista machine.
Comment 4 Ed Willink CLA 2014-05-27 09:45:29 EDT
CLOSED after more than a year in RESOLVED state.
Comment 5 Ed Willink CLA 2014-05-27 09:53:09 EDT
and CLOSE