Jon Kranes created WFLY-4640:
--------------------------------
Summary: ScheduledExecutor fails with NPE during concurrent execution of
fixed-rate tasks
Key: WFLY-4640
URL:
https://issues.jboss.org/browse/WFLY-4640
Project: WildFly
Issue Type: Bug
Components: EE
Affects Versions: 8.1.0.Final
Reporter: Jon Kranes
The ManagedScheduledExecutorService can permanently abort a given fixed-rate task if the
task is executed by multiple executor threads concurrently.
The resulting error is:
SEVERE [org.glassfish.enterprise.concurrent]
EE-ManagedScheduledExecutorService-default-Thread-x) java.lang.NullPointerException.
Once this error occurs, the task will not execute again.
This is clearly not a typical condition as one would generally expect the
ManagedScheduledExecutorService to be used to support tasks where the execution frequency
is much higher than the time taken to execute the task, thus we would not normally expect
multiple threads to execute the task concurrently. However one could imagine conditions
under which this might occur, for example if the task execution was slowed by some unusual
system load condition. In any case it seems reasonable to expect this condition should
fail gracefully in a way that does not permanently prevent all future executions of the
scheduled task.
Note that tasks submitted using scheduleWithFixedDelay do not seem subject to this issue,
presumably because the executor service waits for completion of each task and thus does
not end up in a concurrent execution situation.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)