You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are experiencing a noticeable slowdown in the execution of the PBKDF2WithHmacSHA256 algorithm in javax.crypto.SecretKeyFactory. This performance degradation began after upgrading from graalvm-jdk-17.0.13+10.1 to graalvm-jdk-21.0.5+9.1. The issue was observed on Linux x64, but not on macOS arm64. All VM versions were downloaded from the official GraalVM website and Oracle website.
java 21.0.5 2024-10-15 LTS
Java(TM) SE Runtime Environment Oracle GraalVM 21.0.5+9.1 (build 21.0.5+9-LTS-jvmci-23.1-b48)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.5+9.1 (build 21.0.5+9-LTS-jvmci-23.1-b48, mixed mode, sharing)
JDK major version: 21
OS: Ubuntu 24.04.1 LTS
Architecture: x86_64
More details
It was suggested in the GraalVM Slack to execute the code using the option -Dgraal.CompilationFailureAction=ExitVM, but it did not produce any logs. However, when adding -Dgraal.CompilationBailoutAsFailure=true, we received the following logs (both in GraalVM 17 and GraalVM 21).
Thread[JVMCI-native CompilerThread0,5,main]: Compilation of com.sun.crypto.provider.PBKDF2KeyImpl.deriveKey(Mac, byte[], byte[], int, int) @ 198 failed:
jdk.vm.ci.code.BailoutException: Code installation failed: dependencies failed
Failed dependency of type abstract_with_unique_concrete_subtype
context = *sun.security.provider.DigestBase
class = sun.security.provider.SHA2$SHA256
witness = sun.security.provider.SHA
at [email protected]/jdk.vm.ci.hotspot.HotSpotCodeCacheProvider.installCode(HotSpotCodeCacheProvider.java:149)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.target.Backend.createInstalledCode(Backend.java:205)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.CompilationTask.installMethod(CompilationTask.java:439)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.CompilationTask$HotSpotCompilationWrapper.performCompilation(CompilationTask.java:204)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.CompilationTask$HotSpotCompilationWrapper.performCompilation(CompilationTask.java:109)
at jdk.internal.vm.compiler/org.graalvm.compiler.core.CompilationWrapper.run(CompilationWrapper.java:224)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.CompilationTask.runCompilation(CompilationTask.java:407)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.CompilationTask.runCompilation(CompilationTask.java:380)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.HotSpotGraalCompiler.compileMethod(HotSpotGraalCompiler.java:159)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.HotSpotGraalCompiler.compileMethod(HotSpotGraalCompiler.java:681)
at jdk.internal.vm.compiler/org.graalvm.compiler.hotspot.HotSpotGraalCompiler.compileMethod(HotSpotGraalCompiler.java:110)
at [email protected]/jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.compileMethod(HotSpotJVMCIRuntime.java:924)
If in an environment where setting system properties is possible, the following
properties are available to change compilation failure reporting:
- To disable compilation failure notifications, set CompilationFailureAction to Silent (e.g., -Dgraal.CompilationFailureAction=Silent).
- To print a message for a compilation failure without retrying the compilation, set CompilationFailureAction to Print (e.g., -Dgraal.CompilationFailureAction=Print).
Retrying compilation of com.sun.crypto.provider.PBKDF2KeyImpl.deriveKey(Mac, byte[], byte[], int, int) @ 198
Dumping IGV graphs in /home/gabriel/playground/benchCrypto/graal_dumps/2024.12.09.13.58.02.738/graal_diagnostics_140234@1/com.sun.crypto.provider.PBKDF2KeyImpl.deriveKey(Mac,_byte[],_byte[],_int,_int)_@_198
The text was updated successfully, but these errors were encountered:
fernando-valdez
changed the title
Performance regression in PBKDF2WithHmacSHA256 on GraalVM 21
[GR-60402] Performance regression in PBKDF2WithHmacSHA256 on GraalVM 21
Dec 10, 2024
https://github.com/gabrielmattar/GR-60402
Describe the issue:
We are experiencing a noticeable slowdown in the execution of the
PBKDF2WithHmacSHA256
algorithm injavax.crypto.SecretKeyFactory
. This performance degradation began after upgrading fromgraalvm-jdk-17.0.13+10.1
tograalvm-jdk-21.0.5+9.1
. The issue was observed on Linux x64, but not on macOS arm64. All VM versions were downloaded from the official GraalVM website and Oracle website.Benchmark results on Linux x64:
Steps to reproduce the issue:
Describe GraalVM and your environment:
More details
It was suggested in the GraalVM Slack to execute the code using the option -Dgraal.CompilationFailureAction=ExitVM, but it did not produce any logs. However, when adding -Dgraal.CompilationBailoutAsFailure=true, we received the following logs (both in GraalVM 17 and GraalVM 21).
The text was updated successfully, but these errors were encountered: