Bug 1126683 - QueuelessExecutor may not run listener when workers were active during shutdown
Summary: QueuelessExecutor may not run listener when workers were active during shutdown
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Other
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: DR8
: EAP 6.4.0
Assignee: John Allen
QA Contact: Pavel Slavicek
eap-docs
URL:
Whiteboard:
Depends On: 1159002
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-05 05:20 UTC by James Livingston
Modified: 2019-08-19 12:40 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
JBoss Issue Tracker JBTHR-28 Major Resolved QueuelessExecutor may not run listener when workers were active during shutdown 2018-06-04 02:54:32 UTC

Description James Livingston 2014-08-05 05:20:57 UTC
If there are threads running when QueuelessExecutor.shutdown() is called, it does not call shutdownListenable.shutdown() and relies on the handling in Worker.run() to invoke that once the last thread has shut down.

https://github.com/jbossas/jboss-threads/blob/master/src/main/java/org/jboss/threads/QueuelessExecutor.java#L673 will set the flag to invoke it if the conditions are met. That logic is defeated by https://github.com/jbossas/jboss-threads/blob/master/src/main/java/org/jboss/threads/QueuelessExecutor.java#L632, which will remove the thread first causing the remove call in the finally block to always return false and so not set the last flag.

Comment 1 James Livingston 2014-08-06 22:54:38 UTC
https://github.com/jbossas/jboss-threads/pull/11 is for the 2.1 branch, which is what we'd want to pull in to fix in the product.

Comment 2 JBoss JIRA Server 2014-10-13 15:34:59 UTC
David Lloyd <david.lloyd@redhat.com> updated the status of jira JBTHR-28 to Resolved

Comment 3 James Livingston 2014-10-13 22:25:55 UTC
Fix will be in the jboss-threads 2.1.2 release.

Comment 4 Ladislav Thon 2014-11-14 11:34:09 UTC
Verified with EAP 6.4.0.DR9.

Very easy to reproduce using the reproducer from JBTHR-29 (which is in fact a duplicate of JBTHR-28).


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