Page 1 of 1

[Oxyd] [0.18.28] Stuck on waiting to save map

Posted: Fri May 29, 2020 7:35 pm
by Cooldude2606
When trying to connect to some multiplayer games it will get stuck on the waiting for server to save map screen. This happans on multiple servers and is more frequent on servers with small maps. I also know, through hosting the deadicated server, that multiple people will experience this while connecting to our server. Our server has non blocking saving enabled if this has any effect. Below are the server logs and client logs when I have the issue. The logs include me pressing esc to cancel the connection as it will just hang with no further log activity. From what I can make of the logs the client never receives mapReadyForDownload and then everything just hangs. The invalid packet states are common to both successful joins and failed joins, and downloading the map never has any issues once it starts.
Server Logs Fail
Client Logs Fail
Server Logs Success
Client Logs Success

Re: [0.18.28] Stuck on waiting to save map

Posted: Fri May 29, 2020 9:33 pm
by Cooldude2606
To clarify, I have reported this issue before and have had it classed as not a bug. However, this has continually occured since my last report, and people playing on our servers have been reporting this issue to me. I am therefore opening another report as I believe that there is an underlying issue which has not been resolved.

I can also capture a tcpdump/wireshark capture for both the client and server if it would help with debugging.

Here is my previous report from 0.17.44 and a similar report from 0.15.6.

Re: [0.18.28] Stuck on waiting to save map

Posted: Sat May 30, 2020 5:56 pm
by Rseding91
I've seen this multiple times before but nobody knows how to reproduce it reliably.

If you can reproduce it (even not reliably) a full process dump of the client and server (assuming it's running windows?) will let me debug it and figure out what's happening.

Re: [0.18.28] Stuck on waiting to save map

Posted: Sat May 30, 2020 10:31 pm
by Cooldude2606
The server is running linux headless, will this still be of use? Details for the server and client are below.
Also, when you say process dump, do you mean a net capture or some kind of memory dump?
Server Details
Client Details

Re: [0.18.28] Stuck on waiting to save map

Posted: Sat Aug 29, 2020 7:03 pm
by Rseding91
Cooldude2606 wrote:
Sat May 30, 2020 10:31 pm
The server is running linux headless, will this still be of use?
To me; no. I'm not even sure if there is such a thing on linux.

So, there's nothing I can do about this - maybe one of the linux developers could assist.

Re: [Oxyd] [0.18.28] Stuck on waiting to save map

Posted: Sun Aug 30, 2020 12:10 am
by Cooldude2606
We have done some testing with our server, as well as getting some feedback from other server hosters, and we believe that the banlist might be the cause of the error.

First we filtered our banlist to only include valid usernames (containing alphanumeric characters and ._-) and limited it to bans which included a reason and where the reason contained only ascii characters (without control characters like \n)

We then ran tests with our banlist (On) and then with an empty banlist (Off) allowing upto 10 seconds for the server to save the map, the results follow:
On - 0/3 Successful; Off - 3/3 Successful; On - 0/3 Successful; Off - 3/3 Successful;
On - 1/3 Successful; Off - 3/3 Successful; On - 0/3 Successful

We then stopped as it seamed to be conclusive that the ban list was the cause of these issues, hope this information is helpful.
If you would like me to send the ban list please ask, I would rather send it via dms to avoid posting it publicly.

Re: [Oxyd] [0.18.28] Stuck on waiting to save map

Posted: Sun Aug 30, 2020 3:20 am
by Rseding91
Is your banlist some huge-ass multiple MB of text? Because it gets sent to connecting players when joining servers to allow a given peer to know if someone is banned or not when using the /ban/unban commands.

Re: [Oxyd] [0.18.28] Stuck on waiting to save map

Posted: Sun Aug 30, 2020 8:42 am
by mark9064
LOL, we have ~1000 bans on the banlist in total, at a size of 100KiB. I don't think this size is unreasonable, as a large public server the banlist gets to this size after a few years. If you're wondering why no-one else is complaining, other communities have taken to starting games with empty banlists, and then watching the join log for anyone on the real banlist and banning them as soon as they join. This works around the problem of Factorio sending a large banlist which seems to break things, but feels like a solution for a problem that shouldn't exist.

Since these files are just text, compressing them works nicely, dropping the size by a factor of 4 when using GZIP.

Re: [Oxyd] [0.18.28] Stuck on waiting to save map

Posted: Sun Aug 30, 2020 5:35 pm
by Rseding91
Ok, 100 KB isn't unreasonable but still annoying that it's synced at all. I didn't like it when it was added but saw no other way to do it better at the time. This might give a starting point for figuring out what's happening with stuck saving.

Re: [Oxyd] [0.18.28] Stuck on waiting to save map

Posted: Fri Oct 16, 2020 1:11 am
by James_Hackett
Hi Oxyd, any further development on this issue or is there a post I'm missing?

Re: [Oxyd] [0.18.28] Stuck on waiting to save map

Posted: Mon Oct 19, 2020 4:11 pm
by Oxyd
Hi, and yes, there is a development: It should be fixed for 1.1.0. Thanks for all the information!

Re: [Oxyd] [0.18.28] Stuck on waiting to save map

Posted: Mon Oct 04, 2021 5:06 pm
by jackazzm
Hello, This issue is plaguing one of the biggest MP servers on factorio quite a lot so it seems to not be totally fixed as of yet

Re: [Oxyd] [0.18.28] Stuck on waiting to save map

Posted: Mon Oct 04, 2021 7:10 pm
by Klonan
jackazzm wrote:
Mon Oct 04, 2021 5:06 pm
Hello, This issue is plaguing one of the biggest MP servers on factorio quite a lot so it seems to not be totally fixed as of yet
Can you provide more details, what part is not fixed yet?
Can you make a new bug report with new steps to reproduce, with logs?

Re: [Oxyd] [0.18.28] Stuck on waiting to save map

Posted: Tue Oct 05, 2021 11:41 am
by jackazzm
Klonan wrote:
Mon Oct 04, 2021 7:10 pm
jackazzm wrote:
Mon Oct 04, 2021 5:06 pm
Hello, This issue is plaguing one of the biggest MP servers on factorio quite a lot so it seems to not be totally fixed as of yet
Can you provide more details, what part is not fixed yet?
Can you make a new bug report with new steps to reproduce, with logs?
It is exactly as OP states, whole server is stuck while 1 player is waiting for the server to save map to them. It is paused until the player decides to abort the connection process so it is very frustrating to have the whole game paused for an unforseen time.

Re: [Oxyd] [0.18.28] Stuck on waiting to save map

Posted: Tue Oct 05, 2021 1:14 pm
by Klonan
jackazzm wrote:
Tue Oct 05, 2021 11:41 am

It is exactly as OP states, whole server is stuck while 1 player is waiting for the server to save map to them. It is paused until the player decides to abort the connection process so it is very frustrating to have the whole game paused for an unforseen time.
Sure, but between then and now the code has changed, so we would need new server logs to help us pinpoint the problem

Re: [Oxyd] [0.18.28] Stuck on waiting to save map

Posted: Tue Jan 18, 2022 12:43 am
by distortions864
With auth (public game) on, I have been able to reproduce the bug on 1.1.50.

If changing state from(InGameSavingMap) to(InGame) transition to oldState(ConnectedWaitingForMap) newState(ConnectedDownloadingMap) takes longer than a second or two... its locked. Even on huge maps.

I'm not sure I should post the steps to reproduce, because it happens for me 100% of the time. I also posted on the discord in #programming

Here is the map and settings I was using at the time, when trying to reproduce it.
http://m45sci.xyz/u/fact/locker-repoduce.zip
Server and client were ubuntu 20, connecting to my own server locally (but through the server browser)

Re: [Oxyd] [0.18.28] Stuck on waiting to save map

Posted: Tue Jan 18, 2022 12:02 pm
by distortions864
--Update: Someone sent me a link to the other post about this, for the moment I have made my servers reboot on lock.