Created attachment 496634 [details] Test plugin Description of problem: Concurrent Modification Exception uploading plugins Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Use attached plugin 2. Upload 3. do 'plugins update' on the agent Actual results: discussed with mazz, who mentioned fixing line 1792 in the callstack below: 2011-05-03 16:18:36,685 WARN [org.rhq.enterprise.server.discovery.DiscoveryBossBean] Could not perform commit synchronization with agent for server [My Top Server] # java.lang.RuntimeException: java.util.ConcurrentModificationException # at org.rhq.core.pc.inventory.InventoryManager.synchInventory(InventoryManager.java:1062) # at org.rhq.core.pc.inventory.InventoryManager.synchronizeInventory(InventoryManager.java:1944) # at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) # at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) # at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) # at java.lang.reflect.Method.invoke(Method.java:616) # at org.rhq.enterprise.communications.command.impl.remotepojo.server.RemotePojoInvocationCommandService.execute(RemotePojoInvocationCommandService.java:184) # at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) # at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) # at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) # at java.lang.reflect.Method.invoke(Method.java:616) # at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:111) # at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:45) # at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:226) # at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) # at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:251) # at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:857) # at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:795) # at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:305) # at $Proxy0.execute(Unknown Source) # at org.rhq.enterprise.communications.command.server.CommandProcessor.handleIncomingInvocationRequest(CommandProcessor.java:290) # at org.rhq.enterprise.communications.command.server.CommandProcessor.invoke(CommandProcessor.java:184) # at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:809) # at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:608) # at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:406) # at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173) # Caused by: java.util.ConcurrentModificationException # at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:390) # at java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:401) # at org.rhq.core.pc.inventory.InventoryManager.deactivateResource(InventoryManager.java:1792) # at org.rhq.core.pc.inventory.InventoryManager.removeResourceAndIndicateIfScanIsNeeded(InventoryManager.java:1163) # at org.rhq.core.pc.inventory.InventoryManager.uninventoryResource(InventoryManager.java:1136) # at org.rhq.core.pc.inventory.InventoryManager.purgeObsoleteResources(InventoryManager.java:2616) # at org.rhq.core.pc.inventory.InventoryManager.synchInventory(InventoryManager.java:1033) # ... 25 more Expected results: Additional info: