I am having stability problems with OpenCMS. When i do a thread dump, many threads (400) are waiting on the synchronized (m_processingFiles)
block in the following code:
public class CmsJspLoader ... {
...
private static Set m_processingFiles = Collections.synchronizedSet(new HashSet());
...
...
...
public String updateJsp(...) {
....
while (m_processingFiles.contains(jspVfsName)) {
// wait a little bit until the first thread finishes
try {
synchronized (m_processingFiles) {
m_processingFiles.wait(100);
}
} catch (InterruptedException e) {
// ignore
}
}
...
}
...
}
The code is part of OpenCMS.
There is no notify()
anywhere in the code. There is no change of state or reading shared variable inside the shown sync
block.
However, there are 400 threads waiting on it, that means, just to pass through this sync
the last one should wait 40sec!!!
I simply do not understand the purpose of it. Is there something i am not seeing?