Bug 1000295 - Concurrent modif. exc. in drools fire until halt thread during undeployment
Summary: Concurrent modif. exc. in drools fire until halt thread during undeployment
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: Rules / jBPM integration
Version: 6.0.0 GA
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ER3
: 6.0.0
Assignee: David Ward
QA Contact: Martin Vecera
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-23 06:36 UTC by Martin Vecera
Modified: 2014-06-16 23:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
SOA-P 6.0 ER1, the last build of ER1
Last Closed:
Type: Bug


Attachments (Terms of Use)
Reproducer QS (19.02 KB, application/x-xz)
2013-08-23 13:40 UTC, Martin Vecera
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SWITCHYARD-1690 0 Major Closed ConcurrentModificationException during undeploy in FireUntilHalt thread of Rules component 2014-06-16 23:51:38 UTC

Description Martin Vecera 2013-08-23 06:36:42 UTC
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.

Comment 1 Martin Vecera 2013-08-23 13:40:49 UTC
Created attachment 789603 [details]
Reproducer QS

Comment 2 JBoss JIRA Server 2013-09-09 01:44:42 UTC
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.

Comment 3 JBoss JIRA Server 2013-09-10 13:10:15 UTC
Keith Babo <kbabo> made a comment on jira SWITCHYARD-1690

pushed

Comment 7 Martin Vecera 2013-12-21 14:16:41 UTC
Verified in ER7-2.

Comment 8 JBoss JIRA Server 2014-06-16 23:51:38 UTC
Keith Babo <kbabo> updated the status of jira SWITCHYARD-1690 to Closed


Note You need to log in before you can comment on or make changes to this bug.