-
Notifications
You must be signed in to change notification settings - Fork 608
Serialize destruction of the delegate #5996
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/5996
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit e0e1c6f with merge base e540bcb ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D63917052 |
2d018f9
to
1ff960a
Compare
Summary: When workspace sharing is enabled, if we call `destroy()` from multiple threads it is possible that we enter in `xnn_delete_runtime` from multiple threads. It is not safe to do so, and can cause double free. This serializes the destroy calls for the singleton backend object if/when called multiple times. Not locking in the failure case because we may not have a real memory to free i.e. empty workspace? Differential Revision: D63917052
This pull request was exported from Phabricator. Differential Revision: D63917052 |
Summary: When workspace sharing is enabled, if we call `destroy()` from multiple threads it is possible that we enter in `xnn_delete_runtime` from multiple threads. It is not safe to do so, and can cause double free. This serializes the destroy calls for the singleton backend object if/when called multiple times. Not locking in the failure case because we may not have a real memory to free i.e. empty workspace? Differential Revision: D63917052
1ff960a
to
bd5bc8a
Compare
This pull request was exported from Phabricator. Differential Revision: D63917052 |
Summary: When workspace sharing is enabled, if we call `destroy()` from multiple threads it is possible that we enter in `xnn_delete_runtime` from multiple threads. It is not safe to do so, and can cause double free. This serializes the destroy calls for the singleton backend object if/when called multiple times. Not locking in the failure case because we may not have a real memory to free i.e. empty workspace? Differential Revision: D63917052
bd5bc8a
to
e0e1c6f
Compare
This pull request was exported from Phabricator. Differential Revision: D63917052 |
This pull request has been merged in 566902b. |
@pytorchbot cherry-pick --onto release/0.4 -c regression |
Summary: Pull Request resolved: #5996 When workspace sharing is enabled, if we call `destroy()` from multiple threads it is possible that we enter in `xnn_delete_runtime` from multiple threads. It is not safe to do so, and can cause double free. This serializes the destroy calls for the singleton backend object if/when called multiple times. Not locking in the failure case because we may not have a real memory to free i.e. empty workspace? Reviewed By: digantdesai Differential Revision: D63917052 fbshipit-source-id: 61e6b1c54f887a54501a4fd3433f8470e74dbca3 (cherry picked from commit 566902b)
Cherry picking #5996The cherry pick PR is at #6111 and it is recommended to link a regression cherry pick PR with an issue. The following tracker issues are updated: Details for Dev Infra teamRaised by workflow job |
Serialize destruction of the delegate (#5996) Summary: Pull Request resolved: #5996 When workspace sharing is enabled, if we call `destroy()` from multiple threads it is possible that we enter in `xnn_delete_runtime` from multiple threads. It is not safe to do so, and can cause double free. This serializes the destroy calls for the singleton backend object if/when called multiple times. Not locking in the failure case because we may not have a real memory to free i.e. empty workspace? Reviewed By: digantdesai Differential Revision: D63917052 fbshipit-source-id: 61e6b1c54f887a54501a4fd3433f8470e74dbca3 (cherry picked from commit 566902b) Co-authored-by: Gregory Comer <[email protected]>
Summary:
When workspace sharing is enabled, if we call
destroy()
from multiple threads it is possible that we enter inxnn_delete_runtime
from multiple threads. It is not safe to do so, and can cause double free. This serializes the destroy calls for the singleton backend object if/when called multiple times.Not locking in the failure case because we may not have a real memory to free i.e. empty workspace?
Differential Revision: D63917052