Integration test bouncycastle-fips fails to compile natively with GraalVM CE 21.3 Java 17
See original GitHub issueDescribe the bug
Native compilation of integration test bouncycastle-fips
fails with GraalVM CE 21.3 Java17 (quay.io/quarkus/ubi-quarkus-native-image:21.3-java17
)
See https://github.com/graalvm/mandrel/runs/4170345254?check_suite_focus=true
Note, I need to look further in this issue but it looks similar to https://github.com/quarkusio/quarkus/issues/21359.
Expected behavior
bouncycastle FIPS test should build and run.
Actual behavior
Test fails to build with:
Error: Unsupported features in 10 methods
Detailed message:
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: sun.security.internal.spec.TlsKeyMaterialParameterSpec. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
Trace:
at parsing org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSKeyMaterialGenerator$1.run(Unknown Source)
Call path from entry point to org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSKeyMaterialGenerator$1.run():
at org.bouncycastle.jcajce.provider.ProvSunTLSKDF$TLSKeyMaterialGenerator$1.run(Unknown Source)
at com.oracle.svm.core.jdk.Target_java_security_AccessController.doPrivileged(SecuritySubstitutions.java:87)
at java.io.ObjectStreamClass.getSerialVersionUID(ObjectStreamClass.java:289)
at java.io.ObjectStreamClass.toString(ObjectStreamClass.java:350)
at java.lang.String.valueOf(String.java:4215)
at java.io.PrintStream.println(PrintStream.java:1028)
at com.oracle.svm.jni.functions.JNIFunctions.ExceptionDescribe(JNIFunctions.java:775)
at com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_ExceptionDescribe_b5412f7570bccae90b000bc37855f00408b2ad73(generated:0)
...
How to Reproduce?
./mvnw -Dnative -Dnative.surefire.skip -pl integration-tests/bouncycastle-fips package -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:21.3-java17
Output of uname -a
or ver
5.14.15-200.fc34.x86_64 #1 SMP Wed Oct 27 15:53:30 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Output of java -version
OpenJDK 64-Bit Server VM Temurin-11.0.13+8 (build 11.0.13+8, mixed mode)
GraalVM version (if different from Java)
OpenJDK 64-Bit Server VM GraalVM CE 21.3.0 (build 17.0.1+12-jvmci-21.3-b05, mixed mode, sharing)
Quarkus version or git rev
132d9ea09b795d6027d557f46627092cfb29ce29
Build tool (ie. output of mvnw --version
or gradlew --version
)
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
@sberyozkin Yes, getting those kinds of issues fixed upstream would be the best avenue.
Hey @zakkak, I see you have it under control with a somewhat related #21408, so hope the same can be possible for this case - in meantime I’ll also try to report the problem in the bouncycastle fips project for them to start considering how to avoid depending on this now deprecated internal sun code