jzdayz
jzdayz

Reputation: 51

Execution Java application on Graalvm with JDK 11 gives error

When I use graalvm with OpenJDK 11 to run a Java application, something is going wrong.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f0fb81bf309, pid=22652, tid=22653
#
# JRE version: OpenJDK Runtime Environment (11.0.5+10) (build 11.0.5+10-jvmci-19.3-b05-LTS)
# Java VM: OpenJDK 64-Bit GraalVM CE 19.3.0 (11.0.5+10-jvmci-19.3-b05-LTS, mixed mode, sharing, tiered, jvmci, jvmci compiler, compressed oops, serial gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0xa83309][thread 22658 also had an error]
  LinkResolver::resolve_invokevirtual(CallInfo&, Handle, constantPoolHandle const&, int, Thread*)+0xf9
#
# Core dump will be written. Default location: /root/core.22652
#
# An error report file with more information is saved as:
# /root/hs_err_pid22652.log
Compiled method (JVMCI)     798  580       4       java.lang.System::getSecurityManager (4 bytes)
 total in heap  [0x00007f0f9d560310,0x00007f0f9d5604f8] = 488
 relocation     [0x00007f0f9d560478,0x00007f0f9d560480] = 8
 main code      [0x00007f0f9d560480,0x00007f0f9d5604ab] = 43
 stub code      [0x00007f0f9d5604ab,0x00007f0f9d5604b0] = 5
 metadata       [0x00007f0f9d5604b0,0x00007f0f9d5604b8] = 8
 scopes data    [0x00007f0f9d5604b8,0x00007f0f9d5604c0] = 8
 scopes pcs     [0x00007f0f9d5604c0,0x00007f0f9d5604e0] = 32
 dependencies   [0x00007f0f9d5604e0,0x00007f0f9d5604e8] = 8
 JVMCI data     [0x00007f0f9d5604e8,0x00007f0f9d5604f8] = 16
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#
已放弃(吐核)

But it works on OpenJDK 11. What should I do?

Upvotes: 0

Views: 727

Answers (1)

Oleg Šelajev
Oleg Šelajev

Reputation: 3790

You encountered an issue in GraalVM, probably the best course of action is to report it to the maintainers so it can be fixed.

Please report it to the GraalVM GitHub repo: https://github.com/oracle/graal/issues.

If you can reliably reproduce the problem -- please add the reproducer program, so the team can actually reproduce the issue and check if the suggested fixes actually fix the problem.

Another quick thing that could save loads of time for debugging is to check if the issue is with the GraalVM compiler or the undelying JDK. The best way to do it is to run the same program with the -XX:-UseJVMCICompiler command line option, which will disable the GraalVM compiler and run your application in the same way OpenJDK would. If the problem persists, it's likely an issue with the underlying JDK, and while I'd encourage you to report it to the GraalVM issue tracker so others experiencing the problem can find and reference it, it's likely that it needs to be reported to OpenJDK too (because it needs to be fixed there).

If the issue disappears, then it's probably a problem introduced by adding the GraalVM compiler. All this information would be beneficial in the issue description.

I think your issue is most likely this: https://github.com/oracle/graal/issues/1892

I'd recommend you to try the GraalVM 19.3.0.2 release to see if it fixes the problem.

Upvotes: 2

Related Questions