[jboss-jira] [JBoss JIRA] (DROOLS-206) Deadlock between AbstractWorkingMemory and DefaultAgenda
RH Bugzilla Integration (JIRA)
jira-events at lists.jboss.org
Thu Aug 8 10:07:26 EDT 2013
[ https://issues.jboss.org/browse/DROOLS-206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12795816#comment-12795816 ]
RH Bugzilla Integration commented on DROOLS-206:
------------------------------------------------
Mario Fusco <mfusco at redhat.com> changed the Status of [bug 995078|https://bugzilla.redhat.com/show_bug.cgi?id=995078] from NEW to MODIFIED
> Deadlock between AbstractWorkingMemory and DefaultAgenda
> --------------------------------------------------------
>
> Key: DROOLS-206
> URL: https://issues.jboss.org/browse/DROOLS-206
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.5.0.Final
> Reporter: Winfried Umbrath
> Assignee: Mario Fusco
> Fix For: 5.5.1.Final, 6.0.0.CR2
>
> Attachments: jbrules-3700-test.tgz
>
>
> I experienced a deadlock when running in STREAM mode and using negative patterns with temporal constraints.
> When the rule gets fired by the installed timer job and at the same time another thread is firing rules, a deadlock can occur:
> 1. [rule firing thread] StatefulKnowledgeSessionImpl.execute(StatefulKnowledgeSessionImpl.java:820)
> acquires lock in AbstractWorkingMemory
> 2. [timer-thread] DefaultAgenda.fireActivation()
> call of synchronized method
> 3. [rule firing thread] DefaultAgenda.fireActivation()
> synchronized method, wait for other thread to exit synchornized method
> 4. [timer-thread] AbstractWorkingMemory.getGlobal()
> tries to access a global, tries to acquire lock in AbstractWorkingMemory which is held by the other thread
> --> Deadlock
> Excerpt from thread dump:
> "http-thread-pool-8082(374)":
> at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1264)
> - waiting to lock <0x00007f50407e4950> (a org.drools.common.DefaultAgenda)
> at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1221)
> at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1456)
> at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:710)
> at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:679)
> at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:234)
> at org.drools.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:102)
> at org.drools.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:32)
> at org.drools.command.runtime.BatchExecutionCommandImpl.execute(BatchExecutionCommandImpl.java:155)
> at org.drools.command.runtime.BatchExecutionCommandImpl.execute(BatchExecutionCommandImpl.java:76)
> at org.drools.impl.StatefulKnowledgeSessionImpl.execute(StatefulKnowledgeSessionImpl.java:821)
> "pool-4251-thread-1":
> at sun.misc.Unsafe.park(Native Method)
> - parking to wait for 0x00007f503fc71a20> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:747)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:778)
> at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1114)
> at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:186)
> at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:262)
> at org.drools.common.AbstractWorkingMemory.getGlobal(AbstractWorkingMemory.java:634)
> at myrules.Rule_ruleWithTimeout_ece4a3c9fc2741a4ab97a92b77611203DefaultConsequenceInvokerGenerated.evaluate(Unknown Source)
> at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1287)
> - locked <0x00007f50407e4950> (a org.drools.common.DefaultAgenda)
> at org.drools.common.DefaultAgenda.fireTimedActivation(DefaultAgenda.java:1344)
> - locked <0x00007f50407e4950> (a org.drools.common.DefaultAgenda)
> at org.drools.common.Scheduler$ActivationTimerJob.execute(Scheduler.java:83)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list