[Dominik] [0.16.7] Random desync on local headless server

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
Post Reply
ekimekim
Burner Inserter
Burner Inserter
Posts: 17
Joined: Wed Dec 13, 2017 11:40 pm
Contact:

[Dominik] [0.16.7] Random desync on local headless server

Post by ekimekim »

When playing on my server, a desync can happen randomly.
When it happens, it tends to persist for some time - attempts to reconnect sometimes succeed, sometimes consistently desync as soon as I attempt to join.
But other times, I can join fine and then play for hours before it happens again.
This started happening a few hours after upgrading to 0.16.7.

Other players don't seem to be having this issue on this server, just me (admittedly, my sample size here is very small - one other player for an hour or two). I have verified my steam files. It's worth noting that I'm playing on loopback - I have a headless server running and I am connecting to it from the same machine.
This save was continued from 0.15 so might involve some upgrade weirdness.
I can't identify anything in particular I'm doing when the desync occurs.

Here's a GDrive folder with a range of desync reports over a few hours:
https://drive.google.com/drive/folders/ ... sp=sharing

Dominik
Former Staff
Former Staff
Posts: 658
Joined: Sat Oct 12, 2013 9:08 am
Contact:

Re: [Dominik] [0.16.7] Random desync on local headless server

Post by Dominik »

Ok man, looking into it. But the save is huge :-/

ekimekim
Burner Inserter
Burner Inserter
Posts: 17
Joined: Wed Dec 13, 2017 11:40 pm
Contact:

Re: [Dominik] [0.16.7] Random desync on local headless server

Post by ekimekim »

Yeah, sorry. Long-term megabase. I might try over the weekend deleting most of the contents and seeing if I can still repro.

ekimekim
Burner Inserter
Burner Inserter
Posts: 17
Joined: Wed Dec 13, 2017 11:40 pm
Contact:

Re: [Dominik] [0.16.7] Random desync on local headless server

Post by ekimekim »

EDIT3: Ok, disregard all this. Looks like desync still occurs even without the circuit. Maybe less often?



Ok, I've made some progress. As far as I can tell, desyncs only occur while this circuit is active:

Code: Select all

0eNrtWG2OmzAQvYt/ttBiE0LgR6Wco1ohAs6uJTDImKhRlAP0IL1YT9IxtPkEYntX2a1290e0/hqP35t5Y7NDq6KltWBconiHWFbxBsXfd6hhjzwtVJ/c1hTFiElaIgfxtFStVDD5VFLJMjeryhXjqawE2juI8Zz+QDHePziIcskko73BrrFNeFuuqIAJB1M5zVhOxakdB9VVA0srrhwAcy75EjhoC//4sEfOBM36UeIgcFmKqkhW9CndMFgNS/7aTGAs7+w0qnfNRCOTq5NtmJAt9Bw86me4NM2e1JEUJjJVAHmqUdap6LyM0e+fv2BV1cq6tbJbb8HDlstkLaoyYRzMoFiKlu77bXl/zM55rH4EzU/BZNCa7x9gMhkZVfgwkbVMdk2gZQ+2r9ggN4idIIRoEXI0+zKcNFSZSY7U4MDzgJ6qpkBO5wn6ZM2NAfz4HGAyyYZ/NdlBj4JSfmPiGG2+PW34bdB2QdnnF6dsEF5iQtrVZOdsONTlNNTjdGbMqffBKeAZHEkcHMeeHv7BwZd/J5pEH5tAv2aFpGKkwI5hsexrRaug9TuRO9ZYE4Bml+c/j2M808NnfvCvpDlrS5cWsL2AIK2rgo4CRKwlFY9mVHSdxkMeh9Yq6b3nhPKfVdnOg2uhK5ILvSBcWFP6rjUyNKE0nKY00mMqsi5nr8qUmTqfUvn1HrfOxTQ3ONDNt8uqOB0SWFua5yPhoPazjIf7ivFy+JXx/LRdGubsbJQgnZo4lpbY7P2NjXLyTq/vb6/+9o600+xWhuLpvNO8m2Fic3n17nN3dbHX/9leYAfUZxgF3/CK6pIOBzJozP49Rv7PAnafzyZYN3WC6cwINGMisNI78qF3Uzo0IXjYRN8GixaY7r45xyefqB1UpCtaqL6qUp+jNyBJHTXzRYijyA9mEaTxH6g51gs=
It's a rolling average calculator to measure item throughputs. Belts in pulse mode send signals to the input, where it's multiplied to avoid rounding in later steps. This input is replicated over 4 delay ticks so every input signal lasts for 4 ticks.
The signals feed into a feedback circuit which does the following:
out = (saved + input) / (A+1)
saved = out * A

ie. every 4 ticks (because the multiply and divide circuits both need to have their A value filtered out before being fed back), it takes the average of the current input and previous value in a ratio 1:A. This produces a rolling average where A is configurable.

Every desync I've encountered has been while this circuit is:
* fully hooked up (I did not get desyncs when the out value was disconnected from the saved value)
* contains at least one non-zero value besides A.

I'll attempt to reproduce on a blank map with just this circuit in it.

EDIT: One more bit of info, this happens for many values of A. I've tested: 3k, 100.

EDIT2: Very interestingly, this seems to happen even if the circuit is unpowered, but does contain values. Link for the desync report for this specific scenario: https://drive.google.com/file/d/1mZWxVZ ... sp=sharing

Dominik
Former Staff
Former Staff
Posts: 658
Joined: Sat Oct 12, 2013 9:08 am
Contact:

Re: [Dominik] [0.16.7] Random desync on local headless server

Post by Dominik »

Hi,
there is quite good chance that the desync is connected to a bug with electric poles that was present in this version. With the size of the save, I can't realistically confirm it though, so if possible, upgrade to the current version and file a new report if a desync occurs after that.
Thanks :)

ekimekim
Burner Inserter
Burner Inserter
Posts: 17
Joined: Wed Dec 13, 2017 11:40 pm
Contact:

Re: [Dominik] [0.16.7] Random desync on local headless server

Post by ekimekim »

We haven't had the desync since upgrading, so yeah, that makes sense.

Post Reply

Return to “Pending”