question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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 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:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jerboaacommented, Nov 15, 2021

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

1reaction
sberyozkincommented, Nov 12, 2021

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

21.3.3 - GraalVM
Java 17 support: The GraalVM distributions based on Oracle Java 17 and ... If this check fails, the compiled code will deoptimize and...
Read more >
GraalVM - RESTHeart
GraalVM is a new virtual machine from Oracle that supports a polyglot runtime environment and the ability to compile Java applications to native...
Read more >
chore(deps): update dependency io.quarkus:quarkus ... - GitLab
An error occurred while retrieving approval data for this merge request. chore(deps): update dependency io.quarkus:quarkus ...
Read more >
GraalVM 21.3 is here: Java 17, Native Image performance ...
However, that condition implies x > 5 && y instanceof A , which means throw Error() will be executed. That is, the call...
Read more >
Testing Quarkus Web Applications: Component & Integration ...
Quarkus is a full-stack, Kubernetes-native Java framework made for JVMs and native compilation. This article focuses on using some of the Quarkus testing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found