-
Notifications
You must be signed in to change notification settings - Fork 87
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
MemoryLeak in JavaConsole and KeystorePasswordAttempter? #893
Comments
With enabled debug-output in OpenWebStart I was able to trackdown the memory-leak in KeystorePasswordAttempter
KeystorePasswordAttempter uses a HashMap to cache Keystores but due to some missing files in AdoptOpenJDK
there is alway a new keystore created and because KeyStore has not implemented hashCode and KeyStore.getInstance("JKS") IcedTea-Web/core/src/main/java/net/sourceforge/jnlp/security/KeystorePasswordAttempter.java Line 161 in d61daea
For testing I've just created an empty keystore and copied it into the expected locations
after that the https-requests where significantly slower but memory was stable. |
@AlBundy33 Thanks for reporting. We are investigating. |
fyi as workaround we've created a thread that every five minutes clears the affected maps (rawData in Console and sucsessfulByKeystore in Attempter). For now it seems to work without impact. I know that disabling the console would help but we tried to avoid rollouts of new configurations on customerside. Feel free to ask if you need more informations. |
I was able to debug the problem on the customer system
The loaded jars are always to and the loaded "class" is always The two jars and a few others containing an INDEX.LIST and only the two cars containing entries like this:
I'll try to remove the INDEX.LIST from the JAR files an see what happens [edit] hopefully the stacktrace gives you the right direction. |
I've downloaded the proxy.pac and removed nearly all entries.
with this not
This is strange because both are returning always DIRECT 🤔 A workaround for this issue could be to simply not cache default-passwords in KeystorePasswordAttempter by changing
to
This does not fix the problem but results (at least on the customer system) on an empty successfulPerKeystore because there are only keystores with the default password. |
Thanks for your analysis and hints. We will investigate further and fix in a future release |
@janakmulani #904 fixes only the memory leak in KeystorePasswordAttempter. |
I've already created an issue in karakun/OpenWebStart#530 but maybe this issue is more related to ITW?
It seems that there is no memory limit for JavaConsole because it grows until there is no memory left.
-> may a default limit would help here to prevent OutOfMemory-Exceptions
It seems that this can be workaround with setting the console to deactivated (this is a setting in OpenWebStart - but I would assume ITW has this too)
Additional there is also a class KeystorePasswordAttempter that wastes a lot of memory and cannot be garbage collected.
The customer pc has a proxy configured that needs authentication and it seems that for each connection to an https-url more and more memory is occupied from the mentioned two classes.
The text was updated successfully, but these errors were encountered: