Hide Forgot
When starting a SY app. with Drools service that is configured as FIRE_UNTIL_HALT a new daemon thread is started. During undeployment, when the working memory is being cleared, this thread is still running and conflicts with this operation, which leads to 08:14:22,467 ERROR [org.switchyard.deploy.internal.Deployment] (MSC service thread 1-3) Error stopping service.: java.util.ConcurrentModificationException at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:394) [rt.jar:1.7.0_25] at java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:405) [rt.jar:1.7.0_25] at org.switchyard.component.common.knowledge.session.KnowledgeDisposer.dispose(KnowledgeDisposer.java:51) at org.switchyard.component.common.knowledge.exchange.KnowledgeExchangeHandler.disposeStatefulSession(KnowledgeExchangeHandler.java:176) at org.switchyard.component.common.knowledge.exchange.KnowledgeExchangeHandler.doStop(KnowledgeExchangeHandler.java:215) at org.switchyard.deploy.BaseServiceHandler.stop(BaseServiceHandler.java:90) at org.switchyard.deploy.internal.Deployment.undeployImplementations(Deployment.java:647) at org.switchyard.deploy.internal.Deployment.stop(Deployment.java:165) at org.switchyard.as7.extension.deployment.SwitchYardDeployment.stop(SwitchYardDeployment.java:118) [switchyard-deploy-jboss-as7-1.1.0.M1-redhat-1.jar:1.1.0.M1-redhat-1] at org.switchyard.as7.extension.services.SwitchYardService.stop(SwitchYardService.java:88) [switchyard-deploy-jboss-as7-1.1.0.M1-redhat-1.jar:1.1.0.M1-redhat-1] at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1] at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874) [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_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25] at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25] This possibly leads to the thread running forever, which has bad effect on system resources. Steps to reproduce: Open quickstarts/switchyard/rules-camel-cbr/src/main/resources/META-INF/switchyard.xml and change EXECUTE to FIRE_UNTIL_HALT cd to quickstarts/switchyard/rules-camel-cbr mvn clean install mvn -Dtest=RulesCamelCBRTest test The modified QS is attached as well.
Created attachment 789603 [details] Reproducer QS
David Ward <dward> made a comment on jira SWITCHYARD-1690 https://github.com/jboss-switchyard/components/pull/562 I was able to recreate this bug sometimes (~25% of the time) before the fix. Now I can't recreate it at all, no matter how many times I try.
Keith Babo <kbabo> made a comment on jira SWITCHYARD-1690 pushed
Verified in ER7-2.
Keith Babo <kbabo> updated the status of jira SWITCHYARD-1690 to Closed