[jboss-jira] [JBoss JIRA] Updated: (JBRULES-1776) Lock on AbstractRuleBase object is not released when an error occurs.
Le Huynh (JIRA)
jira-events at lists.jboss.org
Sun Sep 21 23:37:21 EDT 2008
[ https://jira.jboss.org/jira/browse/JBRULES-1776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Le Huynh updated JBRULES-1776:
------------------------------
Summary: Lock on AbstractRuleBase object is not released when an error occurs. (was: Thread does not release lock on AbstractRuleBase object when an error occurs.)
> Lock on AbstractRuleBase object is not released when an error occurs.
> ---------------------------------------------------------------------
>
> Key: JBRULES-1776
> URL: https://jira.jboss.org/jira/browse/JBRULES-1776
> Project: JBoss Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 4.0.7
> Environment: Windows XP, jdk1.5.0_01
> Reporter: Le Huynh
> Assignee: Mark Proctor
>
> When modifying the rules using addPackage() or removeRule() from the AbstractRulebase class this would lock() the object. But if any error occurs after the lock() is called, this object's lock is never released as it would never reach the line to call unlock(). It appears that the removePackage() in the AbstractRulebase is the only method that has a try{} finally{} to unlock if there is an error.
> Below is stack of removing a rule, when this occurs, all other threads will wait forever when trying to modify rules.
> "TP-Processor20" daemon prio=10 tid=0x83adcc00 nid=0x4af5 in Object.wait() [0x82231000..0x82232f30]
> java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on <0x964babb0> (a org.drools.util.concurrent.locks.ReentrantLock$NonfairSync)
> at java.lang.Object.wait(Object.java:485)
> at org.drools.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:106)
> - locked <0x964babb0> (a org.drools.util.concurrent.locks.ReentrantLock$NonfairSync)
> at org.drools.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:195)
> at org.drools.common.AbstractRuleBase.lock(AbstractRuleBase.java:343)
> at org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:630)
> - locked <0x964aa710> (a java.util.HashMap)
> at com.prototype.rules.RulesEngine.removeRuleFromEngine(RulesEngine.java:207)
> at com.prototype.rules.RulesEngine.updateRule(RulesEngine.java:137)
> - locked <0x964a6208> (a com.prototype.rules.RulesEngine)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list