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: Avoid Deadlock popping ScopeGuards out of order #536

Merged
merged 2 commits into from Jan 13, 2023

Conversation

Swatinem
Copy link
Member

The ScopeGuard panics when it is being dropped out of order. Previously it would do so while holding the Scope/stack RwLock. The PanicIntegration would also try to acquire that same lock in order to capture the resulting panic, resulting in a deadlock or a double-panic in case the RwLock implementation detected the deadlock.

The `ScopeGuard` panics when it is being dropped out of order.
Previously it would do so while holding the Scope/stack `RwLock`.
The `PanicIntegration` would also try to acquire that same lock in
order to capture the resulting panic, resulting in a deadlock or a
double-panic in case the `RwLock` implementation detected the deadlock.
@Swatinem Swatinem requested a review from a team January 13, 2023 12:39
@codecov
Copy link

codecov bot commented Jan 13, 2023

Codecov Report

Merging #536 (595bc0e) into master (104cfae) will increase coverage by 1.48%.
The diff coverage is 100.00%.

❗ Current head 595bc0e differs from pull request most recent head 9cb4a3d. Consider uploading reports for the commit 9cb4a3d to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #536      +/-   ##
==========================================
+ Coverage   69.53%   71.01%   +1.48%     
==========================================
  Files          66       66              
  Lines        6577     6575       -2     
==========================================
+ Hits         4573     4669      +96     
+ Misses       2004     1906      -98     

@Swatinem Swatinem enabled auto-merge (squash) January 13, 2023 15:06
@Swatinem Swatinem merged commit 0e92db7 into master Jan 13, 2023
@Swatinem Swatinem deleted the fix/scope-panic branch January 13, 2023 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants