Skip to content

fix: Avoid Deadlock popping ScopeGuards out of order#536

Merged
Swatinem merged 2 commits into
masterfrom
fix/scope-panic
Jan 13, 2023
Merged

fix: Avoid Deadlock popping ScopeGuards out of order#536
Swatinem merged 2 commits into
masterfrom
fix/scope-panic

Conversation

@Swatinem

Copy link
Copy Markdown
Contributor

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

codecov Bot commented Jan 13, 2023

Copy link
Copy Markdown

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.

2 participants