eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
1 stars 0 forks source link

[codegen] Fix memory leak #798

Closed eclipse-ocl-bot closed 2 months ago

eclipse-ocl-bot commented 2 months ago

| --- | --- | | Bugzilla Link | 363032 | | Status | CLOSED FIXED | | Importance | P3 normal | | Reported | Nov 07, 2011 04:57 EDT | | Modified | May 27, 2014 09:53 EDT | | Version | 3.2.0 | | Reporter | Ed Willink |

Description

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.

eclipse-ocl-bot commented 2 months ago

By Ed Willink on Nov 12, 2011 02:49

(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.

eclipse-ocl-bot commented 2 months ago

By Ed Willink on Nov 12, 2011 11:25

Instrumenting ResourseSet rather than MetaModelManager reveal 19 live instances after 366 tets. Many of these are referrenced via statics.

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.

eclipse-ocl-bot commented 2 months ago

By Ed Willink on Jun 25, 2012 10:51

Created attachment 217813 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.

64M.png

64M.png

eclipse-ocl-bot commented 2 months ago

By Ed Willink on May 27, 2014 09:45

CLOSED after more than a year in RESOLVED state.

eclipse-ocl-bot commented 2 months ago

By Ed Willink on May 27, 2014 09:53

and CLOSE