mxnet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] squidszyd opened a new issue #12876: Crashes when calling `MXPredFree(handle)`
Date Fri, 19 Oct 2018 09:10:33 GMT
squidszyd opened a new issue #12876: Crashes when calling `MXPredFree(handle)`
URL: https://github.com/apache/incubator-mxnet/issues/12876
 
 
   I encounter `Segmentation Fault` issue when I call `MXPredFree` api to release prediction
handler.
   
   Inside my program, there are two threads. The data thread loads data into buffer and the
main thread looks for available data(batch size = B) in that buffer and select corresponding
handler (initialized with batch size B) to do prediction. Note that when I call `MXPredForward`,
there is a lock that ensure only one thread is calling it. (As far as I know, `MXPred` api
is not thread-safe)
   
   When I stop the program, the main thread starts to loop through every handler and call
`MXPredFree` to release them. However, there are chances (not every time) that my program
crashes. I find that the crash happens at deconstruction of `vector<NDArray>` when the
API calls `delete static_cast<MXAPIPredictor*>(handle)`.
   
   So, under what condition could this happen? Hope someone can help me with this.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message