dlr-gtlab / python-module

GTlab Module for embadding Python into GTlab
0 stars 0 forks source link

Temporary memory leak in findGtTask #264

Closed rainman110 closed 4 months ago

rainman110 commented 8 months ago

This bug was discovered by @haes_ja during a real world GTlab session, where the memory increased to more than 30 GB RAM:

A quick analysis shows, that the function creates a copy of the task and appends it to the python task, see https://gitlab.dlr.de/at-twk/gtlab-python-module/-/blame/1-0-8/src/module/utilities/gtpy_processdatadistributor.cpp#L52. Hence the python task becomes larger and larger during its runtime.

My suggestion: don't append it to the python task but return the ownership of the task to python instead.

@marvinoe21 What is the intention to add the temporary copies to the python task? Just, to keep ownership at the C++ side?

rainman110 commented 8 months ago

created branch 261-possible-memory-leak-in-findgttask to address this issue

rainman110 commented 8 months ago

mentioned in commit 2ad4a1d7391df0423dbc5319aed193d3abccf719

rainman110 commented 8 months ago

mentioned in commit 733eece5ab5a815bc5526f0b78e96ecdaf6b4fa8

rainman110 commented 8 months ago

mentioned in commit 292a063f5755ea414edd27b08b6a5230af8fed48

rainman110 commented 7 months ago

mentioned in commit 27753ee31c1b100512c9624eab374b81f106ae53

rainman110 commented 6 months ago

In GitLab by @jensschmeink on Apr 25, 2024, 07:23

mentioned in commit 9e2fa40cbebff9d52c1ba11ab613fe6d815af05c