Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: EE-1.8.2.GA_P07
-
Component/s: Framework
-
Labels:None
-
Environment:-
-
Assignee Priority:P2
-
Salesforce Case Reference:
Description
There appears to be an issue with context synchronization in 1.8.2 P06. The exception has no functional impact and is not easily reproduced. Here is the exception:
2013-04-29 09:40:44,866 Session Monitor ERROR com.xxx.as.service.log4j.impl.Log4jConfigurator$UncaughtExceptionHandler.uncaughtException(Log4jConfigurator.java:253) - Detected uncaught exception in thread: Session Monitor
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:810)
at java.util.HashMap$KeyIterator.next(HashMap.java:845)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Monitor.shutdown(SessionDispatcher.java:440)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Monitor.shutdownIfExpired(SessionDispatcher.java:453)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Listener$1.run(SessionDispatcher.java:326)
2013-04-29 09:40:44,866 Session Monitor DEBUG com.xxx.messaging.bmc.oamp.SessionCleaner.sessionDestroyed(SessionCleaner.java:38) - sessionDestroyed ac162d775700-2293736884-1-2066-1-3520-1025511666: Mon Apr 29 09:40:44 CEST 2013
2013-04-29 09:40:44,866 Session Monitor ERROR com.xxx.as.service.log4j.impl.Log4jConfigurator$UncaughtExceptionHandler.uncaughtException(Log4jConfigurator.java:253) - Detected uncaught exception in thread: Session Monitor
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:810)
at java.util.HashMap$KeyIterator.next(HashMap.java:845)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Monitor.shutdown(SessionDispatcher.java:440)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Monitor.shutdownIfExpired(SessionDispatcher.java:453)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Listener$1.run(SessionDispatcher.java:326)
2013-04-29 09:40:44,866 Session Monitor DEBUG com.xxx.messaging.bmc.oamp.SessionCleaner.sessionDestroyed(SessionCleaner.java:38) - sessionDestroyed ac162d775700-2293736884-1-2066-1-3520-1025511666: Mon Apr 29 09:40:44 CEST 2013
Working on fixing the errors in two similar cases (this one and
ICE-9275) as there is no test app and the user says they are hard to produce.It's difficult to even find a Jetty 6 download anymore but I found one here: http://olex.openlogic.com/packages/jetty/6.1.14#package_detail_tabs. We don't currently officially support Jetty 8 (which is mentioned in one of the SalesForce cases) but it would be good to know if that's what they require support for. The issue is that, as of Jetty 7 and up (currently at 9), the Jetty project is now handled by the Eclipse Foundation. They've re-packaged the classes (org.mortbay is now org.eclipse) which is why our Jetty Continuation code doesn't work anymore (it's looking for and using the incorrect classes).
Without a test case or a way to generate the problem the best I could do was make an educated guess as to the solution. For both issues, I've taken the same approach - wrapping the collection and synchronizing access to the collection during iteration. That way there should be no alterations of the collection during iteration which should hopefully mitigate the issues related to what is likely multiple thread access.