[2.0.43][Linux] Stuck at autosaving (probably a failed fork of the game process?)
Posted: Wed Apr 02, 2025 8:07 pm
Hi,
I've had an issue where Factorio would randomly be stuck on autosaves at 0% and I'm wondering if an nproc security limit that is too low could be the culprit? An nproc security limit basically sets the max number of processes that can be opened but I'm wondering if we can have a more verbose log when the fork fail on Linux if that's the case?
Looking at the log (included to this post as "factorio-previous.log), I don't see anything really meaningful about if the fork has succeeded or not. For example, in the log file:
I see around 3779 the game is saving, but I don't notice it for a while, and at 5853, this is where I force-quit the game from the KDE desktop environment.
It also creates a .tmp save file that is corrupted (included with the post as "_autosave2.tmp.zip").
So yeah, I've had the security limits configured similar to what's described in the Arch wiki:
https://wiki.archlinux.org/title/Limits.conf
Which is:
This means that any user have a limit of 2048 processes that can be opened.
I didn't think much of it when I set that up a few months earlier but I've also upgraded it to 4096 as of writing this post. Maybe that'll fix the issue in the future (or I'll probably try to double that limit once more if the issue happens again).
Also, information about my system (EndeavourOS is Arch Linux based):
And the current number of running processes from the same uptime as the command above:
I've had an issue where Factorio would randomly be stuck on autosaves at 0% and I'm wondering if an nproc security limit that is too low could be the culprit? An nproc security limit basically sets the max number of processes that can be opened but I'm wondering if we can have a more verbose log when the fork fail on Linux if that's the case?
Looking at the log (included to this post as "factorio-previous.log), I don't see anything really meaningful about if the fork has succeeded or not. For example, in the log file:
Code: Select all
3779.441 Info AppManager.cpp:323: Saving to _autosave2 (blocking).
5168.925 Info GlobalContext.cpp:1987: Waiting for save to finish.
5853.357 Error CrashHandler.cpp:643: Received 6
It also creates a .tmp save file that is corrupted (included with the post as "_autosave2.tmp.zip").
So yeah, I've had the security limits configured similar to what's described in the Arch wiki:
https://wiki.archlinux.org/title/Limits.conf
Which is:
Code: Select all
* hard nproc 2048 # Prevent fork-bombs from taking out the system.
I didn't think much of it when I set that up a few months earlier but I've also upgraded it to 4096 as of writing this post. Maybe that'll fix the issue in the future (or I'll probably try to double that limit once more if the issue happens again).
Also, information about my system (EndeavourOS is Arch Linux based):
Code: Select all
neofetch
./o. user@ordi-ki-x3d
./sssso- ---------------
`:osssssss+- OS: EndeavourOS Linux x86_64
`:+sssssssssso/. Host: MS-7D70 1.0
`-/ossssssssssssso/. Kernel: 6.13.8-arch1-1
`-/+sssssssssssssssso+:` Uptime: 27 mins
`-:/+sssssssssssssssssso+/. Packages: 1472 (pacman), 56 (flatpak)
`.://osssssssssssssssssssso++- Shell: fish 4.0.1
.://+ssssssssssssssssssssssso++: Resolution: 3840x2160
.:///ossssssssssssssssssssssssso++: DE: Plasma 6.3.3
`:////ssssssssssssssssssssssssssso+++. WM: kwin
`-////+ssssssssssssssssssssssssssso++++- Theme: Breeze-Dark [GTK2], Breeze [GTK3]
`..-+oosssssssssssssssssssssssso+++++/` Icons: breeze-dark [GTK2/3]
./++++++++++++++++++++++++++++++/:. Terminal: WarpTerminal
`:::::::::::::::::::::::::------`` CPU: AMD Ryzen 7 7800X3D (16) @ 5.050GHz
GPU: AMD ATI RX 9070/9070 XT
Memory: 11964MiB / 63966MiB
Code: Select all
ps aux | wc -l
501