-
Notifications
You must be signed in to change notification settings - Fork 721
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
Core dumped when launching a modded minecraft version 1.12.2 with openj9-0.30.0-m1/m2 and -Xshareclasses -Xquickstart/-Xaot:count=0 #14300
Comments
@0xdaryl fyi |
@dsouzai : would you mind triaging this crash please? |
@siyy123 could you upload the coredump somewhere? Also could you add |
for -Xaot:count=0: https://1drv.ms/u/s!AotJ8siZ9lZhij2YHSfNJWqUQxZG?e=pfA7si |
and for -Xquickstart: https://1drv.ms/u/s!AotJ8siZ9lZhij7YTYQ8qgnmCie1?e=TOpNG2 |
Sorry, wasn't able to get to this this week; will try to take a look on Monday. |
Not really sure what's going on as this is quite deep in the codegen. There does seem to be something off though. I've been looking at the The java stack at the time of the crash looks like this:
From the stackslots:
The top frame is a JIT JNI call-out frame. The native stack looks like this:
There is a helper call to acquire vmaccess in
this bit looks very wrong:
The codegen generates this openj9/runtime/compiler/x/amd64/codegen/AMD64JNILinkage.cpp Lines 765 to 778 in f07b484
In the rtlog, I see this:
where the
EDIT: Clearly losing my mind. I'll have to look into this some more. |
I looked at the AOT code as stored in the SCC, and this is what it's supposed to look like:
Looking at the bad code in the code cache:
it looks like the the JNI target address was patched at
I don't know how much I believe in the |
Well I figured out what's wrong; I don't know how we didn't hit this sooner... As can be seen in the disassembly, the address of the openj9/runtime/compiler/runtime/RelocationRecord.cpp Lines 2005 to 2006 in f9835f8
If we go and look at what happens when the assumption is compensated:
openj9/runtime/compiler/runtime/JitRuntime.cpp Lines 1046 to 1049 in f9835f8
I don't think the fix is trivial though; the relo code is common across all platforms so I can't just update the value of |
@siyy123 in the meantime, I suppose you could run with |
-Xaot:disableDirectToJNIInline seems to work for me. It would not core dump anymore for both -Xquickstart and -Xaot:count=0 options. |
Java -version output
openjdk version "1.8.0_322"
IBM Semeru Runtime Open Edition (build 1.8.0_322-b04)
Eclipse OpenJ9 VM (build openj9-0.30.0-m1, JRE 1.8.0 Windows 10 amd64-64-Bit Compressed References 20211130_265 (JIT enabled, AOT enabled)
OpenJ9 - ea06f74
OMR - eb9cf8525
JCL - a3346d8d7a based on jdk8u322-b04)
Summary of problem
I'm trying to launch minecraft 1.12.2 with rlcraft 2.9 modpack (forge-1.12.2-14.23.5.2860) using openj9-0.30.0-m1 or openj9-0.30.0-m2 with option -Xshareclasses -Xquickstart or -Xshareclasses -Xaot:count=0 and with a 2GB SCC. After destroying the SCC the first launch seems to be ok, but after the first launch it will not start anymore (with -Xaot:count=0 seems need to launch more times) and will crash when or just after initializing minecraft engine.
Diagnostic files
logs when using -Xshareclasses -Xquickstart:
javacore.20220118.221225.17824.0002.txt
logs when using -Xshareclasses -Xaot:count=0:
javacore.20220118.223207.17532.0002.txt
the dumps are with openj9-0.30.0-m1 but the bug still happens in openj9-0.30.0-m2.
The text was updated successfully, but these errors were encountered: