I am encountering this issue as well. There are many threads stuck on the line

at java.util.WeakHashMap.get(WeakHashMap.java:380)
	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:55)


The version of java I'm using:

java -version
java version "1.6.0_30"
OpenJDK Runtime Environment (IcedTea6 1.13.1) (6b30-1.13.1-1ubuntu2~0.12.04.1)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)

Jenkins version:
Jenkins ver. 1.557

It seems as if the same WeakHashMap instance is being used by multiple threads, and since in the documentation for WeakHashMap it says

http://docs.oracle.com/javase/7/docs/api/java/util/WeakHashMap.html

Like most collection classes, this class is not synchronized. A synchronized WeakHashMap may be constructed using the Collections.synchronizedMap method.

It seems like you should be using Collections.synchronizedMap on this or you should prboably use
http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/cache/CacheBuilder.html
which allows for weak keys and is thread safe.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to