PaddlePaddle memory leak test=develop#18382
PaddlePaddle memory leak test=develop#18382pawelpiotrowicz wants to merge 1 commit intoPaddlePaddle:developfrom
Conversation
|
What's the backgroud of this PR? Could you give the memory leak case? |
|
@luotao1 In short, fix solves the issue below: SUMMARY: AddressSanitizer: 209193 byte(s) leaked in 8511 allocation(s). |
|
FYI : @jczaja @LeoZhao-Intel |
kbinias
left a comment
There was a problem hiding this comment.
LGTM. Please add only more details about reproduction of the problem.
|
The issue comes from.
|
|
|
|
Could you add more description of this memory-leak?
#18382 (comment), if you change the unit-tests, please paste the patch here. We will have a double check. |
|
@pawelpiotrowicz my understanding is you find this memory leak with applying SANATIZER, can you give more details or general description on why/what this leak happens, it will help us to understand what's real issue. For op_info, there is no such code to delete pointer ? so you use shared_ptr to keep it released at appropriate time for all those places, right? |
|
Answers
only for one instance
both, --with use_ngraph=false and --use_ngraph=true
both, with --use_analysis=false and --use_analysis=true
Yes, destructor doesn't exist. To reproduce these memory leak
Important after applying the current PR, there will still be 2 errors that you can eliminate with PR #18622 |
@luotao1 Here are the reproducible test case for sanitizers. |
|
LGTM |
|
@zhupengyang Could you help reproduce the problem and verify whether PR fix the error?
|
|
|
Thanks for @zhupengyang double-check work! |
|
@pawelpiotrowicz Thanks for your work. So that I don't think we should use smart point here. |
|
@chengduoZH @luotao1 In my opinion issue definitely must be solved, in future if we got advanced issue we will play with the noises from this issue, so the perspective to find real reason of error might be more complex for developer. If we can fix any warning/issue we should do this asap to make process pure. Smart pointer should be used here to prevent a way when use case will be changed. |
|
@pawelpiotrowicz Thanks for your reply, if you want to fix this warning, I prefer to add destructive function in |
Why? Do we have any reason to do this? |
Since paddlepaddle is cross-platform framework, there was a concern that some compilers on specific platform may not support smart pointer well. That's one of the reason to use deconstruction I guess. |
Yes, it is. We may support some other language interface later. |
|
@pawelpiotrowicz Hi, pawel Do you still want to merge this PR? If yes, please update your PR by following Baidu's comments. If not, please close this PR. @kbinias |
|
close |
|
Since you haven't replied for more than a year, we have closed this issue/pr. |


@luotao1 @kbinias