spark

spark

26M Downloads

JVM Segfault when running with JBR

radstevee opened this issue ยท 2 comments

commented

Description

The JVM segfaults either on server initialisation or once starting the profiler. Only happens when running the server with the Jetbrains Runtime. When using something like Adoptium, it works just fine.

Reproduction Steps

Use this gradle build file:

plugins {
    java
    id("xyz.jpenilla.run-paper") version "2.3.0"
}

group = "net.radstevee"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
    maven("https://repo.papermc.io/repository/maven-public/")
}

dependencies {
    compileOnly("io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT")
}

tasks.runServer {
    minecraftVersion("1.21")
}

tasks.withType<xyz.jpenilla.runtask.task.AbstractRun> {
    javaLauncher =
        javaToolchains.launcherFor {
            vendor = JvmVendorSpec.JETBRAINS // Works when commenting out
            languageVersion = JavaLanguageVersion.of(21)
        }
    jvmArgs("-XX:+AllowEnhancedClassRedefinition", "-XX:+AllowRedefinitionToAddDeleteMethods") // Works when commenting out
}

Expected Behaviour

The spark profiler should start just fine.

Platform Information

  • Minecraft Version: 1.21
  • Platform Type: server
  • Platform Brand: Paper
  • Platform Version: 1.21-104-master@9aea240

Spark Version

v1.10.83

Logs and Configs

https://pastes.dev/LuQuORkAud <- JVM Error log

https://pastes.dev/IpOHvQ3wmz <- Server log

Extra Details

No response

commented

That seems to be a bug in JBR. The InstanceKlass::methods() array is larger than the InstanceKlass::method_ordering() array.

commented

I forgot about this. It is in fact fixed ๐Ÿ‘