-
Bug
-
Resolution: Fixed
-
P3
-
8, 11, 13
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8235316 | 11.0.7-oracle | Ivan Gerasimov | P3 | Resolved | Fixed | b01 |
JDK-8228586 | 11.0.5 | Doug Lea | P3 | Resolved | Fixed | b01 |
As referenced by Thomas Stuefe in:
http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2019-April/033512.html
ThreadPoolExecutor.addWorker has:
if (t.isAlive()) // precheck that t is startable
throw new IllegalThreadStateException();
but that is not a sufficient check for being "startable" as a thread that has already terminated is "not alive". If such a thread is then "started" the code will throw IllegalThreadStateException without doing proper cleanup of the worker list.
http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2019-April/033512.html
ThreadPoolExecutor.addWorker has:
if (t.isAlive()) // precheck that t is startable
throw new IllegalThreadStateException();
but that is not a sufficient check for being "startable" as a thread that has already terminated is "not alive". If such a thread is then "started" the code will throw IllegalThreadStateException without doing proper cleanup of the worker list.
- backported by
-
JDK-8228586 ThreadPoolExecutor: Thread.isAlive() is not equivalent to not being startable
- Resolved
-
JDK-8235316 ThreadPoolExecutor: Thread.isAlive() is not equivalent to not being startable
- Resolved
- relates to
-
JDK-8221893 ApplicationShutdownHook: Thread.isAlive() is not equivalent to not being startable
- Open
-
JDK-8221657 java.lang.Thread::setDaemon modifies the state of terminated threads
- Open