Bug 967599 - NPE when inserting events by several threads each using its own SessionEntryPoint
NPE when inserting events by several threads each using its own SessionEntryP...
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ER2
: 6.0.0
Assigned To: Mario Fusco
Marek Winkler
Depends On:
  Show dependency treegraph
Reported: 2013-05-27 10:18 EDT by Marek Winkler
Modified: 2014-08-06 16:18 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-08-06 16:18:39 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Marek Winkler 2013-05-27 10:18:28 EDT
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):

	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 10:21:59 EDT
Created attachment 753642 [details]
Reproducer test case - java
Comment 2 Marek Winkler 2013-05-27 10:22:49 EDT
Created attachment 753643 [details]
Reproducer test case - DRL
Comment 3 Marek Winkler 2013-08-05 10:30:23 EDT
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 03:51:02 EDT
Verified on BRMS 6.0.0-ER2.

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