-
Notifications
You must be signed in to change notification settings - Fork 844
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
Formatter leaks threads and memory #846
Comments
stiemannkj1
added a commit
to stiemannkj1/google-java-format
that referenced
this issue
Oct 15, 2022
stiemannkj1
added a commit
to stiemannkj1/google-java-format
that referenced
this issue
Oct 15, 2022
stiemannkj1
added a commit
to stiemannkj1/google-java-format
that referenced
this issue
Oct 16, 2022
stiemannkj1
added a commit
to stiemannkj1/google-java-format
that referenced
this issue
Oct 31, 2022
stiemannkj1
added a commit
to stiemannkj1/google-java-format
that referenced
this issue
Feb 3, 2023
stiemannkj1
added a commit
to stiemannkj1/google-java-format
that referenced
this issue
Feb 3, 2023
stiemannkj1
added a commit
to stiemannkj1/google-java-format
that referenced
this issue
Feb 3, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The formatter fails to clean up the threads it creates which leaks the threads themselves (if the formatter is run multiple times) and the memory for the threads.
This also can prevent the JVM to from shutting down because the threads are non-daemon threads.
The reason this leak doesn't usually affect users is probably because users run the formatter via the CLI which calls
System#exit
to kill the JVM process.Steps to Reproduce:
Add this test to
MainTest.java
:Run the test:
If the test fails you'll get an OOM error:
If the test passes the bug is fixed.
The text was updated successfully, but these errors were encountered: