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

[GR-58048] Unexpected process finished for GraalVM for JDK 22 #9629

Closed
Montura opened this issue Sep 6, 2024 · 2 comments
Closed

[GR-58048] Unexpected process finished for GraalVM for JDK 22 #9629

Montura opened this issue Sep 6, 2024 · 2 comments
Assignees

Comments

@Montura
Copy link

Montura commented Sep 6, 2024

Describe the issue
This Java program has to be finished with an exception when the exception occurred in the static initializer.

public class Test {
  static {
    init();
  }

  private static void init() {
    if (true) {
      throw new IllegalArgumentException("asdf");
    }
  }

  public static void main(String[] args) {
    System.out.println("Hello world!");
  }
}

But it ends just with a message: Process finished with exit code 1

Steps to reproduce the issue
Please include both build steps as well as run steps

  1. Setup JAVA_HOME to graalvm CE/EE 22.0.2
  2. Run code snapshot (above)

Describe GraalVM and your environment:

  • GraalVM version: CE and EE 22.0.2
  • JDK major version: 22
  • OS: Mac OS Sonoma 14.5
  • Architecture: aarch64

More details
Expected behavior:
image

Actual behavior:
image

From console:
image

@Montura Montura added the bug label Sep 6, 2024
@oubidar-Abderrahim oubidar-Abderrahim self-assigned this Sep 6, 2024
@chumer
Copy link
Member

chumer commented Sep 6, 2024

I was helping the Author of this issue to reproduce. Note that this issue is not happening with GraalVM for JDK 21.
For more context please see the Slack discussion:
https://graalvm.slack.com/archives/CNQSB2DHD/p1725480651052459

@oubidar-Abderrahim oubidar-Abderrahim changed the title Unexpected process finished for GraalVM for JDK 22 [GR-58048] Unexpected process finished for GraalVM for JDK 22 Sep 9, 2024
@wirthi
Copy link
Member

wirthi commented Sep 12, 2024

This is a bug in upstream JDK. It can easily be reproduced outside GraalVM. I can confirm it is not happening in (open) jdk-21.0.2, but showing up in (open) jdk-22.0.2.

It seems to be resolved on the master branch of the jdk, so a fix will eventually land in a release (and in GraalVM).

Probable cause/fix: https://bugs.openjdk.org/browse/JDK-8330864

@wirthi wirthi closed this as completed Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants