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

blockmanager: address filter header tip lock inconsistency #155

Merged
merged 2 commits into from
Jun 20, 2019
Merged

blockmanager: address filter header tip lock inconsistency #155

merged 2 commits into from
Jun 20, 2019

Conversation

wpaulino
Copy link
Contributor

@wpaulino wpaulino commented Jun 12, 2019

There was a previous assumption that filterHeaderTip and filterHeaderTipHash were only being accessed within the cfHandler goroutine. This is no longer the case, as we require the filter header
tip in order to deliver a backlog of notifications for block notification subscribers.

We also establish a locking order when needing to acquire both newHeadersMtx and newFilterHeadersMtx in certain cases.

This attempts to address a deadlock found in this goroutine dump.

There was a previous assumption that filterHeaderTip and
filterHeaderTipHash were only being accessed within the cfHandler
goroutine. This is no longer the case, as we require the filter header
tip in order to deliver a backlog of notifications for block
notification subscribers.

We also establish a locking order when needing to acquire both
newHeadersMtx and newFilterHeadersMtx in certain cases.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 68.547% when pulling e9f6be1 on wpaulino:filter-header-tip-lock into 98b149c on lightninglabs:master.

Copy link
Contributor

@halseth halseth left a comment

Choose a reason for hiding this comment

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

LGTM 🔥

@halseth halseth merged commit 32af2fb into lightninglabs:master Jun 20, 2019
@wpaulino wpaulino deleted the filter-header-tip-lock branch June 21, 2019 00:36
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

3 participants