Details
-
Bug
-
Resolution: Fixed
-
Low
-
3.2.1
-
3.02
-
Description
The problem is that the map is static so the synchronised init method does very little. Thus multiple threads can start initing the Map causing a huge CPU load. The threads are stuck in:
"ApplicationServerThread" prio=1 tid=0x084d9cf8 nid=0x7932 runnable [9c97c000..9c97e86c]
at java.util.HashMap.put(HashMap.java:382)
at com.atlassian.jira.web.util.HelpUtil.loadExternalProperties(HelpUtil.java:105)
at com.atlassian.jira.web.util.HelpUtil.init(HelpUtil.java:45)
- locked <0xa17857e8> (a com.atlassian.jira.web.util.HelpUtil)
at com.atlassian.jira.web.util.HelpUtil.<init>(HelpUtil.java:36)
at com.atlassian.jira.web.util.HelpUtil.<init>(HelpUtil.java:31)
Need to synchronise on the class rather than the object to ensure only one thread can init the static map.