Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix use after free in tensorpipe agent #87627

Closed
wants to merge 1 commit into from

Conversation

H-Huang
Copy link
Member

@H-Huang H-Huang commented Oct 24, 2022

Stack from ghstack:

Fixes #87359, which identifies use after free for reverse device maps. This is only in the dynamic RPC feature and not effecting stable RPC code path.

Unfortunately the test TensorPipeRpcTest.test_dynamic_rpc_existing_rank_can_communicate_with_new_rank_cuda that is failing is also running into separate issue. I've temporarily disabled some of the test code to investigate the error in asychronously.

Testing plan:

  • tested all the dynamic RPC tests

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 24, 2022

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/87627

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures, 1 Pending

As of commit 16ec408:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the release notes: distributed (rpc) release notes category label Oct 24, 2022
H-Huang added a commit that referenced this pull request Oct 24, 2022
ghstack-source-id: ace0cb559dcc62fc68e0fffe0db0152c0d6633df
Pull Request resolved: #87627
@H-Huang
Copy link
Member Author

H-Huang commented Oct 24, 2022

cc @Flamefire

@H-Huang H-Huang added the topic: bug fixes topic category label Oct 24, 2022
@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 24, 2022
@H-Huang
Copy link
Member Author

H-Huang commented Oct 24, 2022

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

if (reverseDeviceMaps.find(it->first) == reverseDeviceMaps.end()) {
it = reverseDeviceMaps_.erase(it);
} else {
it++;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note that it++ creates a temporary copy while ++it does not

sgrigory pushed a commit to sgrigory/pytorch that referenced this pull request Oct 28, 2022
Fixes pytorch#87359, which identifies use after free for reverse device maps. This is only in the dynamic RPC feature and not effecting stable RPC code path.

Unfortunately the test `TensorPipeRpcTest.test_dynamic_rpc_existing_rank_can_communicate_with_new_rank_cuda` that is failing is also running into separate issue. I've temporarily disabled some of the test code to investigate the error in asychronously.

Testing plan:
- tested all the dynamic RPC tests
Pull Request resolved: pytorch#87627
Approved by: https://github.com/rohan-varma
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Nov 5, 2022
Fixes pytorch#87359, which identifies use after free for reverse device maps. This is only in the dynamic RPC feature and not effecting stable RPC code path.

Unfortunately the test `TensorPipeRpcTest.test_dynamic_rpc_existing_rank_can_communicate_with_new_rank_cuda` that is failing is also running into separate issue. I've temporarily disabled some of the test code to investigate the error in asychronously.

Testing plan:
- tested all the dynamic RPC tests
Pull Request resolved: pytorch#87627
Approved by: https://github.com/rohan-varma
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Dec 10, 2022
Fixes pytorch#87359, which identifies use after free for reverse device maps. This is only in the dynamic RPC feature and not effecting stable RPC code path.

Unfortunately the test `TensorPipeRpcTest.test_dynamic_rpc_existing_rank_can_communicate_with_new_rank_cuda` that is failing is also running into separate issue. I've temporarily disabled some of the test code to investigate the error in asychronously.

Testing plan:
- tested all the dynamic RPC tests
Pull Request resolved: pytorch#87627
Approved by: https://github.com/rohan-varma
@facebook-github-bot facebook-github-bot deleted the gh/H-Huang/89/head branch June 8, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged release notes: distributed (rpc) release notes category topic: bug fixes topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants