RFR: 8327501: Common ForkJoinPool prevents class unloading in some cases

Alan Bateman alanb at openjdk.org
Thu Mar 7 08:19:52 UTC 2024


On Wed, 6 Mar 2024 22:58:54 GMT, Viktor Klang <vklang at openjdk.org> wrote:

> The common ForkJoinPool creating threads as a result of submitting tasks is preventing class unloading when the thread construction is initiated from a class loaded in a separate classloader. This fix avoids that when no SecurityManager is configured.

Marked as reviewed by alanb (Reviewer).

The inherited access control context bites again. Creating a Thread takes a snapshot of the caller context which can include several protection domains. In the bug report it includes a ProtectionDomain for a custom class loader. The good news is that removal of the security manager mode of execution means that this can go away.

-------------

PR Review: https://git.openjdk.org/jdk/pull/18144#pullrequestreview-1921749299
PR Comment: https://git.openjdk.org/jdk/pull/18144#issuecomment-1982882897


More information about the core-libs-dev mailing list