Bug 1145105

Summary: Kie module build synchronization leak resulting in HashMap infinite loop
Product: [Retired] JBoss BRMS Platform 6 Reporter: Jiri Locker <jlocker>
Component: Business CentralAssignee: manstis
Status: CLOSED EOL QA Contact: Jiri Locker <jlocker>
Severity: urgent Docs Contact:
Priority: high    
Version: 6.1.0CC: kverlaen
Target Milestone: ER2   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 18:38:07 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:
Description Flags
Thread dump none

Description Jiri Locker 2014-09-22 11:50:30 UTC
Created attachment 939978 [details]
Thread dump

Description of problem:
This issue has the same impact as bug 1110794. In both cases a code that is accessed by multiple threads uses thread-unsafe HashMap. When the race condition happens, threads accessing the HashMap concurrently will create a pointer loop in its internal table. The loop will than cause other threads getting trapped in HashMap.getEntry().

Version-Release number of selected component (if applicable):
kie-wb-distribution-wars-6.2.0-20140914.210952-116-eap-6_1.war

How reproducible:
Race condition.

Steps to Reproduce:
Not yet.

Actual results:
Threads trapped in HashMap.getEntry()

Expected results:
Should be avoided.

Additional info:
See attached thread dump. There is "http-localhost/127.0.0.1:8080-4" executing Kie module build through BuildServiceImpl. In its stack trace it is visible that the thread acquired lock at some point. On the other hand "http-localhost/127.0.0.1:8080-5" is loading data model without acquiring any lock (this may be the synchronization hole).

Comment 2 Jiri Locker 2015-03-25 10:14:29 UTC
The fix looks good and the issue has not appeared since it was reported.