Page 1 of 1

[0.17.68] Pausing server while connecting results in intermittent progress

Posted: Wed Sep 04, 2019 7:16 pm
by Adamo
Simple bug report. While the only player connected to a headless server, the "pause" function doesn't completely pause the game, but rather puts the game into a state where it's paused most of the time, but moves forward in small spurts. I don't have any mods that are affecting the pause state that I'm aware of, although I will be triple checking that.

Re: Pause bug

Posted: Wed Sep 04, 2019 7:29 pm
by Loewchen
What version is that?
When was the game paused? Before the player connected? When he downloaded the map? After he downloaded the map?
How was the game paused? By the player himself? By the server?

Re: Pause bug

Posted: Wed Sep 04, 2019 7:36 pm
by Adamo
Loewchen wrote: Wed Sep 04, 2019 7:29 pm What version is that?
Latest: 0.17.58.
Loewchen wrote: Wed Sep 04, 2019 7:29 pm When was the game paused? Before the player connected? When he downloaded the map? After he downloaded the map? How was the game paused? By the player himself? By the server?
The game was running, with no players connected. I connected to the game. Then I paused the game, as an admin, from my client's menu. That is when I noticed this behaviour.

Re: Pause bug

Posted: Wed Sep 04, 2019 7:51 pm
by Loewchen
Adamo wrote: Wed Sep 04, 2019 7:36 pm Latest: 0.17.58.
You mean .68?

Re: Pause bug

Posted: Wed Sep 04, 2019 9:16 pm
by Adamo
Loewchen wrote: Wed Sep 04, 2019 7:51 pm
Adamo wrote: Wed Sep 04, 2019 7:36 pm Latest: 0.17.58.
You mean .68?
Yes, sorry, typo: version 0.17.68.

Re: [0.17.68] Pausing server while connecting results in intermittent progress

Posted: Thu Sep 05, 2019 8:39 am
by Twinsen
It sounds like the client is not fast enough to keep up with the server, so it's falling behind. When the game is paused, the client will use that opportunity to try to catch up to the server. This looks like the game is moving forward at a choppy pace.

More details or a short video will help us understand the issue, because otherwise I can't reproduce the issue.

Re: [0.17.68] Pausing server while connecting results in intermittent progress

Posted: Thu Sep 05, 2019 8:52 am
by Adamo
Twinsen wrote: Thu Sep 05, 2019 8:39 am It sounds like the client is not fast enough to keep up with the server, so it's falling behind. When the game is paused, the client will use that opportunity to try to catch up to the server. This looks like the game is moving forward at a choppy pace.

More details or a short video will help us understand the issue, because otherwise I can't reproduce the issue.
I can prepare a video, but I'm not sure what other details are useful. Please guide me in what information is helpful.

The server uses a Xeon E5540 with 64GB of RAM through hardware virtualization using virtualbox. The client uses an i7 4790K with 24GB of RAM. It's a relatively small map. Both run linux.

I can see why you'd come to your conclusion, but I suspect this is not the case, as both are powerful machines, but the client is significantly more powerful, and is only using about 50% of the core its running. I see in the video that UPS jumps to almost 90 during the pause, so that does seem related to a "catch-up" behaviour. I'm not sure what to make of it. The client is keeping up with the server fine through hours of play time, as far as I can tell.

Re: [0.17.68] Pausing server while connecting results in intermittent progress

Posted: Thu Sep 05, 2019 9:04 am
by Twinsen
That does look very strange.

Please make another short video but with "show-multiplayer-waiting-icon" and "show-multiplayer-statistics" debug options active.
Also upload the log file for the client and server. (or pm them)

Re: [0.17.68] Pausing server while connecting results in intermittent progress

Posted: Thu Sep 05, 2019 9:08 am
by Adamo
Ahh, yes, I see the buffer number jumps a bit, at least.

Re: [0.17.68] Pausing server while connecting results in intermittent progress

Posted: Thu Sep 05, 2019 9:31 am
by Oxyd
I can see that you have RCON enabled. Are you (or some script) sending any RCON commands to the server whilst it's paused?

Re: [0.17.68] Pausing server while connecting results in intermittent progress

Posted: Thu Sep 05, 2019 9:31 am
by Adamo
Oxyd wrote: Thu Sep 05, 2019 9:31 am I can see that you have RCON enabled. Are you (or some script) sending any RCON commands to the server whilst it's paused?
Ah, yes, we're using clusterio, which interfaces with the server process using RCON.

Re: [0.17.68] Pausing server while connecting results in intermittent progress

Posted: Thu Sep 05, 2019 9:38 am
by Oxyd
Adamo wrote: Thu Sep 05, 2019 9:31 am
Oxyd wrote: Thu Sep 05, 2019 9:31 am I can see that you have RCON enabled. Are you (or some script) sending any RCON commands to the server whilst it's paused?
Ah, yes, we're using clusterio, which interfaces with the server process using RCON.
Sounds like that's what's happening then. The game can't run commands when it's paused, so when it receives an RCON command, it unpauses for just long enough to process the command. The alternative would be RCON not working at all when the server is paused.

So if that's what it is, then this would be not a bug.

Re: [0.17.68] Pausing server while connecting results in intermittent progress

Posted: Thu Sep 05, 2019 9:51 am
by Adamo
Oxyd wrote: Thu Sep 05, 2019 9:38 am So if that's what it is, then this would be not a bug.
I strongly suspected your interpretation is correct, since it is periodic with a frequency similar to how often clusterio tries to interact. So I watched it as I turned on and off the clusterio master process, and it clearly changed the amount of time the game spent "unpaused", which in my view indicates this is what's causing it: the reduced amount of time spent "unpaused" indicates less time the clusterio client process spent querying and controlling, as it recognizes at some earlier gate that the master isn't available.

OK, very good, thanks guys.

Is this related to a recent change? I swear it used to pause fine.

Re: [0.17.68] Pausing server while connecting results in intermittent progress

Posted: Thu Sep 05, 2019 9:55 am
by Oxyd

Re: [0.17.68] Pausing server while connecting results in intermittent progress

Posted: Thu Sep 05, 2019 10:00 am
by Adamo
OK, sorry for the fuss, then. Thanks for identifying the cause. And for who improved my title. :P