Bug 1025185 - Remoting subsystem: Concurrent modification exception during server shutdown
Summary: Remoting subsystem: Concurrent modification exception during server shutdown
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Remoting
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: CR1
: EAP 6.2.0
Assignee: Brian Stansberry
QA Contact: Jitka Kozana
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-31 08:06 UTC by Jitka Kozana
Modified: 2013-12-15 16:20 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-12-15 16:20:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jitka Kozana 2013-10-31 08:06:37 UTC
The following exception was sometimes logged during server shutdown.
Environment: Oracle JDK6, Solaris 10, sparc 64
EAP 6.2.0.ER7.

[0m[33m01:46:29,696 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)
	at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]
	at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]

See the server log here:
https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/eap-6x-manu-acceptance-startup-solaris/jdk=java16_default,label=sol10_sparc64/24/artifact/target/manu-reports/units/manu.testsuite.eap.eap6.acceptance.startup.CleanStartupAcceptanceEap6/stdout-jboss-eap-6.2_start-serverType=standalone_profile=standalone-full.0.log

Comment 1 Rostislav Svoboda 2013-10-31 12:08:49 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);
}

Comment 2 John Doyle 2013-10-31 12:16:33 UTC
We should try to fix this but I would not block the release for an error on shutdown.

Comment 4 David M. Lloyd 2013-10-31 12:28:51 UTC
Updated component.  The exception appears in the Remoting subsystem, not MSC.

Comment 10 Jitka Kozana 2013-11-11 13:00:42 UTC
This issue was verified using the 6.2.0.CR1 preview bits.


Note You need to log in before you can comment on or make changes to this bug.