VectorizeSIMD
breaks Minecraft under specific conditions.
#4849
Labels
VectorizeSIMD
breaks Minecraft under specific conditions.
#4849
Describe the issue
GraalVM EE's
VectorizeSIMD
optimization crashes Minecraft or breaks rendering under specific circumstances. Disabling theVectorizeSIMD
flag fixes the issue, as does disabling compilation of specific methods, likenet.minecraft.class_4604.method_23092
More details
I first ran into this issue with the Sodium and Iris mods in a "default" GraalVM EE environment. After playing for a minute or so, all entities turn invisible (notice their shadows on the ground):
Disabling VectorizeSIMD or the compilation of
net.minecraft.class_4604.method_23092
fixes this issue.At first, I thought this was an issue specific to those modifications, but as I started forcing compilation with very low
CompileThresholdScaling
values or-Xcomp
and narrowing down the issue to a more specific chain of methods, I discovered the affected methods were base Minecraft methods, and this bug started manifesting itself without the Iris modification. Specifically, with just the "Sodium" and "Fabric" Minecraft modifications, all entities turn invisible, as in the above screenshot. With just the "Fabric" modding API, and the specific graal arguments from below, the whole application hangs on the frame entities turn invisible:net/Minecraft/class_4604.method_23092
(which is documented in the below link) seems to be the final and exact compilation that breaks or crashes rendering (as it is the final compiled method in the attached logs), but this bug will not manifest itself without the other specified compiled methods.A side note: Minecraft classes/methods are obfuscated, and they show up as jibberish in the graal compilation log. But modding APIs (such as Fabric, which I was testing with) map, name and document these obfuscated classes so modders can use them, as you can see in the documentation here
This is relevant because the methods I narrowed this issue down to with
Dgraal.CompileOnly
use the Fabric method/class names... but this bug also manifests itself in environments without the "Fabric" mod (such as Forge), so it cannot be a "Fabric" mod bug. Hence I am fairly certain it could manifest in the base game as well, without any mods. But this is difficult to test, as I would have to "reverse map" these methods to the base game in order for the Graal compilation filter to recognize them.Cross-platform steps to reproduce the issue
VectorizeSIMD
, and the issue will not persist.Describe GraalVM and your environment:
Logs + Dumps
Invisible entities: sodiumwithsimd.zip
Same setup with VectorizeSIMD disabled: sodiumwithoutsimd.zip
Crash upon loading world with the "Fabric" API: fabrichangwithsimd.zip
Same setup with
VectorizeSIMD
disabled: fabricwthoutsimd.zipLet me know if I can provide any more information for debugging.
The text was updated successfully, but these errors were encountered: