Integrated: 8361952: Installation of MethodData::extra_data_lock() misses synchronization on reader side
Thomas Schatzl
tschatzl at openjdk.org
Mon Jul 14 09:02:51 UTC 2025
On Fri, 11 Jul 2025 09:47:05 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> please review this change that fixes some recently introduced atomic installation of a mutex, where the memory barrier (`load_acquire`) on the reader side. Without it the reader might get a valid pointer to the `Mutex` created on the fly, without it being initialized properly.
>
> Found during code inspection for https://bugs.openjdk.org/browse/JDK-8361706 ; due to some suspicious hangs in the `MutexLocker` while cleaning klasses during class unloading in parallel (multiple threads hanging in `MethodData::clean_method_data`), executing the `vmTestbase/nsk/jvmti/RedefineClasses/StressRedefine/TestDescription.java` test.
>
> Testing: gha
>
> Thanks,
> Thomas
This pull request has now been integrated.
Changeset: 272e66d0
Author: Thomas Schatzl <tschatzl at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/272e66d017a3497d9af4df6f042c741ad8a59dd6
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
8361952: Installation of MethodData::extra_data_lock() misses synchronization on reader side
Reviewed-by: shade, coleenp, dholmes
-------------
PR: https://git.openjdk.org/jdk/pull/26262
More information about the hotspot-dev
mailing list