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

Java 23 + Spark = Crash #461

Open Teslicek opened 1 month ago

Teslicek commented 1 month ago

Description

When using Java (Oracle GraalVM) 23 and starting an async spark profiler, upon player join, the whole server crashes.

This behavior does not happen when using Java (Oracle GraalVM) 22.

Reproduction Steps

  1. Start a paper server using GraalVM 23
  2. Create a spark profiler
  3. Make a player join during the profiler
  4. Your server should crash

Expected Behaviour

The server should not crash.

Platform Information

Spark Version

1.10.109-bukkit

Logs and Configs

No response

Extra Details

We are using Pterodactyl panel so everything is running in a container. All the plugins are working flawlessly using the new Java (Oracle GraalVM) 23, the only issue is spark profiler.

Crash log: hs_err_pid32.log

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fe2c4c06ecf, pid=32, tid=76
#
# JRE version: Java(TM) SE Runtime Environment Oracle GraalVM 23+37.1 (23.0+37) (build 23+37-jvmci-b01)
# Java VM: Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 23+37.1 (23+37-jvmci-b01, mixed mode, sharing, tiered, jvmci, jvmci compiler, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [spark-f09e253fe324c-libasyncProfiler.so.tmp+0x6ecf]  NMethod::isNMethod()+0x1f
#
# Core dump will be written. Default location: /home/container/core
#
# An error report file with more information is saved as:
# /home/container/hs_err_pid32.log
[11.580s][warning][os] Loading hsdis library failed
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
SirYwell commented 1 month ago

See https://github.com/async-profiler/async-profiler/issues/923. Everything that uses async-profiler won't work currently on Java 23+. You'll need to use the Java sampler for now instead.

ryantheleach commented 3 weeks ago

spark is currently using v2.8.3 of async-profiler, v3.0.0 exists, but as it's a major version change, I'm unsure whether it will be binary compatible.

Edit: investigation shows that the fix isn't in 3.0.0, would either involve switching to nightlies, or waiting for a release to be cut.

RealSourceOfficial commented 3 weeks ago

see #386

TerryLVM commented 2 weeks ago

Captura de pantalla 2024-10-18 192208 Same happening here, had to disable the spark from paper config and delete the jar. Currently using 1.21.1 paper java 23

ryantheleach commented 2 weeks ago

@TerryLVM @Teslicek if you missed it, you may want to try out the builds on https://github.com/lucko/spark/pull/386 Luck is looking for feedback.