You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Richard Zowalla (Jira)" <ji...@apache.org> on 2026/09/20 17:02:00 UTC

[jira] [Closed] (TOMEE-4704) CUTask.invoke() does not safely propagate errors to ManagedTask

     [ https://issues.apache.org/jira/browse/TOMEE-4704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Zowalla closed TOMEE-4704.
----------------------------------
    Resolution: Fixed

Fixed on main via #2940 (af5c06fb82a674f80fe660238a6dde28b7fe2d3c) and backported to tomee-10.x as 8004a2aeffb38dc87b331b21c874e47cc47ee844.

> 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
>            Assignee: Richard Zowalla
>            Priority: Major
>             Fix For: 11.0.0, 10.3.0
>
>
> 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)