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

DevMode Runtime ClassLoader is never closed #19001

Closed
Sanne opened this issue Jul 26, 2021 · 0 comments · Fixed by #19007
Closed

DevMode Runtime ClassLoader is never closed #19001

Sanne opened this issue Jul 26, 2021 · 0 comments · Fixed by #19007
Labels
area/devmode kind/bug Something isn't working
Milestone

Comments

@Sanne
Copy link
Member

Sanne commented Jul 26, 2021

Describe the bug

Tracing the constructors and close methods on QuarkusClassLoader one can see that during a live-reload this is the sequence of relevant events:

  • start a new "Deployment Class Loader: DEV"
  • stop a "Deployment Class Loader: DEV"
  • start a new "Quarkus Runtime ClassLoader: DEV"

So at each re-deply, two new classloaders are constructed, but only one is being closed. The "Runtime ClassLoader" is never explicitly closed.

It doesn't seem critical: as far as I can tell with limited testing this doesn't seem to result in a real leak, and the classloader is still eventually collected by GC.

The closeTasks runnables that could be registered on a "Quarkus Runtime ClassLoader: DEV" are also not executed, but as far as I can see these are typically an empty list.

ResourceBundle.clearCache is also not being processed, but this also seems harmless in pracice.

@stuartwdouglas could you have a look? Feel free to close if it's intended.

Quarkus version or git rev

main @ dcf7c09377

@Sanne Sanne added kind/bug Something isn't working area/devmode labels Jul 26, 2021
stuartwdouglas added a commit to stuartwdouglas/quarkus that referenced this issue Jul 26, 2021
@quarkus-bot quarkus-bot bot added this to the 2.2 - main milestone Jul 27, 2021
@gsmet gsmet modified the milestones: 2.2 - main, 2.1.1.Final Aug 3, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devmode kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants