lucko / spark

A performance profiler for Minecraft clients, servers, and proxies.
https://spark.lucko.me/
GNU General Public License v3.0
1.04k stars 143 forks source link

Spark kill Java virtual machine on startup with Java OpenJ9 #372

Closed Chevels closed 3 months ago

Chevels commented 1 year ago

Description

My server restarts in a loop as soon as I install Spark. Each time it generates a dump file of several GB and a javacore.20231020.074712.1.0002.txt file

I had to remove it a long time ago because we are running Java OpenJ9 for performance reasons (to fix docker issue with GC and RAM) and unfortunately Spark killed the Java machine on startup. The Paper devs will abandon support for Timings to make way for Spark but if it is not OpenJ9 compatible some servers will no longer have effective profiling solutions :/

My server runs on Paper and has 86 plugins, everything has worked for years with Java OpenJ9, except Spark. As soon as I reinstall spark, the server no longer starts as explained above.

Reproduction Steps

Expected Behaviour

That the server starts correctly with spark

Platform Information

Spark Version

v1.10.34

Logs and Configs

[07:45:58] [Server thread/INFO]: [spark] Loading server plugin spark v1.10.34 [07:45:58] [Server thread/INFO]: [spark] Enabling spark v1.10.34 [07:45:58] [Server thread/INFO]: [spark] Using Paper ServerTickStartEvent for tick monitoring [07:45:58] [Server thread/INFO]: [spark] Starting background profiler... [07:45:58] [Server thread/INFO]: [PlaceholderAPI] Successfully registered expansion: spark [07:45:58] [Server thread/INFO]: [spark] Registered PlaceholderAPI placeholders

As soon as Spark is enabled the log file no longer receives console logs and the server crashes instantly. This is what the console displays at this time (but does not print to the .log file) : https://gist.github.com/Chevels/9f9b9b687ef6ae6d609038f98c29219c

javacore.20231020.074712.1.0002.txt file generated on JVM crash: https://gist.github.com/Chevels/0c985ad31d93712e0daf8a1cc4e889e7

Extra Details

The problem occurs whether you start the server with Spark already installed or if you try to hot start it with plugman.

The problem does not depend on the version of Paper or the game because it has existed for a long time: I had already tried to install Spark in September 2022 (Paper for 1.19.2 Minecraft version) and the year before as well. Every time this error occurs if we use Java OpenJ9

Actually I'm using Java 17 OpenJ9 but it already did in Java 16 Openj9.

lucko commented 3 months ago

Resolved in 8379f2b07bc38c24733c4f1d537ea7c2ee03d91b