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(nodedb): prevent deadlock by releasing DeleteVersionsFrom mutex on error #843

Conversation

odeke-em
Copy link
Contributor

Noticed during an audit that there can be a deadlock resulting from an unreleased mutex if there happens to be a newer version with one or more concurrent readers.

Fixes #842

…n error

Noticed during an audit that there can be a deadlock resulting from
an unreleased mutex if there happens to be a newer version with one or
more concurrent readers.

Fixes cosmos#842
@odeke-em odeke-em force-pushed the nodedb-prevent-deadlock-from-unreleased-mutex-on-DeleteVersionsFrom-error branch from 13a7f47 to a55ac33 Compare October 16, 2023 09:27
@odeke-em odeke-em changed the title nodedb: prevent deadlock by releasing DeleteVersionsFrom mutex on error fix(nodedb): prevent deadlock by releasing DeleteVersionsFrom mutex on error Oct 16, 2023
@testinginprod testinginprod self-requested a review October 17, 2023 11:07
Copy link

@testinginprod testinginprod left a comment

Choose a reason for hiding this comment

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

Change is reasonable to me!

@tac0turtle tac0turtle merged commit 10c9f1e into cosmos:master Oct 17, 2023
8 checks passed
@tac0turtle
Copy link
Member

@Mergifyio backport release/v1.x.x

@mergify
Copy link
Contributor

mergify bot commented Oct 17, 2023

backport release/v1.x.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Oct 17, 2023
tac0turtle pushed a commit that referenced this pull request Oct 17, 2023
…n error (backport #843) (#844)

Co-authored-by: Emmanuel T Odeke <emmanuel@orijtech.com>
@odeke-em odeke-em deleted the nodedb-prevent-deadlock-from-unreleased-mutex-on-DeleteVersionsFrom-error branch October 17, 2023 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nodeDb.DeleteVersionsFrom can leave mutex locked indefinitely hence a deadlock
4 participants