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

Potential goroutine leak in readbuffer #69

Open
moio opened this issue Feb 28, 2024 · 0 comments
Open

Potential goroutine leak in readbuffer #69

moio opened this issue Feb 28, 2024 · 0 comments

Comments

@moio
Copy link
Contributor

moio commented Feb 28, 2024

If a deadline is set, r.cond.Broadcast() is called without obtaining a lock and that opens up the posibility of a race where the broadcast could be called first, and r.cond.Wait() would miss it, potentially leading to a blocked goroutine.

t = time.AfterFunc(r.deadline.Sub(now), func() { r.cond.Broadcast() })

This is a follow up from the following PR review discussion: #68 (comment). So far, it was not observed in Rancher user installations

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

No branches or pull requests

2 participants