[
https://jira.jboss.org/jira/browse/JBRULES-2086?page=com.atlassian.jira.p...
]
Edson Tirelli resolved JBRULES-2086.
------------------------------------
Resolution: Done
I believe I fixed the problem. I replaced the rulebase lock by a read/write lock. Sessions
now acquire a read lock when they interact with the rulebase and the rulebase acquires the
write lock everytime a change is required.
Let me know if you find any other related problem.
Thanks for reporting and providing test case.
Edson
Reproducible hang on concurrent locked rule base modification/session
usage
---------------------------------------------------------------------------
Key: JBRULES-2086
URL:
https://jira.jboss.org/jira/browse/JBRULES-2086
Project: JBoss Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-core
Affects Versions: 5.0.0.GA
Environment: Dual core Intel; Fedora 10 linux amd64; java versions sun jdk
1.5.0_16, 1.6.0_12, openjdk b58
Eclipse: 3.5M7, M2Eclipse 0.9.8.200905041414
Reporter: Andreas Kohn
Assignee: Edson Tirelli
Attachments: hang-jstack.txt, updatestress-hang.zip
With the attached unit test (inside the maven project, execute with mvn test) and against
drools-api/drools-core 5.0.1.SNAPSHOT I get very reproducible hangs in
AbstractRuleBase#lock().
Usually those happen after a few update threads are done with their work, and from the
stack traces it looks like all blocked threads wait for some thread that already is done
(looked at also in the debugger to check the lock's exclusiveOwnerThread).
On rarer occasions the test also triggers:
* NPE inside AbstractRuleBase when unlocking the working memories
* ConcurrentModificationException in ClassObjectTypeConf#getMatchingObjectTypes() when
walking over the objectTypeNodes values
* Too many open files when building the rules (only seen when running the test in
eclipse)
--
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