-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Fix race condition in NaiveEngine::PushAsync #19108
Conversation
This fixes a race condition in which NaiveEngine::PushAsync was checking if the the async_fun had completed by the end of NaiveEngine::PushAsync. If async_fun hadn't completed yet, NaiveEngine::PushAsync would set an internal error string and deallocate the callback, causing segfault in async_fun once it would attempt calling the callback.
Hey @leezu , Thanks for submitting the PR
CI supported jobs: [website, miscellaneous, windows-cpu, windows-gpu, centos-gpu, clang, edge, unix-cpu, unix-gpu, centos-cpu, sanity] Note: |
@mxnet-bot run ci [all] |
1 similar comment
@mxnet-bot run ci [all] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@mxnet-bot run ci [windows-gpu] |
Jenkins CI successfully triggered : [windows-gpu] |
@mxnet-bot run ci [windows-gpu] |
Jenkins CI successfully triggered : [windows-gpu] |
NVIDIA/thrust#1090 comes back with high frequency in this PR... 10 compilation attempts in a row failed (each CI run attempts compilation 5 times before giving up). |
@mxnet-bot run ci [windows-gpu] |
Jenkins CI successfully triggered : [windows-gpu] |
@mxnet-bot run ci [windows-gpu] |
Jenkins CI successfully triggered : [windows-gpu] |
* Wait for async_fun to complete in NaiveEngine::PushAsync This fixes a race condition in which NaiveEngine::PushAsync was checking if the the async_fun had completed by the end of NaiveEngine::PushAsync. If async_fun hadn't completed yet, NaiveEngine::PushAsync would set an internal error string and deallocate the callback, causing segfault in async_fun once it would attempt calling the callback. * Update naive_engine.cc
* Wait for async_fun to complete in NaiveEngine::PushAsync This fixes a race condition in which NaiveEngine::PushAsync was checking if the the async_fun had completed by the end of NaiveEngine::PushAsync. If async_fun hadn't completed yet, NaiveEngine::PushAsync would set an internal error string and deallocate the callback, causing segfault in async_fun once it would attempt calling the callback. * Update naive_engine.cc
* Wait for async_fun to complete in NaiveEngine::PushAsync This fixes a race condition in which NaiveEngine::PushAsync was checking if the the async_fun had completed by the end of NaiveEngine::PushAsync. If async_fun hadn't completed yet, NaiveEngine::PushAsync would set an internal error string and deallocate the callback, causing segfault in async_fun once it would attempt calling the callback. * Update naive_engine.cc
Wait for async_fun to complete in NaiveEngine::PushAsync.
This fixes a race condition in which NaiveEngine::PushAsync was checking if the
the async_fun had completed by the end of NaiveEngine::PushAsync scope.
If async_fun hadn't completed yet, NaiveEngine::PushAsync would set an internal error string
and deallocate the callback, causing segfault in async_fun once it would attempt
calling the callback.