Page 1 of 1

[1.0.0] Crash also causing client hang

Posted: Wed Sep 16, 2020 8:12 am
by Artentus
Sorry about this rather vague bug report but due to the nature of what happened I cannot supply a lot of information.

I have a small private server running for only my friends and myself. So far I've had no issues but just now I had the weirdest of crashes I've ever whitnessed.
It's probably important to know I do own the server hardware, it's a machine in my home connected to the same network as the client I also use to play on it. The Factorio server itself is running in a dedicated VM to keep things clean.

I was playing with a friend when suddenly both of us stopped receiving anything. There was no particular prior trigger that I could tell, we were just playing like normal.
From both of our ends it first looked like the other was being dropped from the game, but then my friends game straight up crashed while my own game froze completely. I had to close it using Taskmanager, which is why there is no meaningfull log of my client side. However I did notice at the time my client used 24GB of RAM, or basically all that it could (I have 32GB installed).
On the server side I presume the same must have happened since the VM went completely unresponsive for a while. But eventually the server must have crashed because I was able to remote in again. The server also didn't produce a meaningfull log, however it did produce a dump file (see attachments).

I can only guess what happened but it looked like a MASSIVE memory leak to me causing machines with less RAM (like the server and my friends PC) to straight up crash while my PC with a lot of RAM and also a pagefile on a very fast PCIe-SSD was locked-up.
If there is any more information I can provide just ask.

Re: [1.0] Seemingly random server crash also causing client hang

Posted: Wed Sep 16, 2020 12:12 pm
by Loewchen
Post the log of the crash, see my signature.

Re: [1.0.0] Crash also causing client hang

Posted: Wed Sep 16, 2020 7:30 pm
by Rseding91
Can you please post the log file and the save file you were playing at the time of crash?

The dump says it crashed in some logistic logic after mining a roboport due to a bad allocation (ran out of RAM).

Re: [1.0.0] Crash also causing client hang

Posted: Fri Sep 18, 2020 5:15 am
by Artentus
As I already said, the server didn't produce a log, the application hard-crashed.
Well, it did of course write a log while it ran but at the moment of the crash the log file just cuts off. I've attached the last log but I already had a good look at it, there is no indication of an error whatsoever.
If it really was an out of memory error this makes perfect sense, out of memory is not recoverable.

As for the save file, the server was automatically restarted after the crash and the autosaves are already overwritten. I also was unable to saave the map locally since the client crashed as well as I described.
Therefore the file I attached is the last autosave prior to the crash that was captured by the daily server backup. It's from about 5 hours before the crash although most of that time noone was on the server. If you'd prefer the latest save of the map (post crash) I can provide it as well, but a lot has changed since then.

Re: [1.0.0] Crash also causing client hang

Posted: Fri Sep 18, 2020 5:45 am
by Rseding91
Based off the amount of RAM that the log reports your computer as having - running out of RAM makes perfect sense. Before even starting to load game assets or a save file it says you have 900 MB free. I think you just need more RAM.

Re: [1.0.0] Crash also causing client hang

Posted: Fri Sep 18, 2020 6:22 am
by Artentus
No the RAM in the log is incorrect. The server is running inside a Windows Server virtual machine. The host is also Windows server and as hypervisor I am using Hyper-V.
This configuration allows dynamic RAM allocation for the VM. The host has 16GB of physical RAM while the VM can use up to 8GB. At the time of the crash it was using all 8GB, which is unusual in and of itself since it usually never gets that high.

And also there is the fact that on my client Factorio was using an entire 24GB of RAM and probably a whole lot more of pagefile as well.
The factory on the server has since then gotten significantly larger and is runing without issue. The web interface is currently reporting 630MB of RAM usage.

Re: [1.0.0] Crash also causing client hang

Posted: Fri Sep 18, 2020 6:06 pm
by Rseding91
Hmm; then I would need a way to reproduce the excessive memory usage. If you say it's running fine at the moment then it sounds like the save isn't in some broken state.

If you ever find a way to reproduce the issue let me know.

Re: [1.0.0] Crash also causing client hang

Posted: Fri Sep 18, 2020 7:42 pm
by Artentus
When I reloaded the last autosave after the crash everything worked fine, it didn't happen again.

Anyway, I reported this because I thought maybe you could do something with it. There is no immediate problem because of this, the server works fine.
Thanks for the help.