Bug 1277699

Summary: [GSS](6.4.z) TempFileProviderService threads consume high CPU
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Aaron Ogburn <aogburn>
Component: ServerAssignee: Aaron Ogburn <aogburn>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Truhlar <jtruhlar>
Severity: unspecified Docs Contact: eap-docs <eap-docs>
Priority: unspecified    
Version: 6.4.4CC: bmaxwell, cdewolf, dosoudil, jason.greene, jbilek, jtruhlar
Target Milestone: CR1   
Target Release: EAP 6.4.10   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-17 13:02:11 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:
Bug Depends On:    
Bug Blocks: 1339868    
Attachments:
Description Flags
WFCORE-1093.btm none

Description Aaron Ogburn 2015-11-03 21:01:25 UTC
Description of problem:

TempFileProviderService threads consume high CPU.  TempFileProviderService threads consume high CPU as they poll their non empty task queue. This is ultimately due to a flaw in the JDK ThreadPoolExecutor code (https://bugs.openjdk.java.net/browse/JDK-8129861), impacting ScheduledThreadPoolExecutors that use a core size of 0 and a default 0 keepalive timeout.

While the executor queue is not empty, the executor does not allow the pool to go below 1 thread. So the one remaining work thread keeps looping over its poll call with a 0 timeout.


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


How reproducible:


Steps to Reproduce:
1. Use the attached byteman script to force work to the TempFileProviderService threads.
2. Deploy and undeploy an app
3.

Actual results:

A TempFileProviderService thread consumes high CPU while polling the queue

Expected results:

No high CPU usage from TempFileProviderService threads


Additional info:

Comment 1 Aaron Ogburn 2015-11-03 21:06:15 UTC
Created attachment 1089218 [details]
WFCORE-1093.btm

Comment 2 Aaron Ogburn 2015-11-03 21:15:07 UTC
PR: https://github.com/jbossas/jboss-eap/pull/2614

Comment 4 Mike McCune 2016-03-28 22:15:42 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 6 Jiří Bílek 2016-08-31 07:29:57 UTC
Verified with EAP 6.4.10.CP.CR2

Comment 7 Petr Penicka 2017-01-17 13:02:11 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.

Comment 8 Petr Penicka 2017-01-17 13:02:58 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.