[2.24] Headless server catastrophic save corruption causes a crash.

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Katawa
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sat Oct 05, 2019 6:23 am
Contact:

[2.24] Headless server catastrophic save corruption causes a crash.

Post by Katawa »

I encountered a bug where the tick counter somehow overflows the 64bit integer and causes the server to crash.
The .log file and the corrupted save are in the attachments.
Attachments
ktwgame.zip
Corrupted save
(50.17 MiB) Downloaded 14 times
factorio-current.log
Log
(6.55 KiB) Downloaded 20 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 14744
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.24] Headless server catastrophic save corruption causes a crash.

Post by Rseding91 »

Thanks for the report however the log file does not show any crash and when I load the file it seems to operate without issue?

Is there something I need to do to make it crash?
If you want to get ahold of me I'm almost always on Discord.
Katawa
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sat Oct 05, 2019 6:23 am
Contact:

Re: [2.24] Headless server catastrophic save corruption causes a crash.

Post by Katawa »

If you look into the .log file it says updateTick(18446744073709551615) that's the 64bit integer max value.
I have a headless server running on a VPS, the crash occurs when a player is trying to join the headless server, as soon as a player starts downloading the map the entire VPS crashes. On my machine it happens every time.

I double checked to make sure I attached the correct save file to this post, and also added the .log file which includes the login attempt.
Attachments
factorio-previous.log
Log which includes the crash
(6.26 KiB) Downloaded 15 times
ktwgame.zip
double checked, it's this save file.
(50.17 MiB) Downloaded 12 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 14744
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.24] Headless server catastrophic save corruption causes a crash.

Post by Rseding91 »

That log entry is just showing a signal-value - when the normal map tick is not available it shows the max value in its place. The log file also does not show any crash and when I try to reproduce it, by hosting with one game instance and connecting with another - it works without issue.
If you want to get ahold of me I'm almost always on Discord.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14744
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.24] Headless server catastrophic save corruption causes a crash.

Post by Rseding91 »

I do see this entry in the log file which maybe is related?
11.129 Error InterruptibleStdioStream.cpp:60: Got EOF on stdin; closing
When you say "stops responding" what exactly is happening? The log shows that a player connected, started downloading the map, then disconnected, then 20 seconds later someone sent a sig-term to the process, it saved gracefully, and exited without issue.
If you want to get ahold of me I'm almost always on Discord.
Katawa
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sat Oct 05, 2019 6:23 am
Contact:

Re: [2.24] Headless server catastrophic save corruption causes a crash.

Post by Katawa »

When you say "stops responding" what exactly is happening? The log shows that a player connected, started downloading the map, then disconnected, then 20 seconds later someone sent a sig-term to the process, it saved gracefully, and exited without issue.
When I'm trying to join the game it first says "server is saving the game", then starts downloading the map and immediately disconnects from the server and causes a some kind of a networking issue so that I can't even use the terminal to find the server anymore. Attempting to connect to the server with VNC or Putty terminal returns "Searching for host..." and then "timed out". I have to restart the server and physically reboot my router IRL to connect to the server again.

I'm not joking, after I tried to connect to the server with this game I couldn't even find my server. I contacted the VPS provider's support asking them "hello it says my server is active, but I cannot connect to it using either VNC or Putty" they replied "looks fine on our end, try rebooting your router". So I rebooted the router, found the server again, attempted to reconnect again and the same thing happened each time. Tried several times and as soon as it begins to download the map the server disappears for me and I can't even find it until I reboot the router.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14744
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.24] Headless server catastrophic save corruption causes a crash.

Post by Rseding91 »

That sounds like your router or firewall is blocking traffic to/from the server - possibly because of the amount of UDP packets it gets to download the map. In any case, there is nothing in the log for me to work with.
If you want to get ahold of me I'm almost always on Discord.
Katawa
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sat Oct 05, 2019 6:23 am
Contact:

Re: [2.24] Headless server catastrophic save corruption causes a crash.

Post by Katawa »

Rseding91 wrote: Mon Dec 09, 2024 9:02 pm That sounds like your router or firewall is blocking traffic to/from the server - possibly because of the amount of UDP packets it gets to download the map. In any case, there is nothing in the log for me to work with.
That save file specifically causes the issue. My friends couldn't connect to the server either. However after I replaced the file with a previous autosave the issue no longer occurs and everything runs fine.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14744
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.24] Headless server catastrophic save corruption causes a crash.

Post by Rseding91 »

Then I would speculate that the specific save produces packets when fragmented that the router's firewall sees as an attack and it blocks traffic.

Do you have access to the router logs to see what it might be saying at the time it stops working?
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Technical Help”