Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Memory leak
[ATL] Memory leak [message #17679] Thu, 22 February 2007 08:12 Go to next message
Eclipse UserFriend
Originally posted by: markus.herrmannsdoerfer.bmw-carit.de

Hi,

I am trying to use ATL for model migration between two different
versions of a metamodel. That means that most of the metamodel stays the
same. But since the two metamodels are different, I cannot use refining
mode. So the majority of my transformation is an identity transformation.

My first step was to generate a complete identity transformation and to
run it on a big model (roughly 100.000 instances or 10 MB of XML data).
Later the generated transformation should be edited in order to adjust
it to the new metamodel version. The transformation takes 1:30 min which
is not a problem, but about 100 MB of memory used during transformation
will never be freed again (even after manually executing garbage
collection). That means that I can only execute a small amount of
transformation in a chain, before my eclipse instance runs out of memory.

Is it possible that ATL still references data created during the
transformation after the transformation is over?

Thanks in advance.

Markus Herrmannsdörfer
Re: [ATL] Memory leak [message #17730 is a reply to message #17679] Thu, 22 February 2007 17:13 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 147
Registered: July 2009
Senior Member
Markus Herrmannsdoerfer schreef:
> Hi,

Hi Markus,

>
> I am trying to use ATL for model migration between two different
> versions of a metamodel. That means that most of the metamodel stays the
> same. But since the two metamodels are different, I cannot use refining
> mode. So the majority of my transformation is an identity transformation.
>
> My first step was to generate a complete identity transformation and to
> run it on a big model (roughly 100.000 instances or 10 MB of XML data).
> Later the generated transformation should be edited in order to adjust
> it to the new metamodel version. The transformation takes 1:30 min which
> is not a problem, but about 100 MB of memory used during transformation
> will never be freed again (even after manually executing garbage
> collection). That means that I can only execute a small amount of
> transformation in a chain, before my eclipse instance runs out of memory.
>
> Is it possible that ATL still references data created during the
> transformation after the transformation is over?

ATL should log on the console whenever it disposes an EMF model. You
should see something like:

"ASMEMFModel xxx disposed"

If this does not show up, there can be a number of reasons:
- you're running an older ATL (memory leak exists in latest binary
release of 30th June 2006)
- you're running ATL from CVS current, which is "too new" (logging code
commented out since CVS 31st January 2007)

The memory leak should not occur in the latest CVS version of ATL,
however. If you want to test with the logging statements enabled, you
can checkout the latest ATL from CVS and uncomment line 247 in
ASMEMFModel.java. Alternatively, you can test with ATL from our local
update site:

http://ssel.vub.ac.be/tools/atl/update

N.B. Our update site does NOT contain the latest ATL code!

>
> Thanks in advance.
>
> Markus Herrmannsdörfer

Kind regards,
Dennis Wagelaar
Re: [ATL] Memory leak [message #18454 is a reply to message #17730] Fri, 23 February 2007 07:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: markus.herrmannsdoerfer.bmw-carit.de

Hi Dennis,

I am already using the newest version from CVS. When I uncomment the
commented line 247 in ASMEMFModel, then I get the messages

"ASMEMFModel xxx disposed"

for all my models after the transformation.

But I am still losing 100m of heap space during my transformation. Is it
possible that the VM doesn't dispose its data structures (e.g. trace
links) correctly? Is there any means to inspect the heap space within
Eclipse?

Thanks for your help.

Markus


Dennis Wagelaar wrote:
> Markus Herrmannsdoerfer schreef:
>> Hi,
>
> Hi Markus,
>
>>
>> I am trying to use ATL for model migration between two different
>> versions of a metamodel. That means that most of the metamodel stays
>> the same. But since the two metamodels are different, I cannot use
>> refining mode. So the majority of my transformation is an identity
>> transformation.
>>
>> My first step was to generate a complete identity transformation and
>> to run it on a big model (roughly 100.000 instances or 10 MB of XML
>> data). Later the generated transformation should be edited in order to
>> adjust it to the new metamodel version. The transformation takes 1:30
>> min which is not a problem, but about 100 MB of memory used during
>> transformation will never be freed again (even after manually
>> executing garbage collection). That means that I can only execute a
>> small amount of transformation in a chain, before my eclipse instance
>> runs out of memory.
>>
>> Is it possible that ATL still references data created during the
>> transformation after the transformation is over?
>
> ATL should log on the console whenever it disposes an EMF model. You
> should see something like:
>
> "ASMEMFModel xxx disposed"
>
> If this does not show up, there can be a number of reasons:
> - you're running an older ATL (memory leak exists in latest binary
> release of 30th June 2006)
> - you're running ATL from CVS current, which is "too new" (logging code
> commented out since CVS 31st January 2007)
>
> The memory leak should not occur in the latest CVS version of ATL,
> however. If you want to test with the logging statements enabled, you
> can checkout the latest ATL from CVS and uncomment line 247 in
> ASMEMFModel.java. Alternatively, you can test with ATL from our local
> update site:
>
> http://ssel.vub.ac.be/tools/atl/update
>
> N.B. Our update site does NOT contain the latest ATL code!
>
>>
>> Thanks in advance.
>>
>> Markus Herrmannsdörfer
>
> Kind regards,
> Dennis Wagelaar
Re: [ATL] Memory leak [message #18566 is a reply to message #17730] Sat, 24 February 2007 16:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: markus.herrmannsdoerfer.bmw-carit.de

This is a multi-part message in MIME format.
--------------080804090706070309090508
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi Dennis and others,

I prepared a transformation which lets me lose roughly 50 MB heap space
(files see attachment). I created a launch configuration with the
following parameters:

IN = input.xmi (roughly 50000 instances)
version1 = statemachine.ecore
OUT = output.xmi
version2 = statemachine.ecore
atl file = statemachine2006.atl

It would be very kind of you if you could check on your machine whether
you are also losing 50 MB of heap space during transformation. I read
the amount of heap space Eclipse is using from the integrated meter
(which can be activated in preferences -> general -> show heap status).

I really like ATL because it is easy to learn and very stable, but this
memory leak makes me desperate, since I have to deal with very large
instances and to run several transformations in chain.

Thank you very much in advance.

Kind regards,

Markus Herrmannsd
Re: [ATL] Memory leak [message #18579 is a reply to message #18454] Mon, 26 February 2007 07:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: irbull.cs.uvic.ca

I can also confirm that after my ATL transformations my memory footprint
has increased. My models are being disposed ok.

I am basically running a transformation (programatically). Each time I
run it, my heap space increases by about 40-50M. Also, each
transformation gets slower (it is the same transformation I am running
over and over again).

There seems to be a number of static lists in the VM, i wonder if one is
continually growing?

cheers,
ian

Markus Herrmannsdoerfer wrote:
> Hi Dennis,
>
> I am already using the newest version from CVS. When I uncomment the
> commented line 247 in ASMEMFModel, then I get the messages
>
> "ASMEMFModel xxx disposed"
>
> for all my models after the transformation.
>
> But I am still losing 100m of heap space during my transformation. Is it
> possible that the VM doesn't dispose its data structures (e.g. trace
> links) correctly? Is there any means to inspect the heap space within
> Eclipse?
>
> Thanks for your help.
>
> Markus
>
>
> Dennis Wagelaar wrote:
>> Markus Herrmannsdoerfer schreef:
>>> Hi,
>>
>> Hi Markus,
>>
>>>
>>> I am trying to use ATL for model migration between two different
>>> versions of a metamodel. That means that most of the metamodel stays
>>> the same. But since the two metamodels are different, I cannot use
>>> refining mode. So the majority of my transformation is an identity
>>> transformation.
>>>
>>> My first step was to generate a complete identity transformation and
>>> to run it on a big model (roughly 100.000 instances or 10 MB of XML
>>> data). Later the generated transformation should be edited in order
>>> to adjust it to the new metamodel version. The transformation takes
>>> 1:30 min which is not a problem, but about 100 MB of memory used
>>> during transformation will never be freed again (even after manually
>>> executing garbage collection). That means that I can only execute a
>>> small amount of transformation in a chain, before my eclipse instance
>>> runs out of memory.
>>>
>>> Is it possible that ATL still references data created during the
>>> transformation after the transformation is over?
>>
>> ATL should log on the console whenever it disposes an EMF model. You
>> should see something like:
>>
>> "ASMEMFModel xxx disposed"
>>
>> If this does not show up, there can be a number of reasons:
>> - you're running an older ATL (memory leak exists in latest binary
>> release of 30th June 2006)
>> - you're running ATL from CVS current, which is "too new" (logging
>> code commented out since CVS 31st January 2007)
>>
>> The memory leak should not occur in the latest CVS version of ATL,
>> however. If you want to test with the logging statements enabled, you
>> can checkout the latest ATL from CVS and uncomment line 247 in
>> ASMEMFModel.java. Alternatively, you can test with ATL from our local
>> update site:
>>
>> http://ssel.vub.ac.be/tools/atl/update
>>
>> N.B. Our update site does NOT contain the latest ATL code!
>>
>>>
>>> Thanks in advance.
>>>
>>> Markus Herrmannsdörfer
>>
>> Kind regards,
>> Dennis Wagelaar
Re: [ATL] Memory leak [message #18587 is a reply to message #18579] Mon, 26 February 2007 18:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: irbull.cs.uvic.ca

I have looked a little closer at this, and I may have a found something.

I added some code to ASMNativeObject to increase a reference count each
time the object is constructed and decrease it in the finalize method.
Throughout my transformation approximately 4,000,000 ASMNativeObjects
(or subclasses) get created, however, there are about 180,000 left
afterwards. I reran the same transformation and again (without shutting
down my Java VM, and again another 180,000 ASMNativeObjects where left
(now I have just under 360,000 extra objects lying around).

I understand that the GC runs at strange times, but after a few runs of
my transformation I would expect the number of un-collected objects to
level off.

Thoughts?

cheers,
ian


Ian Bull wrote:
> I can also confirm that after my ATL transformations my memory footprint
> has increased. My models are being disposed ok.
>
> I am basically running a transformation (programatically). Each time I
> run it, my heap space increases by about 40-50M. Also, each
> transformation gets slower (it is the same transformation I am running
> over and over again).
>
> There seems to be a number of static lists in the VM, i wonder if one is
> continually growing?
>
> cheers,
> ian
>
> Markus Herrmannsdoerfer wrote:
>> Hi Dennis,
>>
>> I am already using the newest version from CVS. When I uncomment the
>> commented line 247 in ASMEMFModel, then I get the messages
>>
>> "ASMEMFModel xxx disposed"
>>
>> for all my models after the transformation.
>>
>> But I am still losing 100m of heap space during my transformation. Is
>> it possible that the VM doesn't dispose its data structures (e.g.
>> trace links) correctly? Is there any means to inspect the heap space
>> within Eclipse?
>>
>> Thanks for your help.
>>
>> Markus
>>
>>
>> Dennis Wagelaar wrote:
>>> Markus Herrmannsdoerfer schreef:
>>>> Hi,
>>>
>>> Hi Markus,
>>>
>>>>
>>>> I am trying to use ATL for model migration between two different
>>>> versions of a metamodel. That means that most of the metamodel stays
>>>> the same. But since the two metamodels are different, I cannot use
>>>> refining mode. So the majority of my transformation is an identity
>>>> transformation.
>>>>
>>>> My first step was to generate a complete identity transformation and
>>>> to run it on a big model (roughly 100.000 instances or 10 MB of XML
>>>> data). Later the generated transformation should be edited in order
>>>> to adjust it to the new metamodel version. The transformation takes
>>>> 1:30 min which is not a problem, but about 100 MB of memory used
>>>> during transformation will never be freed again (even after manually
>>>> executing garbage collection). That means that I can only execute a
>>>> small amount of transformation in a chain, before my eclipse
>>>> instance runs out of memory.
>>>>
>>>> Is it possible that ATL still references data created during the
>>>> transformation after the transformation is over?
>>>
>>> ATL should log on the console whenever it disposes an EMF model. You
>>> should see something like:
>>>
>>> "ASMEMFModel xxx disposed"
>>>
>>> If this does not show up, there can be a number of reasons:
>>> - you're running an older ATL (memory leak exists in latest binary
>>> release of 30th June 2006)
>>> - you're running ATL from CVS current, which is "too new" (logging
>>> code commented out since CVS 31st January 2007)
>>>
>>> The memory leak should not occur in the latest CVS version of ATL,
>>> however. If you want to test with the logging statements enabled, you
>>> can checkout the latest ATL from CVS and uncomment line 247 in
>>> ASMEMFModel.java. Alternatively, you can test with ATL from our local
>>> update site:
>>>
>>> http://ssel.vub.ac.be/tools/atl/update
>>>
>>> N.B. Our update site does NOT contain the latest ATL code!
>>>
>>>>
>>>> Thanks in advance.
>>>>
>>>> Markus Herrmannsdörfer
>>>
>>> Kind regards,
>>> Dennis Wagelaar
Re: [ATL] Memory leak [message #18595 is a reply to message #18587] Mon, 26 February 2007 20:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: irbull.cs.uvic.ca

A little more investigation :)

It seems that the ASMEMFModelElement are not getting cleaned up. Someone
seems to be hanging on to all my model elements.

This is kinda a messy data structure (because things point around at one
another), so likely, a few of these are being referenced somewhere and
the whole thing is thus indirectly referenced.

cheers,
ian

Ian Bull wrote:
> I have looked a little closer at this, and I may have a found something.
>
> I added some code to ASMNativeObject to increase a reference count each
> time the object is constructed and decrease it in the finalize method.
> Throughout my transformation approximately 4,000,000 ASMNativeObjects
> (or subclasses) get created, however, there are about 180,000 left
> afterwards. I reran the same transformation and again (without shutting
> down my Java VM, and again another 180,000 ASMNativeObjects where left
> (now I have just under 360,000 extra objects lying around).
>
> I understand that the GC runs at strange times, but after a few runs of
> my transformation I would expect the number of un-collected objects to
> level off.
>
> Thoughts?
>
> cheers,
> ian
>
>
> Ian Bull wrote:
>> I can also confirm that after my ATL transformations my memory
>> footprint has increased. My models are being disposed ok.
>>
>> I am basically running a transformation (programatically). Each time
>> I run it, my heap space increases by about 40-50M. Also, each
>> transformation gets slower (it is the same transformation I am running
>> over and over again).
>>
>> There seems to be a number of static lists in the VM, i wonder if one
>> is continually growing?
>>
>> cheers,
>> ian
>>
>> Markus Herrmannsdoerfer wrote:
>>> Hi Dennis,
>>>
>>> I am already using the newest version from CVS. When I uncomment the
>>> commented line 247 in ASMEMFModel, then I get the messages
>>>
>>> "ASMEMFModel xxx disposed"
>>>
>>> for all my models after the transformation.
>>>
>>> But I am still losing 100m of heap space during my transformation. Is
>>> it possible that the VM doesn't dispose its data structures (e.g.
>>> trace links) correctly? Is there any means to inspect the heap space
>>> within Eclipse?
>>>
>>> Thanks for your help.
>>>
>>> Markus
>>>
>>>
>>> Dennis Wagelaar wrote:
>>>> Markus Herrmannsdoerfer schreef:
>>>>> Hi,
>>>>
>>>> Hi Markus,
>>>>
>>>>>
>>>>> I am trying to use ATL for model migration between two different
>>>>> versions of a metamodel. That means that most of the metamodel
>>>>> stays the same. But since the two metamodels are different, I
>>>>> cannot use refining mode. So the majority of my transformation is
>>>>> an identity transformation.
>>>>>
>>>>> My first step was to generate a complete identity transformation
>>>>> and to run it on a big model (roughly 100.000 instances or 10 MB of
>>>>> XML data). Later the generated transformation should be edited in
>>>>> order to adjust it to the new metamodel version. The transformation
>>>>> takes 1:30 min which is not a problem, but about 100 MB of memory
>>>>> used during transformation will never be freed again (even after
>>>>> manually executing garbage collection). That means that I can only
>>>>> execute a small amount of transformation in a chain, before my
>>>>> eclipse instance runs out of memory.
>>>>>
>>>>> Is it possible that ATL still references data created during the
>>>>> transformation after the transformation is over?
>>>>
>>>> ATL should log on the console whenever it disposes an EMF model. You
>>>> should see something like:
>>>>
>>>> "ASMEMFModel xxx disposed"
>>>>
>>>> If this does not show up, there can be a number of reasons:
>>>> - you're running an older ATL (memory leak exists in latest binary
>>>> release of 30th June 2006)
>>>> - you're running ATL from CVS current, which is "too new" (logging
>>>> code commented out since CVS 31st January 2007)
>>>>
>>>> The memory leak should not occur in the latest CVS version of ATL,
>>>> however. If you want to test with the logging statements enabled,
>>>> you can checkout the latest ATL from CVS and uncomment line 247 in
>>>> ASMEMFModel.java. Alternatively, you can test with ATL from our
>>>> local update site:
>>>>
>>>> http://ssel.vub.ac.be/tools/atl/update
>>>>
>>>> N.B. Our update site does NOT contain the latest ATL code!
>>>>
>>>>>
>>>>> Thanks in advance.
>>>>>
>>>>> Markus Herrmannsdörfer
>>>>
>>>> Kind regards,
>>>> Dennis Wagelaar
Re: [ATL] Memory leak [message #18611 is a reply to message #18595] Tue, 27 February 2007 14:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: freddy.allilaire.univ-nantes.fr

Dear Markus, and Ian,

We have opened a bug to report this problem:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=175703

We are going to investigate on this problem.

Thank you Ian for your investigation :-)

Regards,
Freddy.

Ian Bull a écrit :
> A little more investigation :)
>
> It seems that the ASMEMFModelElement are not getting cleaned up. Someone
> seems to be hanging on to all my model elements.
>
> This is kinda a messy data structure (because things point around at one
> another), so likely, a few of these are being referenced somewhere and
> the whole thing is thus indirectly referenced.
>
> cheers,
> ian
>
> Ian Bull wrote:
>> I have looked a little closer at this, and I may have a found something.
>>
>> I added some code to ASMNativeObject to increase a reference count
>> each time the object is constructed and decrease it in the finalize
>> method. Throughout my transformation approximately 4,000,000
>> ASMNativeObjects (or subclasses) get created, however, there are about
>> 180,000 left afterwards. I reran the same transformation and again
>> (without shutting down my Java VM, and again another 180,000
>> ASMNativeObjects where left (now I have just under 360,000 extra
>> objects lying around).
>>
>> I understand that the GC runs at strange times, but after a few runs
>> of my transformation I would expect the number of un-collected objects
>> to level off.
>>
>> Thoughts?
>>
>> cheers,
>> ian
>>
>>
>> Ian Bull wrote:
>>> I can also confirm that after my ATL transformations my memory
>>> footprint has increased. My models are being disposed ok.
>>>
>>> I am basically running a transformation (programatically). Each time
>>> I run it, my heap space increases by about 40-50M. Also, each
>>> transformation gets slower (it is the same transformation I am
>>> running over and over again).
>>>
>>> There seems to be a number of static lists in the VM, i wonder if one
>>> is continually growing?
>>>
>>> cheers,
>>> ian
>>>
>>> Markus Herrmannsdoerfer wrote:
>>>> Hi Dennis,
>>>>
>>>> I am already using the newest version from CVS. When I uncomment the
>>>> commented line 247 in ASMEMFModel, then I get the messages
>>>>
>>>> "ASMEMFModel xxx disposed"
>>>>
>>>> for all my models after the transformation.
>>>>
>>>> But I am still losing 100m of heap space during my transformation.
>>>> Is it possible that the VM doesn't dispose its data structures (e.g.
>>>> trace links) correctly? Is there any means to inspect the heap space
>>>> within Eclipse?
>>>>
>>>> Thanks for your help.
>>>>
>>>> Markus
>>>>
>>>>
>>>> Dennis Wagelaar wrote:
>>>>> Markus Herrmannsdoerfer schreef:
>>>>>> Hi,
>>>>>
>>>>> Hi Markus,
>>>>>
>>>>>>
>>>>>> I am trying to use ATL for model migration between two different
>>>>>> versions of a metamodel. That means that most of the metamodel
>>>>>> stays the same. But since the two metamodels are different, I
>>>>>> cannot use refining mode. So the majority of my transformation is
>>>>>> an identity transformation.
>>>>>>
>>>>>> My first step was to generate a complete identity transformation
>>>>>> and to run it on a big model (roughly 100.000 instances or 10 MB
>>>>>> of XML data). Later the generated transformation should be edited
>>>>>> in order to adjust it to the new metamodel version. The
>>>>>> transformation takes 1:30 min which is not a problem, but about
>>>>>> 100 MB of memory used during transformation will never be freed
>>>>>> again (even after manually executing garbage collection). That
>>>>>> means that I can only execute a small amount of transformation in
>>>>>> a chain, before my eclipse instance runs out of memory.
>>>>>>
>>>>>> Is it possible that ATL still references data created during the
>>>>>> transformation after the transformation is over?
>>>>>
>>>>> ATL should log on the console whenever it disposes an EMF model.
>>>>> You should see something like:
>>>>>
>>>>> "ASMEMFModel xxx disposed"
>>>>>
>>>>> If this does not show up, there can be a number of reasons:
>>>>> - you're running an older ATL (memory leak exists in latest binary
>>>>> release of 30th June 2006)
>>>>> - you're running ATL from CVS current, which is "too new" (logging
>>>>> code commented out since CVS 31st January 2007)
>>>>>
>>>>> The memory leak should not occur in the latest CVS version of ATL,
>>>>> however. If you want to test with the logging statements enabled,
>>>>> you can checkout the latest ATL from CVS and uncomment line 247 in
>>>>> ASMEMFModel.java. Alternatively, you can test with ATL from our
>>>>> local update site:
>>>>>
>>>>> http://ssel.vub.ac.be/tools/atl/update
>>>>>
>>>>> N.B. Our update site does NOT contain the latest ATL code!
>>>>>
>>>>>>
>>>>>> Thanks in advance.
>>>>>>
>>>>>> Markus Herrmannsdörfer
>>>>>
>>>>> Kind regards,
>>>>> Dennis Wagelaar


--
Freddy Allilaire - ATLAS Group (INRIA & LINA)
http://www.sciences.univ-nantes.fr/lina/atl/contrib/allilair e
Re: [ATL] Memory leak [message #19510 is a reply to message #18566] Wed, 28 February 2007 09:13 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 147
Registered: July 2009
Senior Member
This is just to say that I've managed to reproduce your problem..
--
Dennis

Markus Herrmannsdoerfer schreef:
> Hi Dennis and others,
>
> I prepared a transformation which lets me lose roughly 50 MB heap space
> (files see attachment). I created a launch configuration with the
> following parameters:
>
> IN = input.xmi (roughly 50000 instances)
> version1 = statemachine.ecore
> OUT = output.xmi
> version2 = statemachine.ecore
> atl file = statemachine2006.atl
>
> It would be very kind of you if you could check on your machine whether
> you are also losing 50 MB of heap space during transformation. I read
> the amount of heap space Eclipse is using from the integrated meter
> (which can be activated in preferences -> general -> show heap status).
>
> I really like ATL because it is easy to learn and very stable, but this
> memory leak makes me desperate, since I have to deal with very large
> instances and to run several transformations in chain.
>
> Thank you very much in advance.
>
> Kind regards,
>
> Markus Herrmannsdörfer
>
>
> Dennis Wagelaar wrote:
>> Markus Herrmannsdoerfer schreef:
>>> Hi,
>>
>> Hi Markus,
>>
>>>
>>> I am trying to use ATL for model migration between two different
>>> versions of a metamodel. That means that most of the metamodel stays
>>> the same. But since the two metamodels are different, I cannot use
>>> refining mode. So the majority of my transformation is an identity
>>> transformation.
>>>
>>> My first step was to generate a complete identity transformation and
>>> to run it on a big model (roughly 100.000 instances or 10 MB of XML
>>> data). Later the generated transformation should be edited in order
>>> to adjust it to the new metamodel version. The transformation takes
>>> 1:30 min which is not a problem, but about 100 MB of memory used
>>> during transformation will never be freed again (even after manually
>>> executing garbage collection). That means that I can only execute a
>>> small amount of transformation in a chain, before my eclipse instance
>>> runs out of memory.
>>>
>>> Is it possible that ATL still references data created during the
>>> transformation after the transformation is over?
>>
>> ATL should log on the console whenever it disposes an EMF model. You
>> should see something like:
>>
>> "ASMEMFModel xxx disposed"
>>
>> If this does not show up, there can be a number of reasons:
>> - you're running an older ATL (memory leak exists in latest binary
>> release of 30th June 2006)
>> - you're running ATL from CVS current, which is "too new" (logging
>> code commented out since CVS 31st January 2007)
>>
>> The memory leak should not occur in the latest CVS version of ATL,
>> however. If you want to test with the logging statements enabled, you
>> can checkout the latest ATL from CVS and uncomment line 247 in
>> ASMEMFModel.java. Alternatively, you can test with ATL from our local
>> update site:
>>
>> http://ssel.vub.ac.be/tools/atl/update
>>
>> N.B. Our update site does NOT contain the latest ATL code!
>>
>>>
>>> Thanks in advance.
>>>
>>> Markus Herrmannsdörfer
>>
>> Kind regards,
>> Dennis Wagelaar
>
Re: [ATL] Memory leak [message #20015 is a reply to message #18611] Thu, 01 March 2007 16:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mikael.barbero.gmail.com

Dear Markus, Ian and Dennis,

Finally, after a few hours of investigation, we managed to solve this
memory leak. There was two causes:
- OclType.subtypes was keeping a reference on each model element -
Each metamodel was having a reference to every model conforming to him
(ASMModel.submodels).

Thanks to the Markus' benchmark, i have been able to find those leaks
with Sun's fantastic tools: jmap and jhat (JavaSE 6). I advise you to
have a look at these if you don't know them yet :)

Corrections have been committed to the CVS a few minutes ago ;)

Best regards,
Mikaël

--
Mikaël Barbero - PhD Candidate
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssinière
44322 Nantes Cedex 3 - France
tel. +33 2 51 12 58 08 /\ cell.+33 6 07 63 19 00
email: Mikael.Barbero@{gmail.com, univ-nantes.fr}
http://www.sciences.univ-nantes.fr/lina/atl/
Re: [ATL] Memory leak [message #20054 is a reply to message #19510] Thu, 01 March 2007 20:02 Go to previous messageGo to next message
Jean Bezivin is currently offline Jean BezivinFriend
Messages: 38
Registered: July 2009
Member
Markus, Ian and Dennis,

Could you check that Mikael's correction
is solving the problem?

Best regards,

Jean

"Dennis Wagelaar" <dennis.wagelaar@vub.ac.be> a
Re: [ATL] Memory leak [message #20481 is a reply to message #20054] Fri, 02 March 2007 15:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: markus.herrmannsdoerfer.bmw-carit.de

Jean,

Mikael's correction is solving the problem. As far as I can measure, I
am getting a hundred percent of the memory used during transformation back.
Thank you very much, Mikeal! You rock!
Now I will be able to use ATL for my project.

Kind regards,

Markus

Jean.Bezivin wrote:
> Markus, Ian and Dennis,
>
> Could you check that Mikael's correction
> is solving the problem?
>
> Best regards,
>
> Jean
>
> "Dennis Wagelaar" <dennis.wagelaar@vub.ac.be> a écrit dans le message de
> news: es3h3f$9nn$1@utils.eclipse.org...
>> This is just to say that I've managed to reproduce your problem..
>> --
>> Dennis
>>
>> Markus Herrmannsdoerfer schreef:
>>> Hi Dennis and others,
>>>
>>> I prepared a transformation which lets me lose roughly 50 MB heap space
>>> (files see attachment). I created a launch configuration with the
>>> following parameters:
>>>
>>> IN = input.xmi (roughly 50000 instances)
>>> version1 = statemachine.ecore
>>> OUT = output.xmi
>>> version2 = statemachine.ecore
>>> atl file = statemachine2006.atl
>>>
>>> It would be very kind of you if you could check on your machine whether
>>> you are also losing 50 MB of heap space during transformation. I read the
>>> amount of heap space Eclipse is using from the integrated meter (which
>>> can be activated in preferences -> general -> show heap status).
>>>
>>> I really like ATL because it is easy to learn and very stable, but this
>>> memory leak makes me desperate, since I have to deal with very large
>>> instances and to run several transformations in chain.
>>>
>>> Thank you very much in advance.
>>>
>>> Kind regards,
>>>
>>> Markus Herrmannsdörfer
>>>
>>>
>>> Dennis Wagelaar wrote:
>>>> Markus Herrmannsdoerfer schreef:
>>>>> Hi,
>>>> Hi Markus,
>>>>
>>>>> I am trying to use ATL for model migration between two different
>>>>> versions of a metamodel. That means that most of the metamodel stays
>>>>> the same. But since the two metamodels are different, I cannot use
>>>>> refining mode. So the majority of my transformation is an identity
>>>>> transformation.
>>>>>
>>>>> My first step was to generate a complete identity transformation and to
>>>>> run it on a big model (roughly 100.000 instances or 10 MB of XML data).
>>>>> Later the generated transformation should be edited in order to adjust
>>>>> it to the new metamodel version. The transformation takes 1:30 min
>>>>> which is not a problem, but about 100 MB of memory used during
>>>>> transformation will never be freed again (even after manually executing
>>>>> garbage collection). That means that I can only execute a small amount
>>>>> of transformation in a chain, before my eclipse instance runs out of
>>>>> memory.
>>>>>
>>>>> Is it possible that ATL still references data created during the
>>>>> transformation after the transformation is over?
>>>> ATL should log on the console whenever it disposes an EMF model. You
>>>> should see something like:
>>>>
>>>> "ASMEMFModel xxx disposed"
>>>>
>>>> If this does not show up, there can be a number of reasons:
>>>> - you're running an older ATL (memory leak exists in latest binary
>>>> release of 30th June 2006)
>>>> - you're running ATL from CVS current, which is "too new" (logging code
>>>> commented out since CVS 31st January 2007)
>>>>
>>>> The memory leak should not occur in the latest CVS version of ATL,
>>>> however. If you want to test with the logging statements enabled, you
>>>> can checkout the latest ATL from CVS and uncomment line 247 in
>>>> ASMEMFModel.java. Alternatively, you can test with ATL from our local
>>>> update site:
>>>>
>>>> http://ssel.vub.ac.be/tools/atl/update
>>>>
>>>> N.B. Our update site does NOT contain the latest ATL code!
>>>>
>>>>> Thanks in advance.
>>>>>
>>>>> Markus Herrmannsdörfer
>>>> Kind regards,
>>>> Dennis Wagelaar
>
>
Re: [ATL] Memory leak [message #20486 is a reply to message #20481] Sat, 03 March 2007 10:50 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 147
Registered: July 2009
Senior Member
Hi Mikaël, Jean,

I fully agree with Markus: Mikaël rocks :-). I also get all my memory
back :-). This is really great for anyone who needs to transform large
models!

Thanks!
Dennis

Markus Herrmannsdoerfer schreef:
> Jean,
>
> Mikael's correction is solving the problem. As far as I can measure, I
> am getting a hundred percent of the memory used during transformation back.
> Thank you very much, Mikeal! You rock!
> Now I will be able to use ATL for my project.
>
> Kind regards,
>
> Markus
>
> Jean.Bezivin wrote:
>> Markus, Ian and Dennis,
>>
>> Could you check that Mikael's correction
>> is solving the problem?
>>
>> Best regards,
>>
>> Jean
>>
>> "Dennis Wagelaar" <dennis.wagelaar@vub.ac.be> a écrit dans le message
>> de news: es3h3f$9nn$1@utils.eclipse.org...
>>> This is just to say that I've managed to reproduce your problem..
>>> --
>>> Dennis
>>>
>>> Markus Herrmannsdoerfer schreef:
>>>> Hi Dennis and others,
>>>>
>>>> I prepared a transformation which lets me lose roughly 50 MB heap
>>>> space (files see attachment). I created a launch configuration with
>>>> the following parameters:
>>>>
>>>> IN = input.xmi (roughly 50000 instances)
>>>> version1 = statemachine.ecore
>>>> OUT = output.xmi
>>>> version2 = statemachine.ecore
>>>> atl file = statemachine2006.atl
>>>>
>>>> It would be very kind of you if you could check on your machine
>>>> whether you are also losing 50 MB of heap space during
>>>> transformation. I read the amount of heap space Eclipse is using
>>>> from the integrated meter (which can be activated in preferences ->
>>>> general -> show heap status).
>>>>
>>>> I really like ATL because it is easy to learn and very stable, but
>>>> this memory leak makes me desperate, since I have to deal with very
>>>> large instances and to run several transformations in chain.
>>>>
>>>> Thank you very much in advance.
>>>>
>>>> Kind regards,
>>>>
>>>> Markus Herrmannsdörfer
>>>>
>>>>
>>>> Dennis Wagelaar wrote:
>>>>> Markus Herrmannsdoerfer schreef:
>>>>>> Hi,
>>>>> Hi Markus,
>>>>>
>>>>>> I am trying to use ATL for model migration between two different
>>>>>> versions of a metamodel. That means that most of the metamodel
>>>>>> stays the same. But since the two metamodels are different, I
>>>>>> cannot use refining mode. So the majority of my transformation is
>>>>>> an identity transformation.
>>>>>>
>>>>>> My first step was to generate a complete identity transformation
>>>>>> and to run it on a big model (roughly 100.000 instances or 10 MB
>>>>>> of XML data). Later the generated transformation should be edited
>>>>>> in order to adjust it to the new metamodel version. The
>>>>>> transformation takes 1:30 min which is not a problem, but about
>>>>>> 100 MB of memory used during transformation will never be freed
>>>>>> again (even after manually executing garbage collection). That
>>>>>> means that I can only execute a small amount of transformation in
>>>>>> a chain, before my eclipse instance runs out of memory.
>>>>>>
>>>>>> Is it possible that ATL still references data created during the
>>>>>> transformation after the transformation is over?
>>>>> ATL should log on the console whenever it disposes an EMF model.
>>>>> You should see something like:
>>>>>
>>>>> "ASMEMFModel xxx disposed"
>>>>>
>>>>> If this does not show up, there can be a number of reasons:
>>>>> - you're running an older ATL (memory leak exists in latest binary
>>>>> release of 30th June 2006)
>>>>> - you're running ATL from CVS current, which is "too new" (logging
>>>>> code commented out since CVS 31st January 2007)
>>>>>
>>>>> The memory leak should not occur in the latest CVS version of ATL,
>>>>> however. If you want to test with the logging statements enabled,
>>>>> you can checkout the latest ATL from CVS and uncomment line 247 in
>>>>> ASMEMFModel.java. Alternatively, you can test with ATL from our
>>>>> local update site:
>>>>>
>>>>> http://ssel.vub.ac.be/tools/atl/update
>>>>>
>>>>> N.B. Our update site does NOT contain the latest ATL code!
>>>>>
>>>>>> Thanks in advance.
>>>>>>
>>>>>> Markus Herrmannsdörfer
>>>>> Kind regards,
>>>>> Dennis Wagelaar
>>
>>
Re: [ATL] Memory leak [message #20492 is a reply to message #20486] Sat, 03 March 2007 23:38 Go to previous message
Jean Bezivin is currently offline Jean BezivinFriend
Messages: 38
Registered: July 2009
Member
Yes Mikael did really a great job on finding a solution to the problem.
Thanks also Dennis, Markus and Ian for your help on this.

Best regards,

Jean

"Dennis Wagelaar" <dennis.wagelaar@vub.ac.be> a
Previous Topic:ATL metamodel: conceptual question
Next Topic:Internal Error
Goto Forum:
  


Current Time: Tue Mar 19 03:11:59 GMT 2024

Powered by FUDForum. Page generated in 0.03353 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top