Bug 1181584 - NullPointerException thrown on next call to insert and fireAllRules after stream garbage collection runs
Summary: NullPointerException thrown on next call to insert and fireAllRules after str...
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER4
: ---
Assignee: Mario Fusco
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-13 12:12 UTC by Martin Weiler
Modified: 2020-03-27 20:09 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 20:09:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker DROOLS-629 0 Major Resolved NullPointerException thrown on next call to insert and fireAllRules after stream garbage collection runs 2016-05-18 06:35:13 UTC

Description Martin Weiler 2015-01-13 12:12:39 UTC
Description of problem:
Platform issue for https://issues.jboss.org/browse/DROOLS-629

I have observed that the following NullPointerException (NPE) occurs consistently with a very specific set of rules and a very specific set of inputs into a stream session:

java.lang.NullPointerException

    at org.drools.core.util.AbstractHashTable$SingleIndex.equal(AbstractHashTable.java:491)

    at org.drools.core.util.index.LeftTupleList.matches(LeftTupleList.java:266)

    at org.drools.core.util.index.LeftTupleIndexHashTable.get(LeftTupleIndexHashTable.java:434)

    at org.drools.core.util.index.LeftTupleIndexHashTable.getFirst(LeftTupleIndexHashTable.java:217)

    at org.drools.core.reteoo.BetaNode.getFirstLeftTuple(BetaNode.java:443)

    at org.drools.core.phreak.PhreakJoinNode.doRightInserts(PhreakJoinNode.java:144)

    at org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:56)

    at org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:548)

    at org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:534)

    at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:334)

    at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:161)

    at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:116)

    at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:229)

    at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:98)

    at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:988)

    at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1274)

    at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1281)

    at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1254)

    ...

The exception always occurs on the next call to "insert" and "fireAllRules" after the following method is invoked within the session: org.drools.core.common.DefaultAgenda$DefaultGarbageCollector.forceGcUnlinkedRules().

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


How reproducible:
always


Steps to Reproduce:
See reproducer attached to JIRA

Actual results:
Test fails with NPE

Expected results:
Test passes

Additional info:

Comment 1 Mario Fusco 2015-01-13 17:43:55 UTC
I am not getting why this ticket has been opened. My understanding is that this problem has been fixed as reported in the linked jira: https://issues.jboss.org/browse/DROOLS-629

Can you still reproduce the NPE despite that fix? If so can you please attach a reproducer for this problem?

Comment 2 Martin Weiler 2015-01-14 07:47:44 UTC
I have created this ticket to ensure your fix to DROOLS-629 makes it into BRMS 6.2.0, and gets proper QE coverage. GSS is working on a one-off patch for BRMS 6.0.3, and we need to ensure that there is no regression when the customer upgrades to 6.2.0 later. 

I could *not* reproduce the NPE after having applied your fix.

Hope this helps to clarify.

Comment 4 Marek Winkler 2015-01-30 11:50:50 UTC
Verified in BRMS 6.1.0 ER4.

Reproducer added into 6.1.x and 6.0.x regression test suites.

Not sure if comment #2 applies here, since this BZ has been targeted for 6.1.0 (ER4). A separate BZ would be needed for verification in a 6.0.3 (one-off|roll-up) patch.


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