Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration test bouncycastle-fips fails to compile natively with GraalVM CE 21.3 Java 17 #21374

Closed
Tracked by #21481
zakkak opened this issue Nov 11, 2021 · 5 comments · Fixed by #21785
Closed
Tracked by #21481
Assignees
Labels
area/mandrel env/graalvm-java17 Relating to using GraalVM native generation Java 11 kind/bug Something isn't working
Milestone

Comments

@zakkak
Copy link
Contributor

zakkak commented Nov 11, 2021

Describe 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 #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

132d9ea

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)

@quarkus-bot
Copy link

quarkus-bot bot commented Nov 11, 2021

/cc @Karm, @galderz

@sberyozkin
Copy link
Member

@zakkak Hi, sun.security.internal.spec.TlsKeyMaterialParameterSpec - perhaps it has been renamed or moved ?

@zakkak
Copy link
Contributor Author

zakkak commented Nov 11, 2021

@sberyozkin good point. It looks like it's still present just deprecated. See https://github.com/graalvm/labs-openjdk-17/blob/master/src/java.base/share/classes/sun/security/internal/spec/TlsKeyMaterialParameterSpec.java

Judging by #21359 it's probably not accessible due to stronger encapsulation.

@sberyozkin
Copy link
Member

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

@jerboaa
Copy link
Contributor

jerboaa commented Nov 15, 2021

@sberyozkin Yes, getting those kinds of issues fixed upstream would be the best avenue.

@zakkak zakkak added env/graalvm-java17 Relating to using GraalVM native generation Java 11 kind/bug Something isn't working labels Nov 17, 2021
@maxandersen maxandersen mentioned this issue Nov 17, 2021
11 tasks
zakkak added a commit to zakkak/quarkus that referenced this issue Nov 29, 2021
@zakkak zakkak self-assigned this Nov 29, 2021
zakkak added a commit to zakkak/quarkus that referenced this issue Dec 1, 2021
zakkak added a commit to zakkak/quarkus that referenced this issue Dec 1, 2021
@quarkus-bot quarkus-bot bot added this to the 2.6 - main milestone Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/mandrel env/graalvm-java17 Relating to using GraalVM native generation Java 11 kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants