Jump to content

Java SIGSEGV crash


T L

Recommended Posts

Hello, I am running into a problem I cannot seem to solve. I am attempting to host a modded MC server on a Linux box I have on my local network. After installing the forge server files and running the server, I am encountering the following error:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f9878c09e60, pid=10130, tid=10144
#
# JRE version: Java(TM) SE Runtime Environment (17.0.2+8) (build 17.0.2+8-LTS-86)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0.2+8-LTS-86, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  0x00007f9878c09e60
#
# 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/minecraft/forge_40.2.10/core.10130)
#
# An error report file with more information is saved as:
# /home/minecraft/forge_40.2.10/hs_err_pid10130.log
#
# Compiler replay data is saved as:
# /home/minecraft/forge_40.2.10/replay_pid10130.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
Aborted (core dumped)

This crash occurs either during server boot, or within several minutes of the server running functionally. I am able to connect and do minecraft things for a while, before this segfault hits my console.

OS: Ubuntu 22.04.3 LTS
Minecraft: 1.18.2
Forge: 40.2.0 (I have also tried 40.2.10 with the same results)
Java: 17.0.2+8 (I have tried running with both OpenJDK and Oracle)

error report file: https://hastebin.com/share/ozoyalonon.ruby

compiler replay data: https://pastebin.com/PvsCZfhy

The crash is on a fresh Ubuntu install with no mods added to the Forge mods folder. The problematic frame changes. I have seen it call out different strings / objects or whatever each time. I am not familiar enough with Java to understand anything more than the runtime is segfaulting.

Link to comment
Share on other sites

bumping

I have since tried Oracle Java 18, 19, and 20 without success. Interestingly I was able to run forge 40.2.0 without any mods at 4GB memory overnight, while also running another instance of 40.2.10 overnight at 4GB RAM with no mods. No crash, however I have also seen the same forge versions crash with this same setup and it is most often the case that this happens immediately before the world is joinable. Seems like when I do get the server running, it only takes some time running around in the world to cause the crash, which is why I think the overnight runs didn't segfault. There were no players or java computations running overnight to cause it.

Edited by T L
Link to comment
Share on other sites

Alright so, it seems nobody on the internet knows how to solve this problem... I think I may have solved my issues, but unfortunately, my problem may be very specific to my situation. TLDR, after trial and error on a variety of things, it's possible my RAM was not seated correctly or something. I have since removed and reinserted my RAM and the server appears to be running stable on a Windows system. I will be testing ubuntu here soonish to see if the segfaults have disappeared on that OS as well. This is the short version, on what seems to have fixed my issue. Long version of everything I tried follows. My hope is that by posting everything I attempted, maybe it will give others with this error ideas and help them solve their issue case.

So, in all I attempted Java 17, 18, 19, and 20 alongside forge 40.2.0 and 40.2.10. I also tried installing Java 8 and 16 for the hell of it, but because forge jar was compiled with a newer version of java, the older versions couldn't be run it. Makes sense. Of these versions of Java I tried both OpenJDK and Oracle compiled executables. No version switching seemed to be working. My server would either crash with SIGSEGV during boot, or it would actually boot up properly and end up crashing within an hour or two of gameplay. I ran all these tests with minimal mods installed (by this I mean Chunk Pregenerator and Journeymap only). I knew the issue wasn't the mods because I was able to reproduce the crash with zero mods installed, but I wanted to minimize issues. I was able to reproduce the crash regularly by running a chunk pregeneration task with the mod as well as by logging in my player over night and stacking a metal d12 on top of a metal d20 on top of a metal d6 on top of my W key, this way Steve would fly slowly through the air overnight while I slept. It seemed the crash occurred regularly within an hour or two when any server computations were happening, even at minimal load, whether chunks were being generated or not.

After lots of internet searching and finding a ton of dead forum posts with this problem, I was left pretty empty handed in terms of a direction to go. In fact the only post which seemed to have any possible solution was here: https://forums.minecraftforge.net/topic/102976-117x-crash-when-trying-to-run-forge-forge-client/#comment-462085. The user malte appears to have made a change to Forge's jar, and while it did not fix the crashes, he claims it made them much less frequent. The PR was never merged to forge for reasons, so in order to try this I would have to merge his changes and recompile the affected forge library myself. And I have basically zero dev background with Java... ugh. Whatever. I decided to try it.

After a long and tedious process of figuring out how to compile the java repo via gradle, what commit to use for the right forge version, figuring out how to fix the merge conflict properly... It didn't work. I was able to do the merge and compile correctly. Forge ran, it just crashed with the exact same errors, and at about the same frequency. For others thinking about trying this, don't bother. I don't think it will solve your problems.

My next thought was, if Ubuntu was crashing, maybe a different OS would work. I decided to install Fedora onto a separate SSD and try running Forge on there, figuring it might be a kernel issue or specific linux distribution issue or something. After getting fedora and my server set up, I ran the same chunk pregen and DnD dice stacking tests I did prior. Same SIGSEGV errors with about the same frequency.

With neither linux distro working, and having spent the past several months developing a custom modpack for MC 1.18.2 on my Windows gaming PC without issues, I wondered if I would be forced to use a windows OS for the server in order to play. It had been running fine on my windows gaming rig. So I removed Fedora and installed Win10 Home over it. After figuring out how to do minecraft server things on Windows and getting the server booted, I ran the stability tests again. The good news: no more SIGSEGV crashes. The bad news, they seemed to be replaced by ACCESS VIOLATION ERROR crashes. After researching this, I found possible solutions regarding graphics driver versions. I installed Nvidia GeForce Experience on the server and had the latest drivers installed. This didn't fix the problem. I was again at a loss.

At this point, knowing that the issue was spanning multiple OSes (both Linux and Windows), and the crashes looked to be memory errors, I decided to run tests on my memory sticks. I originally had the thought it was a hardware problem but ruled this out because the motherboard I bought was brand new and the RAM sticks in my server were previously in my gaming rig. I upgraded my gaming rig's ram and moved the older ram over to the server. I'd never had any issues with the ram before. But, in order to be certain I installed memtest86 on a flash drive and booted from it on my server to run memory tests. I ended up with 756 something errors and a giant FAIL message. It was looking like a hardware issue.

In order to determine if it was one specific stick that was failing, I removed two of the sticks and ran the test again. Pass. Sticks 1 and 2 seemed fine, so I removed those and plugged in stick 3 and 4. The test passed. Odd. I decided to move stick 3 and 4 over to the other two motherboard slots to test if it was a board slot issue. Test passed again. Very odd. I plugged stick 1 and 2 back in and ran a test with all four sticks once more. Pass. Ran it again. Pass.

I currently have the minecraft server running on Windows with ALL of my modpack's mods installed, running a chunk pregen task. It has been running smoothly with zero issues for the past four+ hours. Once this pregen finishes, I am going to boot up the other SSD with ubuntu on it and try my server on there again. I cant say for certain, but it seems like maybe I didn't push the ram sticks in well enough? Even though I triple checked it when I built the thing... That or maybe one of the ram sticks doesn't like one of the motherboard slots? The only conclusion that makes sense is the ram wasn't seated right because these sticks were working perfectly in my gaming rig, and after removing and putting all of them back it the MC server appears to be running stable so far.

What a pita problem. It is annoying that this is the solution, but at the same time I'm glad it's simple and I don't have to replace the ram sticks. Hope this helps someone :)

Edited by T L
Link to comment
Share on other sites

Update: My Ubuntu server is still crashing with SIGSEGV. No idea why. Clearly my Windows issue was different than my Linux one. At this point I think this is something wrong with forge on Linux and it needs to be looked at by the devs.

I guess I will be running this server on Windows OS, unfortunately. But I am tired of wrestling with this.

Edited by T L
Link to comment
Share on other sites

Update: The problem was not that my ram was not seated correctly. I started getting the same ACCESS VIOLATION ERROR crashes again on Windows. I moved the server memory to a separate system and ran another two memory tests. Both failed. I borrowed some other DDR4 ram from a separate system for the minecraft server and it has been running without issue. One or more of my ram sticks are failing. Not sure why so many tests passed consecutively but it's clear now I need new ram

For those looking to run a memory test I used this: https://www.memtest86.com/download.htm

Edited by T L
Link to comment
Share on other sites

  • 8 months later...
Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.