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

errutil: fix deadlock #6949

Merged
merged 1 commit into from
Dec 1, 2023
Merged

errutil: fix deadlock #6949

merged 1 commit into from
Dec 1, 2023

Conversation

GiedriusS
Copy link
Member

Fix deadlock in the Add() function - it accidentally was calling itself recursively. This struct wraps a MultiError so we need to call Add() on that MultiError inside.

This deadlock can manifest in Receive - million+ leaking goroutines, all stuck on the MultiTSDB lock.

@GiedriusS GiedriusS marked this pull request as ready for review December 1, 2023 11:51
MichaHoffmann
MichaHoffmann previously approved these changes Dec 1, 2023
Copy link
Contributor

@MichaHoffmann MichaHoffmann left a comment

Choose a reason for hiding this comment

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

lgtm

Fix deadlock in the Add() function - it accidentally was calling itself
recursively. This struct wraps a `MultiError` so we need to call `Add()`
on that `MultiError` inside.

This deadlock can manifest in Receive - million+ leaking goroutines, all
stuck on the MultiTSDB lock.

Signed-off-by: Giedrius Statkevičius <[email protected]>
Copy link
Contributor

@MichaHoffmann MichaHoffmann left a comment

Choose a reason for hiding this comment

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

LGTM!

@MichaHoffmann MichaHoffmann merged commit e78091b into main Dec 1, 2023
20 checks passed
@GiedriusS GiedriusS deleted the fix_errutil_deadlock branch December 1, 2023 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants