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

procstats: bump taskstats and fix file handle leak #176

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

mdlayher
Copy link
Contributor

The taskstats file handle is not being closed and thus it is possible for file descriptors to pile up forever. Pull in a much newer version and fix this problem.

In addition, I don't think the naked returns or check helper are doing any favors for readability and have removed them in this block in favor of switch error handling.

The taskstats file handle is not being closed and thus it is possible for
file descriptors to pile up forever. Pull in a much newer version and
fix this problem.

In addition, I don't think the naked returns or check helper are doing any
favors for readability and have removed them in this block in favor of
switch error handling.

Signed-off-by: Matt Layher <[email protected]>
@kevinburkesegment
Copy link
Contributor

Eek. Thank you. I'm about to go to bed but will review this tomorrow.

@mdlayher
Copy link
Contributor Author

Thanks Kevin!

@kevinburkesegment
Copy link
Contributor

kevinburkesegment commented Dec 19, 2024

Thanks for the PR! I did a quick search and it doesn't seem like we're using this internally, which is both fortunate (it's not like FD's have been piling up unnoticed for 5 years) and probably unfortunate.

@kevinburkesegment kevinburkesegment merged commit 4f64879 into segmentio:main Dec 19, 2024
8 checks passed
@mdlayher mdlayher deleted the mdl-taskstats branch December 19, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants