Bug 1088312
| Summary: | Race Condition in REST deployment operations causes NPE to be thrown when requesting a list of deployments | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Retired] JBoss BPMS Platform 6 | Reporter: | Marco Rietveld <mrietvel> | ||||
| Component: | Business Central | Assignee: | Marco Rietveld <mrietvel> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Ivo Bek <ibek> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 6.0.1 | CC: | abhumbe, etirelli, kverlaen, rrajasek, smcgowan, vigoyal | ||||
| Target Milestone: | CR1 | ||||||
| Target Release: | 6.0.2 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: |
Requesting a list of current deployments using the REST API while a deploy or undeploy request is pending caused a race condition terminating in a NullPointerException. This issue has now been fixed by modifying the code to prevent the race condition from happening.
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-08-06 19:49:42 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Fixed. Commits: 6.0.x: https://github.com/droolsjbpm/droolsjbpm-integration/commit/e8a51c48 master: https://github.com/droolsjbpm/droolsjbpm-integration/commit/f66256f3 We are reverting https://github.com/uberfire/uberfire/commit/bbfad26b65c687b77d43be6c3cc8ec60bbe89384 (which I believe might be related to this), as it causes significant issues: when having concurrent requests, by making both lock (which is a while loop waiting for unlock) and unlock methods synchronized, the first thread can't unlock anymore. So it might be that this BZ isn't completely fixed yet in ER4, please verify and reassign if necessary. Verified in BPMS 6.0.2.CR1 |
Created attachment 886876 [details] Stack trace showing NPE Description of problem: There's a race condition between the following 1. The ../rest/deployment/{depId}/deploy or ../rest/deployment/{depId}/deploy REST operation 2. The ../rest/deployment/ REST operation which returns a list of the available deployments. The issue is that the deployment id may be known, but that the rest of the information about the deployment may not be accessible because the deployment is still undergoing deployment or undeployment. Version-Release number of selected component (if applicable): 6.0.0, 6.0.1 How reproducible: Always, if you get the race condition timing right. :) Steps to Reproduce: 1. Do a 'undeploy' request 1. Request the list of available deployments or 1. Do a 'deploy' request 1. Request the list of available deployments. Actual results: A NPE (NullPointerException) is thrown at line 52 of the org.kie.services.remote.rest.DeploymentsResource class. Expected results: The requested information is returned without any error. Additional info: