[Linux] Persistant random crashes with lots of mods loaded

Sat Jun 20, 2020 12:57 pm

I apologize in advance, this is probably not going to be fun.

I've been having persistant random crashes on GZDoom on Linux for like a year now, up to and including the current stable 4.4.2. I kept my ear to the ground because I figured my particular configuration was not the easiest to troubleshoot, and it would eventually crop up for someone else. I thought that a VM/JIT fix that happened a couple versions ago was related to mine, but turns out not.

Here is a paste of the most recent one I was able to trigger: https://hastebin.com/zezujufeti
(slightly odd, the log doesn't show the names of half the loaded mods, but they're in the command-line above)

As you can see, my modlist is someone extensive, and yes, it includes Hideous Destructor (again, I'm sorry). I'm not sure HD itself is the cause of the crash. So far as I can tell it's random, and starting the game a hundred times with a typical modlist like this might generate anywhere from no crashes to crashing every single time, which makes it near impossible to determine which mod is the problem. Map and IWAD are irrelevant, many fresh configs hasn't fixed it either. This particular crash happened at the main menu, within about 1/2 second of me pressing a key to make the menu appear. More typically it happens when starting a new game, immediately after the screen wipe. Occasionally it happens on quitting the game, and very very rarely it happens in the first 30 seconds of gameplay. Sometimes the game crashes to desktop, sometimes it hard-locks and I need to kill the process, and sometimes it freezes for about 5-10 seconds and then crashes to desktop. Console messages are generated, but tend to vary. This time is was "corrupted double-linked list". I haven't seen it happen without any mods loaded (tried loading plain Doom2 about 50 times with no issue), but again, it's random enough for that to not be surprising.

Please let me know if there's any other information i can provide.

8-)

Re: [Linux] Persistant random crashes with lots of mods load

Sat Jun 20, 2020 12:59 pm

I searched on a hunch and seems like I actually reported this once before and forgot, so it's been happening at least since 3.5.1.

viewtopic.php?t=61966

Suffice to say I haven't managed to try and reproduce this with a debug build. If someone's able to help me get one compiled, I'd appreciate it.

8-)

Re: [Linux] Persistant random crashes with lots of mods load

Sun Jun 21, 2020 6:50 am

Those crashes don't seem to be related. Of course, a memory corruption could lead to arbitrary issues.
BTW, the crash from OP happened in NVIDIA driver running Vulkan renderer. Does it crash with OpenGL?

Regarding debug build, it's pretty much the same as release one. What's the problem compiling it?

Re: [Linux] Persistant random crashes with lots of mods load

Sun Jun 21, 2020 11:02 am

The Linux build instructions on the wiki are cryptic as hell, don't include ZMusic (which I can compile but can't get cmake to find/link it), and everyone tells me "the wiki is out of date it's not this hard anymore" but no one updates the wiki with the apparently easier workflow. I got GZDoom compiling once or twice like two years ago but that was before ZMusic and TBH I no longer have the patience to chase down the eldritch tomes of tribal knowledge it seems to require.

8-)

Re: [Linux] Persistant random crashes with lots of mods load

Sun Jun 21, 2020 11:40 am

(I reused my Raze on Pi compile instructions for this - apologies if I missed anything)

First, you will need to install your libraries:
Code:
sudo apt-get install g++ make cmake libsdl2-dev git zlib1g-dev \
libbz2-dev libjpeg-dev libfluidsynth-dev libgme-dev libopenal-dev \
libmpg123-dev libsndfile1-dev libgtk-3-dev libsdl1.2-dev


If you don't want to install all of this, then at a bare minimum you'll need libfluidsynth-dev, libsdl2-dev, libopenal-dev, git, g++, cmake, and make. If I missed anything, then CMake will tell you.

Next, you need to install ZMusic:
Code:
cd </path/to/your source folder>
git clone https://github.com/coelckers/zmusic
cd zmusic
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j4 -k
#if above steps are successful
sudo make install


Now, you can compile GZDoom:
Code:
cd </path/to/your source folder>
git clone https://github.com/coelckers/gzdoom
cd gzdoom
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j4 -k


If everything built okay, then you are now ready to install your games and run GZDoom. You can put your .wad files directly inside of GZDoom's build folder, or they can go to ~/.config/gzdoom - either works.