Bug 967599 - NPE when inserting events by several threads each using its own SessionEntryPoint
Summary: NPE when inserting events by several threads each using its own SessionEntryP...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER2
: 6.0.0
Assignee: Mario Fusco
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-27 14:18 UTC by Marek Winkler
Modified: 2014-08-06 20:18 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:18:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
NPE stack trace (764 bytes, text/plain)
2013-05-27 14:18 UTC, Marek Winkler
no flags Details
Reproducer test case - java (6.03 KB, text/x-java)
2013-05-27 14:21 UTC, Marek Winkler
no flags Details
Reproducer test case - DRL (744 bytes, text/plain)
2013-05-27 14:22 UTC, Marek Winkler
no flags Details

Description Marek Winkler 2013-05-27 14:18:28 UTC
Created attachment 753640 [details]
NPE stack trace

Description of problem:

NPE is thrown (see below) when several threads insert events into one KieSession, each thread is using a dedicated SessionEntryPoint (see attachment for full stacktrace):

java.lang.NullPointerException
	at org.drools.core.reteoo.WindowTuple.<init>(WindowTuple.java:45)
	at org.drools.core.reteoo.BetaNode.createRightTuple(BetaNode.java:916)
	at org.drools.core.reteoo.BetaNode.assertObject(BetaNode.java:344)

When the event insertion is synchronized across all entry points (on the whole KieSession), the problem disappears (to quickly illustrate this, replace in attached MTEntryPointsTest.java on line 150 'entryPoint' by 'kieSession').

Version-Release number of selected component (if applicable):

Drools 6.0.0-SNAPSHOT
Drools 6.0.0.Beta2
BRMS 6.0.0 DR4

This test passes on BRMS 5.3.1.

How reproducible:

Run attached reproducer test case.

Actual results:

The test method testTwoEntryPoints() fails.

Expected results:

Both tests pass.

Comment 1 Marek Winkler 2013-05-27 14:21:59 UTC
Created attachment 753642 [details]
Reproducer test case - java

Comment 2 Marek Winkler 2013-05-27 14:22:49 UTC
Created attachment 753643 [details]
Reproducer test case - DRL

Comment 3 Marek Winkler 2013-08-05 14:30:23 UTC
Verified that the problem does not appear on Drools 6.0.0.CR1, probably fixed as a side-effect of another change.

Waiting for next product build to verify this issue against the product.

Comment 4 Marek Winkler 2013-09-02 07:51:02 UTC
Verified on BRMS 6.0.0-ER2.


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