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

java -Xcomp -Xbatch -version crashes when enabling RVC #23

Closed
feilongjiang opened this issue Sep 26, 2021 · 7 comments
Closed

java -Xcomp -Xbatch -version crashes when enabling RVC #23

feilongjiang opened this issue Sep 26, 2021 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@feilongjiang
Copy link
Collaborator

feilongjiang commented Sep 26, 2021

Hi, we find that after merging #7, java -Xcomp -Xbatch -version will crash on HiFive Unleashed Board:

With commit a96f72a

$ openjdk-17/bin/java -Xcomp -Xbatch -version
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x0000003fcd7d6d00, pid=4186477, tid=4186478
#
# JRE version: OpenJDK Runtime Environment Bisheng (17.0) (build 17+0)
# Java VM: OpenJDK 64-Bit Server VM Bisheng (17+0, compiled mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-riscv64)
# Problematic frame:
# C  0x0000003fcd7d6d00
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to /home/jenkins/workspace/riscv-openjdk/core.4186477)
#
# An error report file with more information is saved as:
# /home/jenkins/workspace/riscv-openjdk/hs_err_pid4186477.log
Compiled method (c1)     254    1       3       java.lang.invoke.MethodHandle::<clinit> (45 bytes)
total in heap  [0x0000003fcdc77010,0x0000003fcdc77918] = 2312
relocation     [0x0000003fcdc77160,0x0000003fcdc77218] = 184
main code      [0x0000003fcdc77220,0x0000003fcdc775d0] = 944
stub code      [0x0000003fcdc775d0,0x0000003fcdc77728] = 344
oops           [0x0000003fcdc77728,0x0000003fcdc77740] = 24
metadata       [0x0000003fcdc77740,0x0000003fcdc77778] = 56
scopes data    [0x0000003fcdc77778,0x0000003fcdc777e8] = 112
scopes pcs     [0x0000003fcdc777e8,0x0000003fcdc778f8] = 272
dependencies   [0x0000003fcdc778f8,0x0000003fcdc77900] = 8
nul chk table  [0x0000003fcdc77900,0x0000003fcdc77918] = 24
BFD: unrecognized disassembler option:
AHE@0x0000003fe40e1440: 0x i2c: 0x0000003fcd72bb10 c2i: 0x0000003fcd72bb50 c2iUV: 0x0000003fcd72bb1a
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
Aborted (core dumped)

Error Log: hs_err_pid4186477.log

After resetting to commit e01ee7b

-versionoutput looks good:

$ openjdk-17/bin/java -Xcomp -Xbatch -version
openjdk version "17" 2021-09-26
OpenJDK Runtime Environment Bisheng (build 17+0)
OpenJDK 64-Bit Server VM Bisheng (build 17+0, compiled mode, sharing)
@feilongjiang feilongjiang added the bug Something isn't working label Sep 26, 2021
@feilongjiang feilongjiang changed the title java -Xcomp -Xbatch -version crash after enabling RVC java -Xcomp -Xbatch -version crashs when enabling RVC Sep 26, 2021
@feilongjiang feilongjiang changed the title java -Xcomp -Xbatch -version crashs when enabling RVC java -Xcomp -Xbatch -version crashes when enabling RVC Sep 26, 2021
@zhengxiaolinX zhengxiaolinX self-assigned this Sep 26, 2021
@feilongjiang
Copy link
Collaborator Author

Looks only -Xint mode will pass:

C2 only:

$ openjdk-17/bin/java -Xcomp -Xbatch -XX:-TieredCompilation -version
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000003fbb56d640, pid=4188432, tid=4188433
#
# JRE version: OpenJDK Runtime Environment Bisheng (17.0) (build 17+0)
# Java VM: OpenJDK 64-Bit Server VM Bisheng (17+0, compiled mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-riscv64)
# Problematic frame:
# V  [libjvm.so+0x48a640]  DeoptReasonSerializer::serialize(JfrCheckpointWriter&)+0x178
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to /home/jenkins/workspace/riscv-openjdk/core.4188432)
#
# An error report file with more information is saved as:
# /home/jenkins/workspace/riscv-openjdk/hs_err_pid4188432.log
BFD: unrecognized disassembler option:
AHE@0x0000003fb40e0f50: 0x i2c: 0x0000003fa972bb10 c2i: 0x0000003fa972bb50 c2iUV: 0x0000003fa972bb1a
Compiled method (c2)     297    1             java.lang.invoke.MethodHandle::<clinit> (45 bytes)
total in heap  [0x0000003fa9749590,0x0000003fa9749868] = 728
relocation     [0x0000003fa97496e0,0x0000003fa9749710] = 48
main code      [0x0000003fa9749710,0x0000003fa9749770] = 96
stub code      [0x0000003fa9749770,0x0000003fa97497e0] = 112
oops           [0x0000003fa97497e0,0x0000003fa97497e8] = 8
metadata       [0x0000003fa97497e8,0x0000003fa97497f8] = 16
scopes data    [0x0000003fa97497f8,0x0000003fa9749808] = 16
scopes pcs     [0x0000003fa9749808,0x0000003fa9749848] = 64
dependencies   [0x0000003fa9749848,0x0000003fa9749850] = 8
handler table  [0x0000003fa9749850,0x0000003fa9749868] = 24
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
Aborted (core dumped)

Error Log: hs_err_pid4188432.log

C1 only:

$ openjdk-17/bin/java -Xcomp -Xbatch -XX:TieredStopAtLevel=1 -version
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000003fb89f65ba, pid=4188454, tid=4188455
#
# JRE version: OpenJDK Runtime Environment Bisheng (17.0) (build 17+0)
# Java VM: OpenJDK 64-Bit Server VM Bisheng (17+0, compiled mode, emulated-client, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-riscv64)
# Problematic frame:
# V  [libjvm.so+0x48a5ba]  DeoptReasonSerializer::serialize(JfrCheckpointWriter&)+0xf2
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to /home/jenkins/workspace/riscv-openjdk/core.4188454)
#
# An error report file with more information is saved as:
# /home/jenkins/workspace/riscv-openjdk/hs_err_pid4188454.log
BFD: unrecognized disassembler option:
AHE@0x0000003fb40e0f50: 0x i2c: 0x0000003fa972bb10 c2i: 0x0000003fa972bb50 c2iUV: 0x0000003fa972bb1a
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
Aborted (core dumped)

Error Log: hs_err_pid4188454.log

Interpreter only:

$ openjdk-17/bin/java -Xint -version
openjdk version "17" 2021-09-23
OpenJDK Runtime Environment Bisheng (build 17+0)
OpenJDK 64-Bit Server VM Bisheng (build 17+0, interpreted mode, sharing)

@yadongw
Copy link
Collaborator

yadongw commented Sep 30, 2021

The same binary works well on the qemu and other unleashed/unmatched board. It may be caused by riscv-software-src/opensbi@7dcb1e1. We will install the patch and test again.

@yadongw yadongw closed this as completed Oct 9, 2021
@yadongw
Copy link
Collaborator

yadongw commented Oct 9, 2021

The same binary works well on the qemu and other unleashed/unmatched board. It may be caused by riscv-software-src/opensbi@7dcb1e1. We will install the patch and test again.

Issue closed. We updated it to ubuntu 21.04, and everything seemed to be OK.

@VladimirKempik
Copy link

Seing similar issues on jdk19 and some fpga core.

@VladimirKempik
Copy link

@VladimirKempik
Copy link

In my case it was caused by the absence of this fix - riscv-software-src/opensbi@7dcb1e1

@zhengxiaolinX
Copy link
Collaborator

In my case it was caused by the absence of this fix - riscv-software-src/opensbi@7dcb1e1

Thank you for the clarification of the real problem. I guess you may want to mention the solution, maybe a apt-get to update the opensbi?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants