Bug 1195144 - [6.0.3.RP#3] NullPointerException or IllegalStateException occurs when session.execute() are called concurrently
Summary: [6.0.3.RP#3] NullPointerException or IllegalStateException occurs when sessi...
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: CR1
: ---
Assignee: Mario Fusco
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On: 1185691
Blocks: 1187070 1205795 1205799
TreeView+ depends on / blocked
 
Reported: 2015-02-23 08:55 UTC by Toshiya Kobayashi
Modified: 2020-03-27 20:08 UTC (History)
7 users (show)

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


Attachments (Terms of Use)
reproducer (9.12 KB, application/zip)
2015-02-23 08:58 UTC, Toshiya Kobayashi
no flags Details

Description Toshiya Kobayashi 2015-02-23 08:55:14 UTC
+++ This bug was initially created as a clone of Bug #1185691 +++

Description of problem:
If session.execute is called concurrently, NullpinterException or IllegalStateExeition occurs. 


Steps to Reproduce:
1. Download and import Drools6ReoccurNPEProject.zip to JBDS
2. Fix jars and JVM option(like: -Xms1303m -Xmx1303m)
3. Run com.sample.DroolsTest

Actual results:
One of following types of Exception occurs.
===
java.lang.IllegalMonitorStateException
	at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:155)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1260)
	at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:460)
	at org.drools.core.common.AbstractWorkingMemory.endBatchExecution(AbstractWorkingMemory.java:1753)
	at org.drools.core.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:381)
	at com.sample.RuleTestThread.execRun(RuleTestThread.java:39)
	at com.sample.RuleTestThread.run(RuleTestThread.java:23)
===

===
java.lang.NullPointerException
	at org.drools.core.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:381)
	at com.sample.RuleTestThread.execRun(RuleTestThread.java:39)
	at com.sample.RuleTestThread.run(RuleTestThread.java:23)
===

Expected results:
The program can run without any Exception


Additional info:
Our customer shares fixed StatelessKnowledgeSessionImpl.java which is the one in BRMS 6.0.3. Please check their modification. The fixed class is attached as StatelessKnowledgeSessionImpl.CHAGEDraft.java

Comment 1 Toshiya Kobayashi 2015-02-23 08:58:01 UTC
Created attachment 994314 [details]
reproducer

Comment 3 Mario Fusco 2015-02-24 16:52:41 UTC
Backported to 6.0.x with https://github.com/droolsjbpm/drools/commit/532bdd988

Comment 5 Marek Winkler 2015-04-16 12:07:12 UTC
Verified in BRMS 6.0.3 Roll-Up Patch #3.


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