[jdk8u-dev] RFR: 8212155: Race condition when posting dynamic_code_generated event leads to JVM crash
Kerem Kat
krk at openjdk.org
Thu Aug 14 12:51:18 UTC 2025
On Thu, 14 Aug 2025 10:25:41 GMT, Kerem Kat <krk at openjdk.org> wrote:
> Backport of [JDK-8212155](https://bugs.openjdk.org/browse/JDK-8212155).
>
> The patch did not apply cleanly due to a merge conflict. The original code `JvmtiThreadState::state_for(JavaThread::current())` had already been refactored to `JavaThread::current()->jvmti_thread_state()` in this branch.
>
> I have also removed the `@requires vm.jvmti` tag from the test, as it is not supported by the jtreg version in JDK 11.
>
> For JDK 8, `DynamicCodeGeneratedTest.sh` was added as the runner, which compiles the library first.
>
> The `DynamicCodeGeneratedTest` was confirmed to sometimes crash without this patch and passes with it.
Failing tests seem unrelated:
### Windows x64 release and debug build:
```
No configurations found for /cygdrive/c/a/jdk8u-dev/jdk8u-dev/jdk/! Please run configure to create a configuration.
Makefile:55: *** Cannot continue. Stop.
```
### macOS x64 jdk/security_infra:
```
security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java#microsoftecc2017
```
Looks similar to https://github.com/openjdk/jdk8u-dev/pull/673
### Linux x86 hotspot/tier1:
```
gc/concurrentMarkSweep/CheckAllocateAndSystemGC.java
```
Test timed out:
```
ACTION: main -- Error. Program `/home/runner/jdk-linux-x86/jdk-1.8.0-internal+0_linux-x86_bin/j2sdk-image/bin/java' timed out (timeout set to 480000ms, elapsed time including timeout handling was 480396ms).
REASON: User specified action: run main/othervm CheckAllocateAndSystemGC
```
also observed in https://github.com/openjdk/jdk8u-dev/pull/628#issue-2879060105
-------------
PR Comment: https://git.openjdk.org/jdk8u-dev/pull/674#issuecomment-3188338477
More information about the jdk8u-dev
mailing list