Jorren Hendriks created TOMEE-4704:
--------------------------------------
Summary: CUTask.invoke() does not safely propagate errors to
ManagedTask
Key: TOMEE-4704
URL: https://issues.apache.org/jira/browse/TOMEE-4704
Project: TomEE
Issue Type: Bug
Components: TomEE Core Server
Affects Versions: 10.2.0, 11.0.0
Reporter: Jorren Hendriks
When a CUTask is invoked, there are some context updated done outside the
try/catch. When either of these updates throw it will cause two issues:
# The exception is not caught, the ManagedTaskListener is never notified
(neither started, aborted or done).
# The finally block does not run, which means initialContext.exit() is skipped
leaving state on the pool thread. The next task scheduled onto it then hits
IllegalStateException("Can't enter a context twice, create a new one, and call
enter() on that."), so one CME can poison a pool thread for every task after it.
This issue was discovered as a result of an exception thrown in this unsafe
block. [TOMEE-4699|https://issues.apache.org/jira/browse/TOMEE-4699]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)