PaperMC / Paper

The most widely used, high performance Minecraft server that aims to fix gameplay and mechanics inconsistencies
https://papermc.io/
Other
9.86k stars 2.28k forks source link

SIGSEGV after finished loading #11490

Open LinuxMilanGithub opened 19 hours ago

LinuxMilanGithub commented 19 hours ago

Stack trace

The output in the console:

Sometimes this shows sometimes not:

Exception in thread "AWT-EventQueue-0" [09:24:38 INFO]: [STDERR]: java.lang.NullPointerException: Cannot invoke "org.bukkit.Server.getTPS()" because "org.bukkit.Bukkit.server" is null
[09:24:38 INFO]: [STDERR]:  at org.bukkit.Bukkit.getTPS(Bukkit.java:2385)
[09:24:38 INFO]: [STDERR]:  at com.destroystokyo.paper.gui.RAMDetails.update(RAMDetails.java:62)
[09:24:38 INFO]: [STDERR]:  at com.destroystokyo.paper.gui.GuiStatsComponent.lambda$new$0(GuiStatsComponent.java:27)
[09:24:38 INFO]: [STDERR]:  at java.desktop/javax.swing.Timer.fireActionPerformed(Timer.java:311)
[09:24:38 INFO]: [STDERR]:  at java.desktop/javax.swing.Timer$DoPostEvent.run(Timer.java:243)
[09:24:38 INFO]: [STDERR]:  at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
[09:24:38 INFO]: [STDERR]:  at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
[09:24:38 INFO]: [STDERR]:  at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
[09:24:38 INFO]: [STDERR]:  at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
[09:24:38 INFO]: [STDERR]:  at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
[09:24:38 INFO]: [STDERR]:  at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
[09:24:38 INFO]: [STDERR]:  at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
[09:24:38 INFO]: [STDERR]:  at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
[09:24:38 INFO]: [STDERR]:  at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
[09:24:38 INFO]: [STDERR]:  at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
[09:24:38 INFO]: [STDERR]:  at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
[09:24:38 INFO]: [STDERR]:  at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
[09:24:38 INFO]: [STDERR]:  at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

This shows up everytime:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000079c43ba06ecf, pid=39327, tid=39528
#
# JRE version: OpenJDK Runtime Environment (23.0+37) (build 23+37-2369)
# Java VM: OpenJDK 64-Bit Server VM (23+37-2369, mixed mode, sharing, tiered, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [spark-502cce8be50-libasyncProfiler.so.tmp+0x6ecf]  NMethod::isNMethod()+0x1f
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/milan/Minecraft Server/core.39327)
#
# An error report file with more information is saved as:
# /home/milan/Minecraft Server/hs_err_pid39327.log
[46.878s][warning][os] Loading hsdis library failed
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
Aborted

The error report that was written: https://paste.gg/p/anonymous/1fb62ce105c44e06b7ee0aa000f5c37d

Plugin and Datapack List

I do not have any plugins or datapacks installed.

Actions to reproduce (if known)

I am using Java 23 (OpenJDK 64-Bit Server VM 23+37-2369; Oracle Corporation null) on Ubuntu 24.04.1 LTS amd64 with a Intel Core i7-3770, 16GB of RAM + 64GB of SWAP. I am using this command line when starting the server: java -Xms64G -Xmx64G -jar paper-1.21.1-120.jar The server is doing everything as it should be but when it finishes loading it crashes. It seems like the spark async profiler is crashing or something else that has to do with the Bukkit Server because it says that it is null.

Paper version

This server is running Paper version 1.21.1-120-master@57c75a4 (2024-10-09T21:11:07Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)

Other

Image CPU information: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 36 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Vendor ID: GenuineIntel Model name: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz CPU family: 6 Model: 58 Thread(s) per core: 2 Core(s) per socket: 4 Socket(s): 1 Stepping: 9 CPU(s) scaling MHz: 65% CPU max MHz: 3900.0000 CPU min MHz: 1600.0000 BogoMIPS: 6784.27 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx r dtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm cpuid_fa ult epb pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts vnmi md_clear flush_l1d Virtualization features:
Virtualization: VT-x Caches (sum of all):
L1d: 128 KiB (4 instances) L1i: 128 KiB (4 instances) L2: 1 MiB (4 instances) L3: 8 MiB (1 instance) NUMA:
NUMA node(s): 1 NUMA node0 CPU(s): 0-7 Vulnerabilities:
Gather data sampling: Not affected Itlb multihit: KVM: Mitigation: VMX disabled L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable Mds: Mitigation; Clear CPU buffers; SMT vulnerable Meltdown: Mitigation; PTI Mmio stale data: Unknown: No mitigations Reg file data sampling: Not affected Retbleed: Not affected Spec rstack overflow: Not affected Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Spectre v2: Mitigation; Retpolines; IBPB conditional; IBRS_FW; STIBP conditional; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected Srbds: Vulnerable: No microcode Tsx async abort: Not affected Memory information: total used free shared buff/cache available Mem: 16291740 2896508 11022736 18456 2693628 13395232 Swap: 64699384 0 64699384

ryantheleach commented 19 hours ago

This is likely a bug in the GUI calling into getTPS before the server is initialized.

If the GUI isn't important to you, and you prefer to use console or log files, then adding the flag --nogui will work around this issue for now, but it should still be fixed.

ryantheleach commented 18 hours ago

I've looked into it a little more as I wanted to contribute a fix, the API of Bukkit.getServer, which getTPS uses, is annotated not-null, so presumably the GUI is getting started earlier then it should.

I tried to add a defensive check to the GUI, as it doesn't seem to interact with many other Bukkit API's, but since the API is labelled not-null, it forced me to rethink whether the API should ever return null, even early.

But if it's assumed that the main consumers of the API are Spigot plugins, then I can understand labelling it not-null.

But with the introduction of Paper Plugins, I'm forced to wonder if the early bootstrapping of paper plugins give other opportunities for the server to be null, and that it's the annotation that's incorrect.

This isn't the low hanging fruit PR bugfix I thought it was.

electronicboy commented 18 hours ago

The async profiler does not support java 23, either use j21/22, or disable the async profiler in sparks settings (or, disable spark)

On Sat, 12 Oct 2024 at 09:03, LinuxMilanGithub @.***> wrote:

Stack trace

The output in the console:

Exception in thread "AWT-EventQueue-0" [09:24:38 INFO]: [STDERR]: java.lang.NullPointerException: Cannot invoke "org.bukkit.Server.getTPS()" because "org.bukkit.Bukkit.server" is null [09:24:38 INFO]: [STDERR]: at org.bukkit.Bukkit.getTPS(Bukkit.java:2385) [09:24:38 INFO]: [STDERR]: at com.destroystokyo.paper.gui.RAMDetails.update(RAMDetails.java:62) [09:24:38 INFO]: [STDERR]: at com.destroystokyo.paper.gui.GuiStatsComponent.lambda$new$0(GuiStatsComponent.java:27) [09:24:38 INFO]: [STDERR]: at java.desktop/javax.swing.Timer.fireActionPerformed(Timer.java:311) [09:24:38 INFO]: [STDERR]: at java.desktop/javax.swing.Timer$DoPostEvent.run(Timer.java:243) [09:24:38 INFO]: [STDERR]: at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) [09:24:38 INFO]: [STDERR]: at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773) [09:24:38 INFO]: [STDERR]: at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720) [09:24:38 INFO]: [STDERR]: at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714) [09:24:38 INFO]: [STDERR]: at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) [09:24:38 INFO]: [STDERR]: at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) [09:24:38 INFO]: [STDERR]: at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) [09:24:38 INFO]: [STDERR]: at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) [09:24:38 INFO]: [STDERR]: at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) [09:24:38 INFO]: [STDERR]: at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) [09:24:38 INFO]: [STDERR]: at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) [09:24:38 INFO]: [STDERR]: at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [09:24:38 INFO]: [STDERR]: at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

#

A fatal error has been detected by the Java Runtime Environment:

#

SIGSEGV (0xb) at pc=0x000079c43ba06ecf, pid=39327, tid=39528

#

JRE version: OpenJDK Runtime Environment (23.0+37) (build 23+37-2369)

Java VM: OpenJDK 64-Bit Server VM (23+37-2369, mixed mode, sharing, tiered, compressed class ptrs, g1 gc, linux-amd64)

Problematic frame:

C [spark-502cce8be50-libasyncProfiler.so.tmp+0x6ecf] NMethod::isNMethod()+0x1f

#

Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/milan/Minecraft Server/core.39327)

#

An error report file with more information is saved as:

/home/milan/Minecraft Server/hs_err_pid39327.log

[46.878s][warning][os] Loading hsdis library failed #

If you would like to submit a bug report, please visit:

https://bugreport.java.com/bugreport/crash.jsp

# Aborted

The error report that was written: https://paste.gg/p/anonymous/1fb62ce105c44e06b7ee0aa000f5c37d Plugin and Datapack List

I do not have any plugins or datapacks installed. Actions to reproduce (if known)

I am using Java 23 (OpenJDK 64-Bit Server VM 23+37-2369; Oracle Corporation null) on Ubuntu 24.04.1 LTS amd64 with a Intel Core i7-3770, 16GB of RAM + 64GB of SWAP. I am using this command line when starting the server: java -Xms64G -Xmx64G -jar paper-1.21.1-120.jar The server is doing everything as it should be but when it finishes loading it crashes. It seems like the spark async profiler is crashing or something else that has to do with the Bukkit Server because it says that it is null. Paper version

This server is running Paper version @.*** (2024-10-09T21:11:07Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT) Other

Screenshot.from.2024-10-12.09-51-16.png (view on web) https://github.com/user-attachments/assets/493646dc-cdd6-46eb-abe8-5d9e410c15e4 CPU information: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 36 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Vendor ID: GenuineIntel Model name: Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz CPU family: 6 Model: 58 Thread(s) per core: 2 Core(s) per socket: 4 Socket(s): 1 Stepping: 9 CPU(s) scaling MHz: 65% CPU max MHz: 3900.0000 CPU min MHz: 1600.0000 BogoMIPS: 6784.27 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx r dtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm cpuid_fa ult epb pti ssbd ibrs ibpb stibp tpr_shadow flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts vnmi md_clear flush_l1d Virtualization features: Virtualization: VT-x Caches (sum of all): L1d: 128 KiB (4 instances) L1i: 128 KiB (4 instances) L2: 1 MiB (4 instances) L3: 8 MiB (1 instance) NUMA: NUMA node(s): 1 NUMA node0 CPU(s): 0-7 Vulnerabilities: Gather data sampling: Not affected Itlb multihit: KVM: Mitigation: VMX disabled L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable Mds: Mitigation; Clear CPU buffers; SMT vulnerable Meltdown: Mitigation; PTI Mmio stale data: Unknown: No mitigations Reg file data sampling: Not affected Retbleed: Not affected Spec rstack overflow: Not affected Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Spectre v2: Mitigation; Retpolines; IBPB conditional; IBRS_FW; STIBP conditional; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected Srbds: Vulnerable: No microcode Tsx async abort: Not affected Memory information: total used free shared buff/cache available Mem: 16291740 2896508 11022736 18456 2693628 13395232 Swap: 64699384 0 64699384

— Reply to this email directly, view it on GitHub https://github.com/PaperMC/Paper/issues/11490, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJMAZBQW4X7UAOPP2YGWL3Z3DJUVAVCNFSM6AAAAABP2FZNZ6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGU4DENRXGI2TKOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

LinuxMilanGithub commented 18 hours ago

I tried using OpenJDK 22.0.3 but got the same issue again, so it didn't fix the error.

ryantheleach commented 17 hours ago

Sorry, my comment was regarding the GUI NPE, not the sigsev that the title mentions.

electronicboy commented 17 hours ago

Provide the full log from 22

On Sat, 12 Oct 2024 at 10:28, Milan Bauer @.***> wrote:

I tried using OpenJDK 22.0.3 but got the same issue again, so it didn't fix the error.

— Reply to this email directly, view it on GitHub https://github.com/PaperMC/Paper/issues/11490#issuecomment-2408474502, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJMAZAJ43PZ6X4Q22BQCB3Z3DTULAVCNFSM6AAAAABP2FZNZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBYGQ3TINJQGI . You are receiving this because you commented.Message ID: @.***>

LinuxMilanGithub commented 17 hours ago

If I use OpenJDK 22.0.3 it wont instantly crash like in OpenJDK 23, so it will take some time to get the full crash report of OpenJDK 22.0.3

LinuxMilanGithub commented 17 hours ago

The logfile of OpenJDK 22.0.3 is here: https://paste.gg/p/anonymous/9507b1bf7eb24fbaaab35ee5730313cb

LinuxMilanGithub commented 16 hours ago

Provide the full log from 22 On Sat, 12 Oct 2024 at 10:28, Milan Bauer @.> wrote: I tried using OpenJDK 22.0.3 but got the same issue again, so it didn't fix the error. — Reply to this email directly, view it on GitHub <#11490 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJMAZAJ43PZ6X4Q22BQCB3Z3DTULAVCNFSM6AAAAABP2FZNZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBYGQ3TINJQGI . You are receiving this because you commented.Message ID: @.> https://paste.gg/p/anonymous/9507b1bf7eb24fbaaab35ee5730313cb

electronicboy commented 14 hours ago

That crash report from 22 didn't even get to the part of loading paper, the process was seemingly intentionally killed by itself, potentially from libc. this would generally be an environmental issue, the GUI crash is weird, but, without full logs, all I can maybe do is assume that something in your environment caused it to blow up in an unexpected manner .