Uploaded image for project: 'MidPoint'
  1. MidPoint
  2. MID-4088

ConcurrentModificationException when displaying a task

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6 (Comenius)
    • Fix Version/s: 4.0
    • Component/s: None
    • Labels:
      None

      Description

      When displaying a running task, exception like this might occur:

      2017-07-26 15:07:21,147 [MODEL] [https-jsse-nio-8443-exec-4] DEBUG (com.evolveum.midpoint.model.impl.ModelObjectResolver): Error resolving object with oid ed91de10-6b0b-4599-87e8-76df98733a76, expected type was class com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType..
      java.util.ConcurrentModificationException: null
      	at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901) ~[na:1.8.0_131]
      	at java.util.ArrayList$Itr.next(ArrayList.java:851) ~[na:1.8.0_131]
      	at com.evolveum.midpoint.schema.result.OperationResult.clone(OperationResult.java:1489) ~[schema-3.7-SNAPSHOT.jar:na]
      	at com.evolveum.midpoint.schema.result.OperationResult.clone(OperationResult.java:1491) ~[schema-3.7-SNAPSHOT.jar:na]
      	at com.evolveum.midpoint.schema.result.OperationResult.clone(OperationResult.java:1491) ~[schema-3.7-SNAPSHOT.jar:na]
      	at com.evolveum.midpoint.schema.result.OperationResult.clone(OperationResult.java:1491) ~[schema-3.7-SNAPSHOT.jar:na]
      	at com.evolveum.midpoint.schema.result.OperationResult.clone(OperationResult.java:1491) ~[schema-3.7-SNAPSHOT.jar:na]
      	at com.evolveum.midpoint.schema.result.OperationResult.clone(OperationResult.java:1491) ~[schema-3.7-SNAPSHOT.jar:na]
      	at com.evolveum.midpoint.task.quartzimpl.TaskManagerQuartzImpl.fillOperationExecutionState(TaskManagerQuartzImpl.java:974) ~[task-quartz-impl-3.7-SNAPSHOT.jar:na]
      	at com.evolveum.midpoint.task.quartzimpl.TaskManagerQuartzImpl.getTaskAsObject(TaskManagerQuartzImpl.java:949) ~[task-quartz-impl-3.7-SNAPSHOT.jar:na]
      	at com.evolveum.midpoint.task.quartzimpl.TaskManagerQuartzImpl.getObject(TaskManagerQuartzImpl.java:922) ~[task-quartz-impl-3.7-SNAPSHOT.jar:na]
      	at sun.reflect.GeneratedMethodAccessor1101.invoke(Unknown Source) ~[na:na]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131]
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
      	at com.evolveum.midpoint.util.aspect.MidpointInterceptor.wrapSubsystem(MidpointInterceptor.java:137) [util-3.7-SNAPSHOT.jar:na]
      	at com.evolveum.midpoint.util.aspect.MidpointInterceptor.invoke(MidpointInterceptor.java:53) [util-3.7-SNAPSHOT.jar:na]
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
      	at com.sun.proxy.$Proxy105.getObject(Unknown Source) ~[na:na]
      	at com.evolveum.midpoint.model.impl.ModelObjectResolver.getObject(ModelObjectResolver.java:171) ~[model-impl-3.7-SNAPSHOT.jar:na]
      	at com.evolveum.midpoint.model.impl.controller.ModelController.getObject(ModelController.java:252) [model-impl-3.7-SNAPSHOT.jar:na]
      	at sun.reflect.GeneratedMethodAccessor308.invoke(Unknown Source) ~[na:na]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131]
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
      	at com.evolveum.midpoint.util.aspect.MidpointInterceptor.wrapSubsystem(MidpointInterceptor.java:137) [util-3.7-SNAPSHOT.jar:na]
      	at com.evolveum.midpoint.util.aspect.MidpointInterceptor.invoke(MidpointInterceptor.java:53) [util-3.7-SNAPSHOT.jar:na]
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) [spring-aop-4.2.5.RELEASE.jar:4.2.5.RELEASE]
      	at com.sun.proxy.$Proxy113.getObject(Unknown Source) [na:na]
      	at sun.reflect.GeneratedMethodAccessor308.invoke(Unknown Source) ~[na:na]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131]
      	at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:507) [wicket-ioc-7.6.0.jar:7.6.0]
      	at com.sun.proxy.$Proxy165.getObject(Unknown Source) [na:na]
      	at com.evolveum.midpoint.web.page.admin.server.PageTaskEdit.loadTaskType(PageTaskEdit.java:178) [classes/:na]
      	at com.evolveum.midpoint.web.page.admin.server.PageTaskEdit.loadTaskTypeChecked(PageTaskEdit.java:150) [classes/:na]
      	at com.evolveum.midpoint.web.page.admin.server.PageTaskEdit.access$400(PageTaskEdit.java:76) [classes/:na]
      	at com.evolveum.midpoint.web.page.admin.server.PageTaskEdit$1.load(PageTaskEdit.java:115) [classes/:na]
      	at com.evolveum.midpoint.web.page.admin.server.PageTaskEdit$1.load(PageTaskEdit.java:108) [classes/:na]
      	at com.evolveum.midpoint.gui.api.model.LoadableModel.getObject(LoadableModel.java:68) [classes/:na]
      	at com.evolveum.midpoint.web.page.admin.server.PageTaskEdit.getTaskDto(PageTaskEdit.java:343) [classes/:na]
      	at com.evolveum.midpoint.web.page.admin.server.PageTaskEdit.getRefreshInterval(PageTaskEdit.java:216) [classes/:na]
      	at com.evolveum.midpoint.web.page.admin.server.PageTaskEdit.initLayout(PageTaskEdit.java:195) [classes/:na]
      	at com.evolveum.midpoint.web.page.admin.server.PageTaskEdit.<init>(PageTaskEdit.java:132) [classes/:na]
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [na:1.8.0_131]
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [na:1.8.0_131]
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [na:1.8.0_131]
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [na:1.8.0_131]
      	at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:171) [wicket-core-7.6.0.jar:7.6.0]
      	at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:99) [wicket-core-7.6.0.jar:7.6.0]
      	at com.evolveum.midpoint.gui.api.page.PageBase.navigateToNext(PageBase.java:1817) [classes/:na]
      	at com.evolveum.midpoint.web.page.admin.server.PageTasks$33.taskDetailsPerformed(PageTasks.java:859) [classes/:na]
      	at com.evolveum.midpoint.web.page.admin.server.PageTasks$33.onClick(PageTasks.java:851) [classes/:na]
      	at com.evolveum.midpoint.web.component.data.column.LinkColumn$1.onClick(LinkColumn.java:69) [classes/:na]
      	at com.evolveum.midpoint.web.component.data.column.LinkPanel$1.onClick(LinkPanel.java:43) [classes/:na]
      	at org.apache.wicket.ajax.markup.html.AjaxLink$1.onEvent(AjaxLink.java:85) [wicket-core-7.6.0.jar:7.6.0]
      	at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:155) [wicket-core-7.6.0.jar:7.6.0]
      	at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:601) [wicket-core-7.6.0.jar:7.6.0]
      	at sun.reflect.GeneratedMethodAccessor1059.invoke(Unknown Source) ~[na:na]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131]
      	at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258) [wicket-core-7.6.0.jar:7.6.0]
      	at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241) [wicket-core-7.6.0.jar:7.6.0]
      	at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:248) [wicket-core-7.6.0.jar:7.6.0]
      	at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234) [wicket-core-7.6.0.jar:7.6.0]
      	at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:895) [wicket-core-7.6.0.jar:7.6.0]
      	at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) [wicket-request-7.6.0.jar:7.6.0]
      	at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265) [wicket-core-7.6.0.jar:7.6.0]
      	at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222) [wicket-core-7.6.0.jar:7.6.0]
      	at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293) [wicket-core-7.6.0.jar:7.6.0]
      	at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261) [wicket-core-7.6.0.jar:7.6.0]
      	at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203) [wicket-core-7.6.0.jar:7.6.0]
      	at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284) [wicket-core-7.6.0.jar:7.6.0]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.15]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.15]
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:112) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE]
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:206) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:121) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE]
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:134) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:106) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) [spring-security-web-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) [spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE]
      	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) [spring-web-4.2.5.RELEASE.jar:4.2.5.RELEASE]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.15]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.15]
      	at com.evolveum.midpoint.web.util.MidPointProfilingServletFilter.doFilter(MidPointProfilingServletFilter.java:86) [classes/:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.15]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.15]
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [catalina.jar:8.5.15]
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:8.5.15]
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [catalina.jar:8.5.15]
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [catalina.jar:8.5.15]
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) [catalina.jar:8.5.15]
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) [catalina.jar:8.5.15]
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [catalina.jar:8.5.15]
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [catalina.jar:8.5.15]
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) [tomcat-coyote.jar:8.5.15]
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:8.5.15]
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) [tomcat-coyote.jar:8.5.15]
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455) [tomcat-coyote.jar:8.5.15]
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:8.5.15]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_131]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_131]
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.15]
      	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_131]
      

      (relevant for 1d2f294897a062110bbce8ea0c0e6af55bf615e5)

      The problem is that midPoint tries to obtain operation result from running task. Structures in the result are not thread-safe: we are using regular ArrayLists e.g. for subresults.

      What to do:

      1. Stop fetch current operation result from running task
      2. or make structures thread-safe

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mederly Pavol Mederly
                Reporter:
                mederly Pavol Mederly
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: