Bug 1266092 - Process instances with "actions" (script tasks, service tasks, rule tasks) can throw an NPE due to a race condition involving the data services
Process instances with "actions" (script tasks, service tasks, rule tasks) ca...
Status: VERIFIED
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
6.2.0
Unspecified Unspecified
urgent Severity urgent
: ER4
: 6.2.0
Assigned To: Shelly McGowan
Tomas Livora
: TestBlocker
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-24 08:55 EDT by Marco Rietveld
Modified: 2016-09-20 01:13 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Log from smoke tests showing the NPE caused when the script task is executed in a process (29.15 KB, text/plain)
2015-09-24 08:55 EDT, Marco Rietveld
no flags Details

  None (edit)
Description Marco Rietveld 2015-09-24 08:55:38 EDT
Created attachment 1076537 [details]
Log from smoke tests showing the NPE caused when the script task is executed in a process

Description of problem:

The "data services" in BPMS/kie-wb, which are located in the jbpm-kie-services module, piggy-back on the code used to actually used to build the process instance. 

However, there seems to be a race condition in which the data services/jbpm-kie-services builder code (instead of the normal/jbpm-bpmn2 builder code) is used to build a process instance. 

When that happens, the process instance is not completely built because the data services builder logic only collects information, but does not build the process instance. 

This results in, among other things, an NullPointerException when a script task is executed, because the script task "Action" has not been completely built. 

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

As of community 6.3.x. 


How reproducible:

This is not always reproducible because the problem is caused by a race condition [https://en.wikipedia.org/wiki/Race_condition]. 


Steps to Reproduce:
1. Repeatedly start a process containing a script task in BPMS/kie-wb. 

The race condition seems to be most likely to happen immediately after a deployment is deployed. 

Actual results:

An NPE is thrown (see attached log from our smoke tests). 

Expected results:

The process completes without error.
Comment 1 Marco Rietveld 2015-09-25 09:12:19 EDT
This race condition was exposed by our smoke tests.
Comment 2 Marco Rietveld 2015-09-29 08:17:26 EDT
Fixed. Commits: 

6.3.x: 
https://github.com/droolsjbpm/jbpm/commit/23502fbf

master: 
https://github.com/droolsjbpm/jbpm/commit/d8042c19
Comment 3 Tomas Livora 2015-09-29 11:34:48 EDT
This is a huge test blocker. I do not know why it was not discovered by our smoke tests. But because of this bug exactly 1/3 of integration tests fail.
Comment 4 Tomas Livora 2015-10-15 05:05:44 EDT
Verified on BPMS 6.2.0 ER4

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