Minecraft-Performance-Flags-Benchmarks icon indicating copy to clipboard operation
Minecraft-Performance-Flags-Benchmarks copied to clipboard

-Dgraal.OptWriteMotion=true breaks villagers AI

Open AntonIXO opened this issue 2 years ago • 8 comments

Hi,

I am launched my public bettermc(modpack) server and face thats -Dgraal.OptWriteMotion=true on GraalVM 22.3 Java 19 breaks villagers, thats they do not find their work. They became useless. Seems like vanilla ai is ok with this option. I do not know which mod breaks it. I've used v11 modpack version.

AntonIXO avatar Nov 28 '22 15:11 AntonIXO

Yeah, optwritemotion used to straight up crash some modpacks in my testing.

Are you testing WriteableCodeCache as well?

brucethemoose avatar Nov 28 '22 16:11 brucethemoose

Yeah, optwritemotion used to straight up crash some modpacks in my testing.

Are you testing WriteableCodeCache as well?

Yes i use

AntonIXO avatar Nov 28 '22 18:11 AntonIXO

Yes I use

Ah now that's interesting. WriteableCodeCache improved chunkgen times in my 22.1.0 benches (which is unusual, and most flags dont improve chunkgen throughput like that), but it caused rare crashes in AllTheMods and Valhesia Enhanced Vanilla for some unknown reason.

brucethemoose avatar Nov 29 '22 00:11 brucethemoose

Yes I use

Ah now that's interesting. WriteableCodeCache improved chunkgen times in my 22.1.0 benches (which is unusual, and most flags dont improve chunkgen throughput like that), but it caused rare crashes in AllTheMods and Valhesia Enhanced Vanilla for some unknown reason.

What is crash error in your modpacks?

AntonIXO avatar Nov 29 '22 17:11 AntonIXO

Yes I use

Ah now that's interesting. WriteableCodeCache improved chunkgen times in my 22.1.0 benches (which is unusual, and most flags dont improve chunkgen throughput like that), but it caused rare crashes in AllTheMods and Valhesia Enhanced Vanilla for some unknown reason.

What is crash error in your modpacks?

I dunno. I was using the Benchmark.py script in this repo, and if I was doing, say, 7 runs for a benchmark with WriteableCodeCache enabled, one of them would just hang while I was away doing something else. It happened infrequently, but consistently with that flag, but the 6 other runs would complete just fine.

Right now the script doesn't record errors, it just tells you if a run crashes, times out or fails to start in the json file.

This was with Java 17 GraalVM 22.1.0 though, so that testing isnt necessarily relevant.

brucethemoose avatar Nov 29 '22 19:11 brucethemoose

I have new issue now. I am not sure that is graalvm optimizations. Items drops from broken blocks only after player moving.

AntonIXO avatar Nov 29 '22 20:11 AntonIXO

I have new issue now. I am not sure that is graalvm optimizations. Items drops from broken blocks only after player moving.

You can check by copying the instance and running it with openjdk. Or just switching jdks and opening the same instance, if you can reproduce it consistently.

brucethemoose avatar Nov 29 '22 22:11 brucethemoose

I have new issue now. I am not sure that is graalvm optimizations. Items drops from broken blocks only after player moving.

You can check by copying the instance and running it with openjdk. Or just switching jdks and opening the same instance, if you can reproduce it consistently.

Find out problem source, it was one of new vmp optimizations

AntonIXO avatar Dec 03 '22 22:12 AntonIXO