[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] ConcurrentModificationException in org.eclipse.osgi.internal.resolver.StateWriter.writeList

Please open a bug, also include the version of the org.eclipse.osgi jar.  I suspect it is 3.8.x.  Looking at the code I suspect it is because the deprecated StateObjectFactory.writeState method that Virgo is using is not thread safe.

The method org.eclipse.osgi.internal.resolver.StateWriter.saveStateDeprecated(StateImpl, DataOutputStream) needs to lock the state.monitor object similar to how org.eclipse.osgi.internal.resolver.StateWriter.saveState(StateImpl, File, File) method does.  locking the state.monitor object should avoid this error.  Also having Virgo updated to use one of the other non-deprecated writeState methods would fix the issue.

Tom



Inactive hide details for Laurent Delamare ---06/26/2013 11:42:54 AM---I am using Virgo 3.6.0 which includes these Equinox bundLaurent Delamare ---06/26/2013 11:42:54 AM---I am using Virgo 3.6.0 which includes these Equinox bundles: - org.eclipse.equinox.cm_1.0.400.v20120

From: Laurent Delamare <laurentsd@xxxxxxxxx>
To: equinox-dev@xxxxxxxxxxx,
Date: 06/26/2013 11:42 AM
Subject: [equinox-dev] ConcurrentModificationException in org.eclipse.osgi.internal.resolver.StateWriter.writeList
Sent by: equinox-dev-bounces@xxxxxxxxxxx





I am using Virgo 3.6.0 which includes these Equinox bundles:
- org.eclipse.equinox.cm_1.0.400.v20120319-2029
- org.eclipse.equinox.common_3.6.100.v20120509-1351
- org.eclipse.equinox.console_1.0.100.v20121001-124408
- org.eclipse.equinox.util_1.0.300.v20111010-1614
- org.eclipse.equinox.event_1.2.100.v20111010-1614
- org.eclipse.equinox.region_1.1.0.v20120319-1602

While deploying an app with about 50 bundles I get random ConcurrentModificationExceptions like the one below.
Can you advise a debugging strategy?
Thanks!

java.lang.RuntimeException: java.util.ConcurrentModificationException: null
at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
at java.util.ArrayList$Itr.next(Unknown Source)
at org.eclipse.osgi.internal.resolver.StateWriter.writeList(StateWriter.java:509)
at org.eclipse.osgi.internal.resolver.StateWriter.writeMap(StateWriter.java:496)
at org.eclipse.osgi.internal.resolver.StateWriter.writeBundleDescriptionLazyData(StateWriter.java:346)
at org.eclipse.osgi.internal.resolver.StateWriter.writeStateDeprecated(StateWriter.java:90)
at org.eclipse.osgi.internal.resolver.StateWriter.saveStateDeprecated(StateWriter.java:683)
at org.eclipse.osgi.internal.resolver.StateObjectFactoryImpl.internalWriteStateDeprecated(StateObjectFactoryImpl.java:512)
at org.eclipse.osgi.internal.resolver.StateObjectFactoryImpl.writeState(StateObjectFactoryImpl.java:500)
at org.eclipse.virgo.kernel.userregion.internal.quasi.StandardQuasiFrameworkFactory.createState(StandardQuasiFrameworkFactory.java:127)
at org.eclipse.virgo.kernel.userregion.internal.quasi.StandardQuasiFrameworkFactory.create(StandardQuasiFrameworkFactory.java:87)
at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy39.create(Unknown Source)
at org.eclipse.virgo.kernel.install.environment.internal.StandardInstallEnvironmentFactory.createInstallEnvironment(StandardInstallEnvironmentFactory.java:45)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.driveInstallPipeline(PipelinedApplicationDeployer.java:356)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:185)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:140)
at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:253)
at org.eclipse.virgo.kernel.deployer.management.StandardDeployer.deploy(StandardDeployer.java:52)
at sun.reflect.GeneratedMethodAccessor92.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(Unknown Source)
at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(Unknown Source)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(Unknown Source)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(Unknown Source)
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(Unknown Source)
at com.sun.jmx.mbeanserver.PerInterface.invoke(Unknown Source)
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(Unknown Source)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)
at sun.reflect.GeneratedMethodAccessor570.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

GIF image