Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The runDev task runs into SIGSEGV because of spark #11711

Closed
scrayos opened this issue Dec 5, 2024 · 5 comments
Closed

The runDev task runs into SIGSEGV because of spark #11711

scrayos opened this issue Dec 5, 2024 · 5 comments
Labels

Comments

@scrayos
Copy link
Contributor

scrayos commented Dec 5, 2024

Expected behavior

I expect ./gradlew runDev to run successfully.

Observed/Actual behavior

./gradlew runDev

> Configure project :
paperweight-core v1.7.6 (running on 'Linux')

> Task :paper-server:runDevServer
OpenJDK 64-Bit Server VM warning: Option AllowRedefinitionToAddDeleteMethods was deprecated in version 13.0 and will likely be removed in a future release.
[0.019s][warning][cds] This file is not the one used while building the shared archive file: /home/scrayos/.sdkman/candidates/java/21.0.2-jbr/lib/modules
[0.019s][warning][cds] This file is not the one used while building the shared archive file: /home/scrayos/.sdkman/candidates/java/21.0.2-jbr/lib/modules
[0.019s][warning][cds] /home/scrayos/.sdkman/candidates/java/21.0.2-jbr/lib/modules size has changed.
2024-12-05T19:57:00.523304358Z main WARN Advanced terminal features are not available in this environment
[20:57:00 INFO]: [bootstrap] Running Java 21 (OpenJDK 64-Bit Server VM 21.0.2+13-b375.1; JetBrains s.r.o. JBR-21.0.2+13-375.1-nomod) on Linux 6.12.1-arch1-1 (amd64)
[20:57:00 INFO]: [bootstrap] Loading Paper 1.21.4-DEV (2024-12-05T19:56:59Z) for Minecraft 1.21.4
[20:57:00 INFO]: [PluginInitializerManager] Initializing plugins...
[20:57:01 INFO]: [PluginInitializerManager] Initialized 0 plugins
[20:57:04 INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[20:57:04 INFO]: Found new data pack file/bukkit, loading it automatically
[20:57:04 INFO]: Found new data pack paper, loading it automatically
[20:57:05 INFO]: No existing world data, creating new world
[20:57:06 INFO]: Loaded 1370 recipes
[20:57:06 INFO]: Loaded 1481 advancements
[20:57:06 INFO]: [MCTypeRegistry] Initialising converters for DataConverter...
[20:57:06 INFO]: [MCTypeRegistry] Finished initialising converters for DataConverter in 309,5ms
[20:57:06 INFO]: Starting minecraft server version 1.21.4
[20:57:06 INFO]: Loading properties
[20:57:06 INFO]: This server is running Paper version 1.21.4-DEV (2024-12-05T19:56:59Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
[20:57:07 INFO]: [spark] This server bundles the spark profiler. For more information please visit https://docs.papermc.io/paper/profiling
[20:57:07 INFO]: Server Ping Player Sample Count: 12
[20:57:07 INFO]: Using 4 threads for Netty based IO
[20:57:07 INFO]: [MoonriseCommon] Paper is using 4 worker threads, 1 I/O threads
[20:57:07 INFO]: [ChunkTaskScheduler] Chunk system is using population gen parallelism: true
[20:57:07 INFO]: Default game type: SURVIVAL
[20:57:07 INFO]: Generating keypair
[20:57:07 INFO]: Starting Minecraft server on *:25565
[20:57:07 INFO]: Using epoll channel type
[20:57:07 INFO]: Paper: Using libdeflate (Linux x86_64) compression from Velocity.
[20:57:07 INFO]: Paper: Using OpenSSL 3.x.x (Linux x86_64) cipher from Velocity.
[20:57:07 INFO]: Preparing level "world"
[20:57:12 INFO]: Preparing start region for dimension minecraft:overworld
[20:57:12 INFO]: Preparing spawn area: 2%
[20:57:12 INFO]: Preparing spawn area: 4%
[20:57:13 INFO]: Preparing spawn area: 18%
[20:57:13 INFO]: Preparing spawn area: 59%
[20:57:14 INFO]: Time elapsed: 1807 ms
[20:57:14 INFO]: Preparing start region for dimension minecraft:the_nether
[20:57:14 INFO]: Preparing spawn area: 2%
[20:57:14 INFO]: Preparing spawn area: 61%
[20:57:14 INFO]: Time elapsed: 578 ms
[20:57:14 INFO]: Preparing start region for dimension minecraft:the_end
[20:57:14 INFO]: Preparing spawn area: 2%
[20:57:14 INFO]: Time elapsed: 161 ms
[20:57:14 INFO]: [spark] Starting background profiler...
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000076e7a1cf7c71, pid=200999, tid=201095
#
# JRE version: OpenJDK Runtime Environment JBR-21.0.2+13-375.1-nomod (21.0.2+13) (build 21.0.2+13-b375.1)
# Java VM: OpenJDK 64-Bit Server VM JBR-21.0.2+13-375.1-nomod (21.0.2+13-b375.1, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0xaf7c71]  JvmtiEnv::GetClassMethods(oopDesc*, int*, _jmethodID***)+0x171
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /home/scrayos/Paper/run/core.200999)
#
JNI global refs:
JNI global refs: 53, weak refs: 49

JNI global refs memory usage: 859, weak refs: 857

OOME stack traces (most recent first):
Classloader memory used:
Loader jdk.internal.loader.ClassLoaders$AppClassLoader                                 : 109M
Loader bootstrap                                                                       : 31359K
Loader jdk.internal.loader.ClassLoaders$PlatformClassLoader                            : 830K

# An error report file with more information is saved as:
# /home/scrayos/Paper/run/hs_err_pid200999.log
#
# If you would like to submit a bug report, please visit:
#   https://youtrack.jetbrains.com/issues/JBR
#

> Task :paper-server:runDevServer FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':paper-server:runDevServer'.
> Process 'command '/home/scrayos/.sdkman/candidates/java/21.0.2-jbr/bin/java'' finished with non-zero exit value 134

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 26s

Steps/models to reproduce

git clone [email protected]:PaperMC/Paper.git
cd Paper
./gradlew applyPatches
./gradlew runDev
(accept eula)
./gradlew runDev

Plugin and Datapack List

No plugins

Paper version

[21:05:31 INFO]: Checking version, please wait...
[21:05:31 INFO]: This server is running Paper version 1.21.4-DEV-master@346b9b8 (2024-12-05T20:03:48Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version

Other

The resulting jar (./gradlew createMojmapPaperclipJar) can be run normally (even with spark).

@papermc-sniffer papermc-sniffer bot added the version: 1.21.4 Game version 1.21.4 label Dec 5, 2024
@electronicboy
Copy link
Member

Broken JVM distribution

[0.019s][warning][cds] This file is not the one used while building the shared archive file: /home/scrayos/.sdkman/candidates/java/21.0.2-jbr/lib/modules

@electronicboy electronicboy closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2024
@lynxplay
Copy link
Contributor

lynxplay commented Dec 5, 2024

Note that we do force JBR for runDev as it allows nicer hotreloading.
Generally known to just disable the background profiler in the run directory.
The benefits of the improved hot reloading are generally worth it tho for this to be a bit annoying.

@electronicboy
Copy link
Member

JBR shipped a few bad builds for 21, that was fixed later in their releases; the JVM blew up accessing class info, which I'm guessing was down to spark accessing this metadata and the JVM blowing up due to the busted CDS

@lynxplay
Copy link
Contributor

lynxplay commented Dec 5, 2024

Yea, but iirc foojay was stuck on one of those for a while, which might still be the case then.

@scrayos
Copy link
Contributor Author

scrayos commented Dec 5, 2024

Once I manually updated to Jetbrains 21.0.5 it works now, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants