-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
8u25
-
x86_64
-
linux_ubuntu
FULL PRODUCT VERSION :
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux rigel 3.13.0-40-generic #69-Ubuntu SMP Thu Nov 13 17:53:56 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
HP Envy dv7 laptop as well as some other machines.
A DESCRIPTION OF THE PROBLEM :
A ThreadPoolExecutor instance with 5 workers and no work ever scheduled, with ThreadPoolExecutor's shutdown method followed by awaitTermination(120000L, TimeUnit.MILLISECONDS) blocks full 120000 -even when there is no processing being performed by any workers. This is unacceptable as shutdown must be immediate as no work is being performed or may be performed.
The queue is empty and all workers are in CANCELLED state on entry to awaitTermination.
State on entry in awaitTermination:
java.util.concurrent.ThreadPoolExecutor@1ae23815[Shutting down, pool size = 5, active threads = 5, queued tasks = 0, completed tasks = 0]
workers: [java.util.concurrent.ThreadPoolExecutor$Worker@5693d1d2[State = 1, empty queue], java.util.concurrent.ThreadPoolExecutor$Worker@40199d5e[State = 1, empty queue], java.util.concurrent.ThreadPoolExecutor$Worker@7533923b[State = 1, empty queue], java.util.concurrent.ThreadPoolExecutor$Worker@c6a3f47[State = 1, empty queue], java.util.concurrent.ThreadPoolExecutor$Worker@571c7572[State = 1, empty queue]]
termination.awaitNanos(nanos) at line 1465 blocks the full duration.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Create ThreadPoolExecutor exec with 5 workers.
2) exec.shutdown
3) exec.awaitTermination(120000L, TimeUnit.MILLISECONDS)
This must return immediately - but instead blocks for full 2 minutes.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
exec.awaitTermination(120000L, TimeUnit.MILLISECONDS)
This must return immediately - but instead blocks for full 2 minutes.
ACTUAL -
exec.awaitTermination(120000L, TimeUnit.MILLISECONDS)
This must return immediately - but instead blocks for full 2 minutes.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
1) Create ThreadPoolExecutor exec with 5 workers.
2) exec.shutdown
3) exec.awaitTermination(120000L, TimeUnit.MILLISECONDS)
This must return immediately - but instead blocks for full 2 minutes.
---------- END SOURCE ----------
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux rigel 3.13.0-40-generic #69-Ubuntu SMP Thu Nov 13 17:53:56 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
HP Envy dv7 laptop as well as some other machines.
A DESCRIPTION OF THE PROBLEM :
A ThreadPoolExecutor instance with 5 workers and no work ever scheduled, with ThreadPoolExecutor's shutdown method followed by awaitTermination(120000L, TimeUnit.MILLISECONDS) blocks full 120000 -even when there is no processing being performed by any workers. This is unacceptable as shutdown must be immediate as no work is being performed or may be performed.
The queue is empty and all workers are in CANCELLED state on entry to awaitTermination.
State on entry in awaitTermination:
java.util.concurrent.ThreadPoolExecutor@1ae23815[Shutting down, pool size = 5, active threads = 5, queued tasks = 0, completed tasks = 0]
workers: [java.util.concurrent.ThreadPoolExecutor$Worker@5693d1d2[State = 1, empty queue], java.util.concurrent.ThreadPoolExecutor$Worker@40199d5e[State = 1, empty queue], java.util.concurrent.ThreadPoolExecutor$Worker@7533923b[State = 1, empty queue], java.util.concurrent.ThreadPoolExecutor$Worker@c6a3f47[State = 1, empty queue], java.util.concurrent.ThreadPoolExecutor$Worker@571c7572[State = 1, empty queue]]
termination.awaitNanos(nanos) at line 1465 blocks the full duration.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Create ThreadPoolExecutor exec with 5 workers.
2) exec.shutdown
3) exec.awaitTermination(120000L, TimeUnit.MILLISECONDS)
This must return immediately - but instead blocks for full 2 minutes.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
exec.awaitTermination(120000L, TimeUnit.MILLISECONDS)
This must return immediately - but instead blocks for full 2 minutes.
ACTUAL -
exec.awaitTermination(120000L, TimeUnit.MILLISECONDS)
This must return immediately - but instead blocks for full 2 minutes.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
1) Create ThreadPoolExecutor exec with 5 workers.
2) exec.shutdown
3) exec.awaitTermination(120000L, TimeUnit.MILLISECONDS)
This must return immediately - but instead blocks for full 2 minutes.
---------- END SOURCE ----------