Bug 1134966
Summary: | (6.3.1) (Regression) Mojarra 2.1.28-redhat-5 causes ConcurrentModificationExceptions on OpenJDK 1.6 and IBM JDK 1.6 | ||
---|---|---|---|
Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Ron Šmeral <rsmeral> |
Component: | JSF | Assignee: | Farah Juma <fjuma> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Ron Šmeral <rsmeral> |
Severity: | urgent | Docs Contact: | Russell Dickenson <rdickens> |
Priority: | unspecified | ||
Version: | 6.3.1 | CC: | amelicha, bbaranow, jawilson, ppitonak, rsvoboda, ssilvert |
Target Milestone: | CR2 | Keywords: | Regression |
Target Release: | EAP 6.3.1 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-10-13 18:38:58 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1102082, 1135905, 1138921 |
Description
Ron Šmeral
2014-08-28 14:14:56 UTC
Note that the only difference between the Mojarra 2.1.28-redhat-3 version and the Mojarra 2.1.28-redhat-5 version is that the logicalMap in ServerSideStateHelper.java was wrapped with a Collections.SynchronizedMap (bug 1105280). These ConcurrentModificationExceptions are occurring only on OpenJDK 1.6 and IBM JDK 1.6 because of a difference in the implementation of the java.util.Collections.SynchronizedMap#equals(Object o) method. In particular, in Oracle JDK 1.6 and in the JDK 1.7 versions, there's a check at the beginning of the method to see if this == o, as shown below. Note that the java.util.AbstractMap.equals(Object o) method will only be called if this check fails. http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7u40-b43/java/util/Collections.java?av=f#2081 In the OpenJDK 1.6 and IBM JDK 1.6 versions that are being used, there isn't such a check. Without this, a ConcurrentModificationException occurs if the logicalMap calls the equals() method against itself. (Note that the logicalMap is backed by a LinkedHashMap<String, LinkedHashMap<String, Object[]>>. The javadoc for a LinkedHashMap states that merely querying such a map with get is considered to be a structural modification. This causes a ConcurrentModificationException to occur when the java.util.AbstractMap.equals(Object o) method iterates over the map.) Verified in 6.3.1.CP.CR2. |