KellenSunderland commented on issue #13265: MXNet C++Interface reasoning leads 
to CPU memory leak
URL: 
https://github.com/apache/incubator-mxnet/issues/13265#issuecomment-460084470
 
 
   I tried to reproduce the memory leak with an ASAN build and don't see 
anything that jumps out as a leak.  There's a number of data structures 
allocated and then not released, but these structures don't seem to increase 
over time/iterations.
   
   My could sample runs a simplification of the image-classification demo.  A 
snippet of the code tested for leaks is here: 
https://github.com/apache/incubator-mxnet/blob/8e2c0adb61b5f5ceee4d090f1413c8697a61e008/example/image-classification/predict-cpp/image-classification-predict.cc
   
   The results reported by ASAN are here: 
http://jenkins.mxnet-ci.amazon-ml.com/blue/rest/organizations/jenkins/pipelines/mxnet-validation/pipelines/miscellaneous/branches/PR-13917/runs/14/nodes/137/log/?start=0
   
   What I would expect to see if there was a genuine leak in my code would be 
an ASAN leak summary that would report leaked objects that are some multiple of 
'1234', my iteration size.  I don't see any objects that look like they were 
leaked as part of a MXPredCreate/MXPredForward/MXPredFree iteration.
   
   What I did notice is that the image-classification sample has a buffer 
overflow as a result of not properly null-terminating the char* array 
containing the symbolic graph description.  I'll see if I can submit a PR to 
fix that, and if anyone is basing their code on this sample please make sure 
that the symbol buffer you pass into MXPredCreate is null terminated.
   
   If others are still having problems with leaks, would you be able to post a 
small sample that replicates the leak?  That way others can have a look at your 
specific sample to determine where this leak is coming from.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to