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

Bump GraalVM version to 20.2.0 #1090

Closed
12 of 14 tasks
radeusgd opened this issue Aug 19, 2020 · 3 comments · Fixed by #1094
Closed
12 of 14 tasks

Bump GraalVM version to 20.2.0 #1090

radeusgd opened this issue Aug 19, 2020 · 3 comments · Fixed by #1094
Assignees
Labels
--breaking Important: a change that will break a public API or user-facing behaviour d-hard Difficulty: significant prior knowledge required p-high Should be completed in the next sprint

Comments

@radeusgd
Copy link
Member

radeusgd commented Aug 19, 2020

Summary

New version of GraalVM has been released and we want to start using it soon.

Value

  • We use the most up-to date version of GraalVM.
    • It contains more recent functionalities and bugfixes.

Specification

  • Change the GraalVM version in build.sbt, scala.yml, release.yml and other places if necessary.
  • Update the docs (especially CONTRIBUTING and Getting Enso).
  • Update the static Native Image build on Linux
    • The new version has a different way of changing the libc to musl, so the build job has to be updated. It may be impossible to reuse the bundle, so we may need to build it manually.
  • Check that everything is compiling and passing tests.
    • runtime
    • language-server
    • runner
    • launcher
  • Verify that functionality not directly covered by test works.
    • Especially important to test long HTTPS connections in the launcher as they are known to have been problematic in the past and it's easy to miss that.
  • Ensure that the CI is working correctly with the new version and the checks are passing.
  • Run the benchmarks on the old and new version and check if there are regressions.
  • Try removing a guard in LoopingCallOptimiserNode (as in the TODO there).
  • It may be useful to write a short checklist for developers on upgrading (necessary steps include installing the GraalVM, installing Native Image for it and running sbt bootstrap).

Acceptance Criteria & Test Cases

  • The tests and CI are still passing on the new version.
@radeusgd radeusgd added Type: Enhancement d-hard Difficulty: significant prior knowledge required --breaking Important: a change that will break a public API or user-facing behaviour p-high Should be completed in the next sprint labels Aug 19, 2020
@radeusgd radeusgd self-assigned this Aug 19, 2020
@radeusgd radeusgd changed the title Bump GraalVM version to 20.20 Bump GraalVM version to 20.2.0 Aug 19, 2020
@kustosz
Copy link
Contributor

kustosz commented Aug 19, 2020

Make sure to double-check the benchmarks, because the default inlining strategy changes in this release.

@radeusgd
Copy link
Member Author

radeusgd commented Aug 19, 2020

Current issues:

  • Building launcher Native Image fails with:
    • Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Invoke with MethodHandle argument could not be reduced to at most a single call or single field access. The method handle must be a compile time constant, e.g., be loaded from a static final field. Method that contains the method handle invocation: java.lang.invoke.LambdaForm$MH/1301106384.invoke_MT(Object, Object) This can be suppressed with --report-unsupported-elements-at-runtime but will likely result in some functionality crashing at runtime.
      • After running it fails on scala.runtime.Statics.releaseFence (called for example by scala.collection.immutable.ArraySeq.map) throwing com.oracle.svm.core.jdk.UnsupportedFeatureError: Invoke with MethodHandle argument could not be reduced to at most a single call or single field access. The method handle must be a compile time constant, e.g., be loaded from a static final field. Method that contains the method handle invocation: java.lang.invoke.LambdaForm$MH/781343311.invoke_MT(Object, Object). May be related to this bug.
    • Using the musl-gcc without a default libstdc++ uses the platform default one which causes undefined reference errors because it is usually built with glibc. To avoid that the libstdc++.a may be copied from the old bundle.

@radeusgd
Copy link
Member Author

radeusgd commented Aug 20, 2020

These two Native Image issues have been solved.

  • The first one has been reported as a bug and a workaround has been implemented.
  • Added additional initialization logic to the musl bundle that allows to use it with GraalVM 20.2.

The launcher compiles to the native binary and passes all tests.

Currently there is an issue with the runtime - it compiles, but when running the tests, most of them fail with java.lang.NoClassDefFoundError: Could not initialize class org.graalvm.polyglot.Engine$ImplHolder or java.lang.NoClassDefFoundError: Could not initialize class com.oracle.truffle.api.Truffle. Turns out a clean build was necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
--breaking Important: a change that will break a public API or user-facing behaviour d-hard Difficulty: significant prior knowledge required p-high Should be completed in the next sprint
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants