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

Fix: gauss-mix and als benchmarks. #3581

Closed
wants to merge 1 commit into from

Conversation

jovanstevanovic
Copy link
Member

Stacktrace:

The following benchmarks failed: als
at com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:87)
at com.oracle.svm.reflect.serialize.SerializationSupport.getSerializationConstructorAccessor(SerializationSupport.java:132)
at jdk.internal.reflect.MethodAccessorGenerator.generateSerializationConstructor(MethodAccessorGenerator.java:48)
at jdk.internal.reflect.ReflectionFactory.generateConstructor(ReflectionFactory.java:514)
at jdk.internal.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:427)
at sun.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:103)
at org.apache.spark.util.ClosureCleaner$.org$apache$spark$util$ClosureCleaner$$instantiateClass(ClosureCleaner.scala:308)
at org.apache.spark.util.ClosureCleaner$$anonfun$org$apache$spark$util$ClosureCleaner$$clean$23.apply(ClosureCleaner.scala:251)
at org.apache.spark.util.ClosureCleaner$$anonfun$org$apache$spark$util$ClosureCleaner$$clean$23.apply(ClosureCleaner.scala:245)
at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:778)
at scala.collection.immutable.List.foreach(List.scala:381)
...

Command to reproduce:
mx --env ni-ce benchmark renaissance-native-image:als -- --jvm=native-image --jvm-config=default-ce
mx --env ni-ce benchmark renaissance-native-image:gauss-mix -- --jvm=native-image --jvm-config=default-ce

@graalvmbot
Copy link
Collaborator

Hello jovanstevanovic, thanks for contributing a PR to our project!

We use the Oracle Contributor Agreement to make the copyright of contributions clear. We don't have a record of you having signed this yet, based on your email address jovan -(dot)- stevanovic1 -(at)- outlook -(dot)- com. You can sign it at that link.

If you think you've already signed it, please comment below and we'll check.

@olpaw olpaw self-requested a review July 15, 2021 08:16
@olpaw
Copy link
Member

olpaw commented Jul 15, 2021

The PR looks good but the OCA check failed. Could it be that you used a different email address in your commits?

@@ -942,6 +942,37 @@ private static boolean objectStreamClassConstructor(JNIEnvironment jni, Breakpoi
return true;
}

private static boolean customTargetConstructorSerialization(JNIEnvironment jni, @SuppressWarnings("unused") Breakpoint bp, InterceptedState state) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a comment here explaining what we catch and what we output.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Provided a short description.

@@ -1241,6 +1279,9 @@ public static void onUnload() {
"(Ljava/lang/ClassLoader;[Ljava/lang/Class;Ljava/lang/reflect/InvocationHandler;)Ljava/lang/Object;", BreakpointInterceptor::newProxyInstance),

brk("java/io/ObjectStreamClass", "<init>", "(Ljava/lang/Class;)V", BreakpointInterceptor::objectStreamClassConstructor),
brk("jdk/internal/reflect/ReflectionFactory",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Java 8, this class would be called sun.reflect.ReflectionFactory - since this breakpoint is not optional, this would make the agent always fail on Java 8 as it won't be able to resolve this class. We could either make this breakpoint an optionalBrk or we could generate the class name based on the JDK version (using com.oracle.svm.core.jdk.Package_jdk_internal_reflect#getQualifiedName)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants