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

Listen/Unlisten race in Pubsub #15312

Closed
Closed
Assignees
spikecurtis
Labels
s2Broken use cases or features (with a workaround). Only humans may set this.
@spikecurtis

Description

@spikecurtis

spotted while reviewing#15303

In thePubsub, we can't hold theqMu lock while callingListen orUnlisten on thepgListener, because this lock is also held while delivering notifications. This was the source of a Pubsub deadlock (#11950) that we fixed in#12518. However, that fix leaves us with a new race condition that goes like this:

We have a single subscriber to some event, and they cancel their subscription. Concurrently, we get a new Subscribe call for the same event. Since we don't hold a lock while callingListen andUnlisten, these could happen in any order. IfUnlisten is called last, the new subscriber won't get any events.

Metadata

Metadata

Assignees

Labels

s2Broken use cases or features (with a workaround). Only humans may set this.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp