[
https://jira.jboss.org/jira/browse/JBAS-7590?page=com.atlassian.jira.plug...
]
Brian Stansberry updated JBAS-7590:
-----------------------------------
Summary: ClusteredDeploymentRepository fails when removing exploded deployment
(was: ClusteredDeploymentRepository does not take lock before removing deployment)
Description:
Removing a structure with nested content you can get this:
1.
13:40:15,744 ERROR [StandaloneManagedDeploymentComponent] Failed to remove
deployment
'vfsfile:/home/emuckenh/svn/eap/JBPAPP_5_0/build/output/jboss-5.0.0.Branch/server/all/farm/ROOT.war/'.
2.
java.lang.RuntimeException: java.util.ConcurrentModificationException
3.
at
org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:312)
4.
at
org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.remove(StreamingDeploymentTarget.java:228)
5.
at
org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.remove(DeploymentProgressImpl.java:322)
6.
at
org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.run(DeploymentProgressImpl.java:95)
7.
at
org.rhq.plugins.jbossas5.util.DeploymentUtils.run(DeploymentUtils.java:155)
8.
at
org.rhq.plugins.jbossas5.StandaloneManagedDeploymentComponent.deleteResource(StandaloneManagedDeploymentComponent.java:314)
9.
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
10.
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
11.
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
12.
at java.lang.reflect.Method.invoke(Method.java:597)
13.
at
org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
14.
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
15.
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
16.
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
17.
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
18.
at java.lang.Thread.run(Thread.java:619)
19.
Caused by: java.util.ConcurrentModificationException
20.
at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1100)
21.
at java.util.TreeMap$KeyIterator.next(TreeMap.java:1154)
22.
at
org.jboss.system.server.profileservice.repository.clustered.local.AbstractLocalContentManager.getContentMetadataForRemove(AbstractLocalContentManager.java:505)
23.
at
org.jboss.profileservice.cluster.repository.DefaultRepositoryClusteringHandler.removeDeploymentContent(DefaultRepositoryClusteringHandler.java:362)
24.
at
org.jboss.system.server.profileservice.repository.clustered.ClusteredDeploymentRepository.removeDeployment(ClusteredDeploymentRepository.java:352)
25.
at
org.jboss.profileservice.management.upload.remoting.DeployHandler.removeDeployment(DeployHandler.java:176)
26.
at
org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.remove(AbstractDeployHandler.java:384)
27.
at
org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.invoke(AbstractDeployHandler.java:236)
28.
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:897)
29.
at
org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)
30.
at org.jboss.remoting.Client.invoke(Client.java:1917)
31.
at org.jboss.remoting.Client.invoke(Client.java:768)
32.
at
org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:304
was:
The global lock should be taken in removeDeploymentContent(), otherwise you can get this:
1.
13:40:15,744 ERROR [StandaloneManagedDeploymentComponent] Failed to remove
deployment
'vfsfile:/home/emuckenh/svn/eap/JBPAPP_5_0/build/output/jboss-5.0.0.Branch/server/all/farm/ROOT.war/'.
2.
java.lang.RuntimeException: java.util.ConcurrentModificationException
3.
at
org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:312)
4.
at
org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.remove(StreamingDeploymentTarget.java:228)
5.
at
org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.remove(DeploymentProgressImpl.java:322)
6.
at
org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.run(DeploymentProgressImpl.java:95)
7.
at
org.rhq.plugins.jbossas5.util.DeploymentUtils.run(DeploymentUtils.java:155)
8.
at
org.rhq.plugins.jbossas5.StandaloneManagedDeploymentComponent.deleteResource(StandaloneManagedDeploymentComponent.java:314)
9.
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
10.
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
11.
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
12.
at java.lang.reflect.Method.invoke(Method.java:597)
13.
at
org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
14.
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
15.
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
16.
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
17.
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
18.
at java.lang.Thread.run(Thread.java:619)
19.
Caused by: java.util.ConcurrentModificationException
20.
at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1100)
21.
at java.util.TreeMap$KeyIterator.next(TreeMap.java:1154)
22.
at
org.jboss.system.server.profileservice.repository.clustered.local.AbstractLocalContentManager.getContentMetadataForRemove(AbstractLocalContentManager.java:505)
23.
at
org.jboss.profileservice.cluster.repository.DefaultRepositoryClusteringHandler.removeDeploymentContent(DefaultRepositoryClusteringHandler.java:362)
24.
at
org.jboss.system.server.profileservice.repository.clustered.ClusteredDeploymentRepository.removeDeployment(ClusteredDeploymentRepository.java:352)
25.
at
org.jboss.profileservice.management.upload.remoting.DeployHandler.removeDeployment(DeployHandler.java:176)
26.
at
org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.remove(AbstractDeployHandler.java:384)
27.
at
org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.invoke(AbstractDeployHandler.java:236)
28.
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:897)
29.
at
org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)
30.
at org.jboss.remoting.Client.invoke(Client.java:1917)
31.
at org.jboss.remoting.Client.invoke(Client.java:768)
32.
at
org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:304
Changed title and description to reflect that not obtaining the cluster lock was not the
cause of the ConcurrentModificationException (although that's a bug I'll fix as
part of this as well). Looks like It's a plain old iterating-through-collection and
not using iterator.remove() to remove problem.
ClusteredDeploymentRepository fails when removing exploded
deployment
---------------------------------------------------------------------
Key: JBAS-7590
URL:
https://jira.jboss.org/jira/browse/JBAS-7590
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Clustering, ProfileService
Affects Versions: JBossAS-5.1.0.GA, JBossAS-6.0.0.M1
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Fix For: JBossAS-6.0.0.M2
Removing a structure with nested content you can get this:
1.
13:40:15,744 ERROR [StandaloneManagedDeploymentComponent] Failed to remove
deployment
'vfsfile:/home/emuckenh/svn/eap/JBPAPP_5_0/build/output/jboss-5.0.0.Branch/server/all/farm/ROOT.war/'.
2.
java.lang.RuntimeException: java.util.ConcurrentModificationException
3.
at
org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:312)
4.
at
org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.remove(StreamingDeploymentTarget.java:228)
5.
at
org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.remove(DeploymentProgressImpl.java:322)
6.
at
org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.run(DeploymentProgressImpl.java:95)
7.
at
org.rhq.plugins.jbossas5.util.DeploymentUtils.run(DeploymentUtils.java:155)
8.
at
org.rhq.plugins.jbossas5.StandaloneManagedDeploymentComponent.deleteResource(StandaloneManagedDeploymentComponent.java:314)
9.
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
10.
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
11.
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
12.
at java.lang.reflect.Method.invoke(Method.java:597)
13.
at
org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
14.
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
15.
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
16.
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
17.
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
18.
at java.lang.Thread.run(Thread.java:619)
19.
Caused by: java.util.ConcurrentModificationException
20.
at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1100)
21.
at java.util.TreeMap$KeyIterator.next(TreeMap.java:1154)
22.
at
org.jboss.system.server.profileservice.repository.clustered.local.AbstractLocalContentManager.getContentMetadataForRemove(AbstractLocalContentManager.java:505)
23.
at
org.jboss.profileservice.cluster.repository.DefaultRepositoryClusteringHandler.removeDeploymentContent(DefaultRepositoryClusteringHandler.java:362)
24.
at
org.jboss.system.server.profileservice.repository.clustered.ClusteredDeploymentRepository.removeDeployment(ClusteredDeploymentRepository.java:352)
25.
at
org.jboss.profileservice.management.upload.remoting.DeployHandler.removeDeployment(DeployHandler.java:176)
26.
at
org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.remove(AbstractDeployHandler.java:384)
27.
at
org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.invoke(AbstractDeployHandler.java:236)
28.
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:897)
29.
at
org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)
30.
at org.jboss.remoting.Client.invoke(Client.java:1917)
31.
at org.jboss.remoting.Client.invoke(Client.java:768)
32.
at
org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:304
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira