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

backports/1.0: exporter: fix hang when exporter fails to start #2314

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

willfindlay
Copy link
Contributor

[upstream commit: 44bd44c]

The Exporter.Start() implementation uses a WaitGroup to wait until the exporter is ready after launching it in a goroutine. Unfortunately, this WaitGroup never gets set to Done when we encounter an error while starting the exporter. This ultimately causes the Tetragon process to hang indefinitely. Fix the issue by simply calling readyWG.Done() when we encounter an error here.

Fix a hang when the exporter fails to start.

[upstream commit: 44bd44c]

The Exporter.Start() implementation uses a WaitGroup to wait until the exporter is ready after launching it in a goroutine. Unfortunately, this WaitGroup never gets set to Done when we encounter an error while starting the exporter. This ultimately causes the Tetragon process to hang indefinitely. Fix the issue by simply calling readyWG.Done() when we encounter an error here.

Signed-off-by: William Findlay <will@isovalent.com>
@willfindlay willfindlay added the kind/bug Something isn't working label Apr 8, 2024
@willfindlay willfindlay requested a review from a team as a code owner April 8, 2024 14:08
@willfindlay willfindlay requested review from olsajiri and removed request for a team April 8, 2024 14:08
@mtardy mtardy added the release-note/bug This PR fixes an issue in a previous release of Tetragon. label Apr 8, 2024
Copy link
Member

@mtardy mtardy left a comment

Choose a reason for hiding this comment

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

Thanks for the backport, let's merge that and release v1.0.3!

@mtardy mtardy removed the request for review from olsajiri April 8, 2024 14:09
@mtardy mtardy merged commit 964bd00 into v1.0 Apr 8, 2024
26 of 28 checks passed
@mtardy mtardy deleted the backports/willfindlay/2119 branch April 8, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working release-note/bug This PR fixes an issue in a previous release of Tetragon.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants