Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix deadlock in subscription teardown
Summary: In speaking with jbower earlier today, he said that he'd noticed correlation between this fault and the webserver crashing. Since the webserver may have multiple subscriptions this gave me some inspiration for the integration test to try to reproduce this. The issue is a race condition: if multiple different client sessions are terminated at the same time then it is possible for the `~Subscriber` destructor to end up holding the final reference to some other `Subscriber` instance and thus end up recursing into its `~Subscriber` and deadlock while attempting to re-acquire the wlock that is already held by the current thread. Reviewed By: chadaustin Differential Revision: D7178797 fbshipit-source-id: 540728d76ade29ea0bcf4716a71b7055966e401e
- Loading branch information
1 parent
620ee5a
commit 5dfcdd9
Showing
3 changed files
with
48 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters