Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: stop holding Pubsub mutex while calling pq.Listener#12518

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
spikecurtis merged 1 commit intomainfromspike/11950-fix-deadlock
Mar 12, 2024

Conversation

spikecurtis
Copy link
Contributor

@spikecurtisspikecurtis commentedMar 11, 2024
edited
Loading

fixes#11950

#11950 (comment) explains the bug

We were also calling intoUnlisten() andClose() while holding the mutex. I don't believe thatClose() depends on the notification loop being unblocked, but it's hard to be sure, and the safest thing to do is assume it could block.

So, I added a unit test that fakes outpq.Listener and sends a bunch of notifies every time we call into it to hopefully prevent regression where we hold the mutex while calling into these functions.

It also removes the use of acontext.Context to stop the PubSub -- it must be explicitlyClosed(). This simplifies a bunch of the logic, and is how we use the pubsub anyway.

@spikecurtisGraphite App
Copy link
ContributorAuthor

This stack of pull requests is managed by Graphite.Learn more about stacking.

Join@spikecurtis and the rest of your teammates onGraphiteGraphite

@spikecurtisspikecurtis marked this pull request as ready for reviewMarch 11, 2024 11:55
@spikecurtisspikecurtisforce-pushed thespike/11950-fix-deadlock branch 2 times, most recently frome3c30f7 to194eb5fCompareMarch 11, 2024 13:04
Copy link
Member

@kylecarbskylecarbs left a comment

Choose a reason for hiding this comment

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

Amazing you were able to find this. Happy the test keeps it from ever happening again!

@spikecurtisspikecurtisforce-pushed thespike/11950-fix-deadlock branch from194eb5f to79b2e92CompareMarch 12, 2024 05:25
@spikecurtisspikecurtis merged commit5170744 intomainMar 12, 2024
@spikecurtisspikecurtis deleted the spike/11950-fix-deadlock branchMarch 12, 2024 05:44
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMar 12, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@kylecarbskylecarbskylecarbs approved these changes

@deansheatherdeansheatherdeansheather approved these changes

Assignees

@spikecurtisspikecurtis

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

PGCoord fails to get pubsub updates
3 participants
@spikecurtis@kylecarbs@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp