Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

[1.x] Fix race condition in NaiveEngine::PushAsync - #19122

Merged
szha merged 1 commit into
apache:v1.xfrom
leezu:1xnaiveenginepushasync
Sep 13, 2020
Merged

[1.x] Fix race condition in NaiveEngine::PushAsync#19122
szha merged 1 commit into
apache:v1.xfrom
leezu:1xnaiveenginepushasync

Conversation

@leezu

@leezu leezu commented Sep 11, 2020

Copy link
Copy Markdown
Contributor

Backport #19108

* 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
@leezu
leezu requested a review from samskalicky September 11, 2020 23:04
@mxnet-bot

Copy link
Copy Markdown

Hey @leezu , Thanks for submitting the PR
All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands:

  • To trigger all jobs: @mxnet-bot run ci [all]
  • To trigger specific jobs: @mxnet-bot run ci [job1, job2]

CI supported jobs: [website, windows-gpu, miscellaneous, edge, centos-cpu, unix-cpu, centos-gpu, sanity, unix-gpu, windows-cpu, clang]


Note:
Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin.
All CI tests must pass before the PR can be merged.

@leezu leezu mentioned this pull request Sep 11, 2020

@samskalicky samskalicky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@leezu

leezu commented Sep 11, 2020

Copy link
Copy Markdown
Contributor Author

@mxnet-bot run ci [centos-gpu]

@mxnet-bot

Copy link
Copy Markdown

Jenkins CI successfully triggered : [centos-gpu]

@szha
szha merged commit 8b56874 into apache:v1.x Sep 13, 2020
@leezu
leezu deleted the 1xnaiveenginepushasync branch September 13, 2020 22:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

4 participants