Karm / mandrel-integration-tests

Integration tests for GraalVM and its Mandrel distribution. Runs Quarkus, Helidon and Micronaut applications and small targeted reproducers. The focus is solely on native-image utility and compilation of Java applications into native executables.
Apache License 2.0
5 stars 3 forks source link

JFR tests fails with 21+25 ea based Mandrel build #161

Closed jerboaa closed 1 year ago

jerboaa commented 1 year ago

JDK 21+25-ea with latest GraalVM master fails JFR tests with:

 2023-06-05 03:30:20.728 INFO  [o.g.t.i.JFRTest] (jfrSmoke) Running Native mode...
Error:  Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 237.174 s <<< FAILURE! - in org.graalvm.tests.integration.JFRTest
Error:  jfrOptionsSmokeTest{TestInfo}  Time elapsed: 115.758 s  <<< FAILURE!
org.opentest4j.AssertionFailedError: 
build-and-run.log log should not contain error or warning lines that are not whitelisted. See /home/runner/work/mandrel/mandrel/mandrel-integration-tests/testsuite/target/archived-logs/org.graalvm.tests.integration.JFRTest/jfrOptionsSmokeTest/build-and-run.log and check these offending lines: 
[warn][jfr,system] Exception occurred during execution of event jdk.ContainerConfiguration(24194) ==> expected: <true> but was: <false>
    at org.graalvm.tests.integration.JFRTest.jfrOptionsSmoke(JFRTest.java:331)
    at org.graalvm.tests.integration.JFRTest.jfrOptionsSmokeTest(JFRTest.java:193)

Note the JFR warning message at runtime which seems to indicate some initialization of the event fails:

[warn][jfr,system] Exception occurred during execution of event jdk.ContainerConfiguration(24194) ==> expected: <true> but was: <false>

See: https://github.com/graalvm/mandrel/actions/runs/5172441559/jobs/9317239703#step:11:13590

This might be related to https://github.com/Karm/mandrel-integration-tests/issues/139 At least the symptom is the same.

zakkak commented 1 year ago

This might be related to #139 At least the symptom is the same.

Do you mean #126?

zakkak commented 1 year ago

I confirm that this is related to #126

The exception is:

java.lang.UnsatisfiedLinkError: jdk.internal.platform.CgroupMetrics.getTotalSwapSize0()J [symbol: Java_jdk_internal_platform_CgroupMetrics_getTotalSwapSize0 or Java_jdk_intern
al_platform_CgroupMetrics_getTotalSwapSize0__]
    at org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.access.JNINativeLinkage.getOrFindEntryPoint(JNINativeLinkage.java:152)
    at org.graalvm.nativeimage.builder/com.oracle.svm.core.jni.JNIGeneratedMethodSupport.nativeCallAddress(JNIGeneratedMethodSupport.java:54)
    at java.base@21-internal/jdk.internal.platform.CgroupMetrics.getTotalSwapSize0(Native Method)
    at java.base@21-internal/jdk.internal.platform.CgroupMetrics.getMemoryAndSwapLimit(CgroupMetrics.java:147)
    at jdk.jfr@21-internal/jdk.jfr.internal.instrument.JDKEvents.emitContainerConfiguration(JDKEvents.java:221)
    at jdk.jfr@21-internal/jdk.jfr.internal.periodic.JDKEventTask.execute(JDKEventTask.java:52)
    at jdk.jfr@21-internal/jdk.jfr.internal.periodic.PeriodicTask.run(PeriodicTask.java:128)
    at jdk.jfr@21-internal/jdk.jfr.internal.periodic.PeriodicEvents.doChunkBegin(PeriodicEvents.java:82)
    at jdk.jfr@21-internal/jdk.jfr.internal.PlatformRecorder.start(PlatformRecorder.java:283)
    at jdk.jfr@21-internal/jdk.jfr.internal.PlatformRecording.start(PlatformRecording.java:120)
    at jdk.jfr@21-internal/jdk.jfr.Recording.start(Recording.java:177)
    at org.graalvm.nativeimage.builder/com.oracle.svm.core.jfr.JfrManager.initRecording(JfrManager.java:246)
    at org.graalvm.nativeimage.builder/com.oracle.svm.core.jfr.JfrManager.lambda$startupHook$0(JfrManager.java:91)
    at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.RuntimeSupport.executeHooks(RuntimeSupport.java:161)
    at org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk.RuntimeSupport.initialize(RuntimeSupport.java:98)
    at org.graalvm.sdk/org.graalvm.nativeimage.VMRuntime.initialize(VMRuntime.java:65)

https://bugs.openjdk.org/browse/JDK-8299858 introduces CgroupMetrics.getTotalSwapSize0 which is not supported by GraalVM / Mandrel

zakkak commented 1 year ago

Upstream issue: https://github.com/oracle/graal/issues/6739

Upstream fix: https://github.com/oracle/graal/pull/6740

zakkak commented 1 year ago

Upstream fix is now merged. The issue is no longer reproducing.