Bug 724224 (BRMS-168) - Race conditions in AbstractRuleBase
Summary: Race conditions in AbstractRuleBase
Keywords:
Status: CLOSED NEXTRELEASE
Alias: BRMS-168
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: unspecified
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: 5.0.1
Assignee: Edson Tirelli
QA Contact:
URL: http://jira.jboss.org/jira/browse/BRM...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-07 14:27 UTC by nwallace
Modified: 2009-10-05 04:33 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Windows, Drools CR1
Last Closed: 2009-09-01 12:23:48 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker BRMS-168 0 Major Closed Race conditions in AbstractRuleBase 2014-03-05 13:22:31 UTC

Description nwallace 2009-07-07 14:27:52 UTC
Date of First Response: 2009-09-10 01:08:48
securitylevel_name: Public

ReteooRuleBaseMultiThreadedTest is failing because of race conditions in AbstractRuleBase

java.lang.NullPointerException
	at org.drools.common.AbstractRuleBase.lock(AbstractRuleBase.java:408)
	at org.drools.common.AbstractRuleBase.removePackage(AbstractRuleBase.java:655)
	at org.drools.reteoo.ReteooRuleBaseMultiThreadedTest$PackageModifier.doOperation(ReteooRuleBaseMultiThreadedTest.java:143)
	at org.drools.reteoo.ReteooRuleBaseMultiThreadedTest$BlockedThread.run(ReteooRuleBaseMultiThreadedTest.java:121)

junit.framework.AssertionFailedError: Exception in modifier thread expected:<false> but was:<true>
	at org.drools.reteoo.ReteooRuleBaseMultiThreadedTest.testNewSessionWhileModifyingRuleBase(ReteooRuleBaseMultiThreadedTest.java:80)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

Comment 1 nwallace 2009-07-07 14:29:15 UTC
Link: Added: This issue is related to JBRULES-2029


Comment 2 nwallace 2009-09-01 12:23:48 UTC
Fix in place.

Comment 3 David Le Sage 2009-09-10 05:08:48 UTC
For documenting this in the Release Notes, can you please confirm the following and fill in the missing information. Dot point explanations are fine:

The CAUSE (what was actually broken)
 * the ReteooRuleBaseMultiThreadedTest in the AbstractRuleBase was failing due to a Race Condition problem

CONSEQUENCES of the bug (how it impacts users.)
 * A null pointer exception would occur.

The FIX (what was changed to eliminate this bug) and 
 *

RESULTS of the fix (what now happens for users.)
 * 


Comment 4 David Le Sage 2009-09-23 05:36:44 UTC
We are still awaiting the outstanding information for the Release Notes on this one.  Please provide it as soon as possible. Thanks.

Comment 5 Edson Tirelli 2009-09-23 18:32:02 UTC
The CAUSE (what was actually broken)
 * the ReteooRuleBaseMultiThreadedTest in the AbstractRuleBase was failing due to a Race Condition problem

CONSEQUENCES of the bug (how it impacts users.)
 * A null pointer exception would occur.

The FIX (what was changed to eliminate this bug) and
 * Fix lock management in the AbstractRuleBase class to avoid the race condition.

RESULTS of the fix (what now happens for users.)
 * No more exceptions due to race condition.

Comment 6 Dana Mison 2009-10-05 04:33:07 UTC
added to the 5.0.CP01 release notes as resolved:

JBRULES-2029
A race condition in the class AbstractRuleBase could cause a null pointer exception.  The lock management in AbstractRuleBase has been updated to prevent this race condition occurring.



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