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

fix: healthcheckv2extension: fix deadlock in case of an error in http server start #38269

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lim123123123
Copy link

Description

The current implementation uses a channel for graceful shutdown, but it doesn't work in case of an error during socket binding. Since the goroutine that writes to that channel is never created, it causes a deadlock in Shutdown.

This is a minor issue, but it annoys me. Each time I forget to shut down the previous debug session, the new one freezes (since the address is already in use, causing an error in Start).

Link to tracking issue

Fixes
Since this is a really small problem, I didn't create an issue. Let me know if it's required, and I'll create one.

Testing

I've added a unit test that fails with the current implementation but works with the fix.

@lim123123123 lim123123123 requested review from jpkrohling, mwear and a team as code owners February 28, 2025 14:40
Copy link

linux-foundation-easycla bot commented Feb 28, 2025

CLA Missing ID CLA Not Signed

@lim123123123 lim123123123 force-pushed the k.garmanov/healthcheckv2-shutdown-fix branch from fbf5cb3 to 215d8af Compare February 28, 2025 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants