Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1139

Another ConcurrentModificationException on parallel deployments in InterceptorRegistry

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.0.15.Final
    • None
    • None
    • None
    • Hide

      We did it via automated deployment/undeployment of several SY services on JBoss EAP simultaneously.

      Show
      We did it via automated deployment/undeployment of several SY services on JBoss EAP simultaneously.
    • PR merged.

    Description

      Another issue related to https://issues.jboss.org/browse/RESTEASY-762 and https://issues.jboss.org/browse/RESTEASY-1044

      13:39:16,587 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."urlfilter-composite-northbound-1.0.12.jar".SwitchYardService: org.jboss.msc.service.StartException in service jboss.deployment.unit."urlfilter-composite-northbound-1.0.12.jar".SwitchYardService: java.lang.RuntimeException: java.util.ConcurrentModificationException
      at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:80)
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
      at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
      Caused by: java.lang.RuntimeException: java.util.ConcurrentModificationException
      at org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuiltin.java:35)
      at org.jboss.resteasy.spi.ResteasyProviderFactory.getInstance(ResteasyProviderFactory.java:354)
      at org.switchyard.component.resteasy.util.ClientInvoker.<init>(ClientInvoker.java:151)
      at org.switchyard.component.resteasy.OutboundHandler.doStart(OutboundHandler.java:122)
      at org.switchyard.deploy.BaseServiceHandler.start(BaseServiceHandler.java:60)
      at org.switchyard.deploy.internal.Deployment.deployReferenceBindings(Deployment.java:310)
      at org.switchyard.deploy.internal.Deployment.start(Deployment.java:143)
      at org.switchyard.as7.extension.deployment.SwitchYardDeployment.start(SwitchYardDeployment.java:101)
      at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:73)
      ... 5 more
      Caused by: java.util.ConcurrentModificationException
      at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:859) [rt.jar:1.7.0_45]
      at java.util.ArrayList$Itr.next(ArrayList.java:831) [rt.jar:1.7.0_45]
      at org.jboss.resteasy.core.interception.InterceptorRegistry.register(InterceptorRegistry.java:215)
      at org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:884)
      at org.jboss.resteasy.core.ThreadLocalResteasyProviderFactory.registerProvider(ThreadLocalResteasyProviderFactory.java:473)
      at org.jboss.resteasy.plugins.providers.RegisterBuiltin.registerProviders(RegisterBuiltin.java:70)
      at org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuiltin.java:31)
      ... 13 more

      Can't propose any fix for this because the ConcurrentModificationException is thrown in iterator "for (InterceptorRegistryListener listener : listeners)", but, sadly, :"listeners" is available to anyone outside the class via getListeners(), so you should change listeners to any concurrency-resistant impl or check all other sources to make all changed to listeners synchronized.

      Attachments

        Issue Links

          Activity

            People

              patriot1burke@gmail.com Bill Burke (Inactive)
              synclpz_jira Viktor Alexandrov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: