[jboss-jira] [JBoss JIRA] (WFCORE-4609) Core threads in EnhancedQueueExecutor might timeout below core pool size even if allowCoreTimeOut is false

Cheng Fang (Jira) issues at jboss.org
Mon Aug 19 03:17:00 EDT 2019


    [ https://issues.jboss.org/browse/WFCORE-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13772235#comment-13772235 ] 

Cheng Fang commented on WFCORE-4609:
------------------------------------

It looks like the same as JBTHR-49.  But JBTHR-49 was fixed in jboss-threads version 2.3.1.Final, 2.4.0.Final, and wildfly-core currently has jboss-threads version 2.3.3.Final, but still sees this problem.


> Core threads in EnhancedQueueExecutor might timeout below core pool size even if allowCoreTimeOut is false
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: WFCORE-4609
>                 URL: https://issues.jboss.org/browse/WFCORE-4609
>             Project: WildFly Core
>          Issue Type: Bug
>          Components: IO
>    Affects Versions: 10.0.0.Beta2
>            Reporter: Miroslav Novak
>            Assignee: Flavia Rainone
>            Priority: Major
>
> I can see unexpected behavior in EnhancedQueueExecutor [1]. Even when I set allowsCoreThreadTimeOut to false, sometimes happens that pool size goes below core size by a few threads.
> Test scenario:
> - create EnhancedQueueExecutor with coreSize=3, maxSize=6, allowsCoreThreadTimeOut=false, keepAliveTimeout=1000ms
> - submit 6 threads into executor and wait until all are running so maxSize is reached
> - allow all threads to finish and wait some time for threads to timeout
> Expected result is that poolSize will be 3 as coreSize=3 but sometimes happens that poolSize is 2 or 1. 
> This might not be a bug as EnhancedQueueExecutor estimates its pool size and might allow to timeout more threads than coreSize. I'm creating this jira so it's explained for future reference.
> [1] https://github.com/jbossas/jboss-threads/blob/2.3.3.Final/src/main/java/org/jboss/threads/EnhancedQueueExecutor.java
> [2] https://issues.jboss.org/browse/EAP7-488



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list