Skip to content

fix(coderd): avoid deadlock in (*logFollower).follow #7983

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

Merged
merged 1 commit into from
Jun 12, 2023

Conversation

mafredri
Copy link
Member

@mafredri mafredri commented Jun 12, 2023

https://github.com/coder/coder/actions/runs/5246409984/jobs/9475217767?pr=7934

This is mostly an issue due to in memory pubsub, I doubt it is with postgres, but I could be wrong.

We should re-write publish in the in memory pubsub so that the mutex is not held while calling listeners, but we still need to prevent multiple concurrent calls to them (and ensure order).

@mafredri mafredri self-assigned this Jun 12, 2023
@mafredri mafredri requested review from Emyrk and spikecurtis June 12, 2023 18:18
@mafredri mafredri changed the title fix(coderd): Avoid deadlock in (*logFollower).follow fix(coderd): avoid deadlock in (*logFollower).follow Jun 12, 2023
@mafredri mafredri enabled auto-merge (squash) June 12, 2023 18:35
@mafredri mafredri merged commit 4068f70 into main Jun 12, 2023
@mafredri mafredri deleted the mafredri/fix-coderd-logfollower-deadlock branch June 12, 2023 18:38
@github-actions github-actions bot locked and limited conversation to collaborators Jun 12, 2023
@ammario
Copy link
Member

ammario commented Jun 12, 2023

Amazing find!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants