Bug 1025185
| Summary: | Remoting subsystem: Concurrent modification exception during server shutdown | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Jitka Kozana <jkudrnac> |
| Component: | Remoting | Assignee: | Brian Stansberry <brian.stansberry> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Jitka Kozana <jkudrnac> |
| Severity: | high | Docs Contact: | Russell Dickenson <rdickens> |
| Priority: | unspecified | ||
| Version: | 6.2.0 | CC: | brian.stansberry, dandread, jawilson, jdoyle, jkudrnac, lcosti, myarboro, rsvoboda |
| Target Milestone: | CR1 | ||
| Target Release: | EAP 6.2.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
A service in the remoting subsystem would iterate over a collection in a non-thread-safe manner.
As a result of this issue, a `ConcurrentModificationException` exception would occasionally be thrown during server shutdown. Other than this exception, the shutdown would complete normally.
----
WARN [org.jboss.msc.service.fail] (MSC service thread 1-55) MSC000004: Failure during stop of service jboss.remoting.endpoint.management.channel.management: java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793) [rt.jar:1.6.0_45]
at java.util.HashMap$KeyIterator.next(HashMap.java:828) [rt.jar:1.6.0_45]
at java.util.AbstractCollection.addAll(AbstractCollection.java:305) [rt.jar:1.6.0_45]
at java.util.HashSet.<init>(HashSet.java:100) [rt.jar:1.6.0_45]
at org.jboss.as.remoting.AbstractChannelOpenListenerService.stop(AbstractChannelOpenListenerService.java:123)
...
----
This issue has been fixed in this release of JBoss EAP 6. Iteration over the collection is now done in a thread-safe manner, with the collection object's monitor held by the iterating thread.
As a result, `ConcurrentModificationException` exceptions are no longer thrown.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-12-15 16:20:32 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: | |||
|
Description
Jitka Kozana
2013-10-31 08:06:37 UTC
https://github.com/jbossas/jboss-eap/blob/6.x/remoting/src/main/java/org/jboss/as/remoting/AbstractChannelOpenListenerService.java#L123 final Set<ManagementChannelInitialization.ManagementChannelShutdownHandle> handles = new HashSet<ManagementChannelInitialization.ManagementChannelShutdownHandle>(this.handles); In registrationTerminated method there is lock on 'handles', it should be probably added to line 123 too. https://github.com/jbossas/jboss-eap/blob/6.x/remoting/src/main/java/org/jboss/as/remoting/AbstractChannelOpenListenerService.java#L185 synchronized (handles) { // Copy off the set to avoid ConcurrentModificationException copy = new HashSet<ManagementChannelInitialization.ManagementChannelShutdownHandle>(handles); } We should try to fix this but I would not block the release for an error on shutdown. Updated component. The exception appears in the Remoting subsystem, not MSC. This issue was verified using the 6.2.0.CR1 preview bits. |