Skip to content

errutil: fix deadlock#6949

Merged
MichaHoffmann merged 1 commit intomainfrom
fix_errutil_deadlock
Dec 1, 2023
Merged

errutil: fix deadlock#6949
MichaHoffmann merged 1 commit intomainfrom
fix_errutil_deadlock

Conversation

@GiedriusS
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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