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

[MetadataHelper] Close stream opened to read app properties #338

Merged
merged 2 commits into from
Nov 10, 2020

Conversation

olivielpeau
Copy link
Member

@olivielpeau olivielpeau commented Nov 10, 2020

In order to fix a memory leak.

The memory leak only started to be visible with the changes in #330 because it started calling this version logic regularly to report JMXFetch's version to the Agent, whereas this logic was previously only called once in a JMXFetch's process lifecycle (either for the version command, or to log the version once at startup)

Copy link
Member

@truthbk truthbk left a comment

Choose a reason for hiding this comment

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

We should definitely close that input stream, agreed. Nice catch.

I'm not sure why we're not leaking file descriptors though.... Nor why I saw threads leaking.

@olivielpeau olivielpeau added this to the 0.40.2 milestone Nov 10, 2020
Copy link
Member

@truthbk truthbk left a comment

Choose a reason for hiding this comment

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

There's at least one more problem coming from a thread leak in java-dogstatsd-client. That will be addressed in a separate PR there.

Thanks! 🙇

@truthbk truthbk merged commit a2462a1 into master Nov 10, 2020
@truthbk truthbk deleted the olivielpeau/close-properties-stream branch November 10, 2020 23:43
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.

None yet

2 participants