Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix db listener deadlock #476

Merged
merged 1 commit into from
Dec 31, 2020

Conversation

dgtony
Copy link
Contributor

@dgtony dgtony commented Dec 17, 2020

Signed-off-by: Anton Dort-Golts dortgolts@gmail.com

Signed-off-by: Anton Dort-Golts <dortgolts@gmail.com>
@sanderpick
Copy link
Member

Hey @dgtony, what's the scenario where you're seeing the deadlock?

@dgtony
Copy link
Contributor Author

dgtony commented Dec 17, 2020

Just closing the DB as follows:

DB.Close() -> d.stateChangedNotifee.close() -> acquire notifee lock -> listener.Close() -> stateChangedNotifee.remove() -> try to re-enter notifee lock

Copy link
Member

@sanderpick sanderpick left a comment

Choose a reason for hiding this comment

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

Sorry for the delay here... LGTM

@sanderpick sanderpick merged commit 717c3d9 into textileio:master Dec 31, 2020
@dgtony dgtony deleted the fix/db-listener-deadlock branch January 19, 2021 14:58
@dgtony dgtony mentioned this pull request Feb 25, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants