desync in biter battles scenario

This subforum contains all the issues which we already resolved.
Post Reply
DrButtons
Burner Inserter
Burner Inserter
Posts: 12
Joined: Thu Nov 25, 2021 12:26 am
Contact:

desync in biter battles scenario

Post by DrButtons »

Hello,
We have seen an increased number of desyncs in our biter battles scenario in the past few months or so.

I personally have definitely seen an increase, but we haven't been able to pin down the reason why. I am playing on an M1 mac, and I seem to be getting desynced more than anyone else, so I suspect that the m1 port may have something to do with it,

Are there any tools that I might be able to use to narrow this down, or hints for us?

I'm not an expert but I know my way around a comp, and can provide any info you seek.

Some things that we noticed:

We seem to be able to get me to desync on spawning many biters quickly, but there seems to be a little bit of art to it. One person I tested with just brush painted biters and was usually able to get me to desync with a similar looking desync zip in 20 seconds, and other person had troubles.


In the logs I saw this before desyncs:

Code: Select all

 711.167 Info UnparsedNetworkMessage.cpp:91: Invalid packet (type ServerToClientHeartbeat) received from IP ADDR:({198.244.206.48:34242}): heartbeat sequence number (5257324) outside latency window [5257349, 5258549)
 711.167 Info UnparsedNetworkMessage.cpp:102: Message data: 07 06 6c 38 50 00 bb e9 46 00 0c 4d 16 01 03 ba 07 00 22 9c 03 00 3d 05 03 3d 56 06 24 0d 24 3c 4a ff 46 ff c8 36 ef 84 ba e9 46 00
 713.683 Info UnparsedNetworkMessage.cpp:91: Invalid packet (type ServerToClientHeartbeat) received from IP ADDR:({198.244.206.48:34242}): heartbeat sequence number (5257476) outside latency window [5257500, 5258700)
Diffing:
image.png
image.png (511.26 KiB) Viewed 3687 times
image.png
image.png (1.21 MiB) Viewed 3687 times
image.png
image.png (1.4 MiB) Viewed 3687 times
notable text for future searching:

<strike-position>
<random-generator>

I have more desyncs I can upload, but they are big

one desync file:
https://drive.proton.me/urls/CFFV13KDN0#znFBkVOQdRjm

another one coming but it's 400+ mb....


repo:
https://github.com/Factorio-Biter-Battl ... er-Battles

User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 319
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: desync in biter battles scenario

Post by Stringweasel »

There's a tool that can read those binary files to show where the data isn't the same. Quite useful, and worth using to unpack, and maybe post the results here. Will be easier to debug then.
https://github.com/Hornwitser/factorio_tools
Alt-F4 Author | Factorio Modder
Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock | Weasel's Demolition Derby

DrButtons
Burner Inserter
Burner Inserter
Posts: 12
Joined: Thu Nov 25, 2021 12:26 am
Contact:

Re: desync in biter battles scenario

Post by DrButtons »

Stringweasel wrote:
Wed Apr 19, 2023 6:57 am
There's a tool that can read those binary files to show where the data isn't the same. Quite useful, and worth using to unpack, and maybe post the results here. Will be easier to debug then.
https://github.com/Hornwitser/factorio_tools
Ya I've tried it, basically the same as the hex differ I posted.

Here's snippet:

Code: Select all

level-heuristic differs
-----------------------

replace   ref[5:6] -> des[5:6]
<random-generator> pos=16557
  <random-generator> pos=16624
ref: b'B\x96%\xba\t\xe0m\xa3\\$G\x88'
<random-generator> pos=16557
  <random-generator> pos=16624
des: b'\xab{!\xd0\x16\xee[m0\x14[%'

replace   ref[0:1] -> des[0:1]

ref: b'\x00\x00\x00\x00\x12\x01\x00\x00\xcb\x01\x00\x00,\x00\x00\x003\x00\x00\x00\x17\x00\x00\x00\x88\x00\x00\x00B\x00\x00\x00\\\x01\x00\x00\xa2\x03\x00\x00%\x00\x00\x00\x06\x00\x00\x00 \x00\x00\x00I\x00\x00\x00\x8b\x03\x00\x00(\x00\x00\x002\x00\x00\x00i\x00\x00\x00\xa1\x00\x00\x00\x03\x00\x00\x00"\x00\x00\x00\x03\x00\x00\x00:\x00\x00\x00@\x00\x00\x00\x01\x00\x00\x00\x80\x03\x00\x00R\x00\x00\x00@\x00\x00\x00\x02\x00\x00\x00\x82\x00\x00\x00/\x00\x00\x00\x10\x00\x00\x00d+\x01\x00|\x00\x00\x00\x86\x01\x00\x00\xa8r\x00\x00C\xd7\x00\x00\x80\xd0\x00\x00zw\x02\x00\x97+\x00\x00\x8e;\x02\x00\xed\xfc\x00\x00r\xfc\x00\x00#\x01\x00\x00x\x01\x01\x00\xaa\x9b\x01\x00]\x16\x00\x00rE\x01\x00\xdd\x1a\x00\x007:\x00\x00\x02]\x00\x00H\xd9\x00\x00\xd09\x00\x00\t\x87\x02\x00\x0f \x00\x00+\xca\x00\x00\xfd\xf4\x00\x00\x9cj\x01\x00x\x0c\x00\x007\x88\x01\x00\xac\x7f\x00\x00\xfa\x9a\x01\x00\x0e[\x01\x00\xfb\x0f\x01\x00\x10\xcc\x01\x00qK\x00\x00{\xb8\x02\x00\x0f\xc2\x00\x00\x92"\x00\x00]\x05\x02\x00\xbaE\x02\x003\x01\x00\x00\x99\x07\x00\x00p\xfe\x01\x00\xa9\x89\x00\x00\x12\x08\x01\x00\x8a\xae\x00\x00\x05\x95\x01\x00\x91&\x01\x00n~\x01\x00pk\x00\x00\xdf\t\x00\x00\x04\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00F\x01\x00\x00\x0c\x00\x00\x00\x1f\x01\x00\x00?\x00\x00\x00\x1e\x00\x00\x00\xa3\x00\x00\x00\x96\x00\x00\x00e\x00\x00\x00m\x00\x00\x00\r\x00\x00\x00!\x00\x00\x001\x01\x00\x00\xa6\x01\x00\x00\xcd\x01\x00\x00\x07\x00\x00\x00q\x01\x00\x00]\x01\x00\x00]\x00\x00\x00\x89\x01\x00\x00\r\x00\x00\x008\x00\x00\x00i\x01\x00\x00\xf3\x00\x00\x00g\x00\x00\x00K\x00\x00\x00\n\x01\x00\x00\x90\x00\x00\x00$\x00\x00\x00\x08\x01\x00\x00*\x00\x00\x00\x95\x01\x00\x00\xc9\x14\x00\x00\xdeY\x00\x00\x844\x00\x00\n\x0b\x00\x00\x11\x01\x00\x00\xd8b\x00\x00\x0e\x1c\x00\x00<\x03\x00\x00\xe5\xb9\x00\x00\x86\x84\x00\x00\x94\xdb\x00\x00N\x0b\x00\x00\x1c\xaa\x00\x00\xe5\x06\x00\x00Z\x1b\x00\x00\xd7\xc4\x01\x009\x19\x00\x00\x08\x03\x00\x00V \x00\x00\xf3P\x00\x00\xbe)\x00\x00_\x0f\x00\x00\xc0\x00\x00\x00\x1b\x07\x00\x00)P\x00\x00ob\x00\x00\xfb\x14\x01\x00l\xe9\x01\x00\xa3\x11\x00\x00\xe5\x0b\x00\x00v-\x01\x00\xd6 \x00\x00\xeb\x16\x00\x00\xe2#\x00\x00\xbb\xed\x00\x00\r\x1c\x00\x00\xa1+\x01\x00\x97\xf8\x00\x00\x86\x85\x00\x00V\x93\x01\x00\x985\x00\x00Y \x00\x00K\x08\x00\x00\xe1\\\x01\x00\xf2,\x01\x00XE\x00\x00\xa76\x00\x00\'\xcc\x00\x00)W\x00\x00\xf0\x03\x00\x002\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

des: b'\x00\x00\x00\x00\x12\x01\x00\x00\xcb\x01\x00\x00,\x00\x00\x003\x00\x00\x00\x17\x00\x00\x00\x88\x00\x00\x00B\x00\x00\x00\\\x01\x00\x00\xa2\x03\x00\x00%\x00\x00\x00\x06\x00\x00\x00 \x00\x00\x00I\x00\x00\x00\x8b\x03\x00\x00(\x00\x00\x002\x00\x00\x00i\x00\x00\x00\xa1\x00\x00\x00\x03\x00\x00\x00"\x00\x00\x00\x03\x00\x00\x00:\x00\x00\x00@\x00\x00\x00\x01\x00\x00\x00\x80\x03\x00\x00R\x00\x00\x00@\x00\x00\x00\x02\x00\x00\x00\x82\x00\x00\x00/\x00\x00\x00\x10\x00\x00\x00d+\x01\x00|\x00\x00\x00\x86\x01\x00\x00\xa8r\x00\x00C\xd7\x00\x00\x80\xd0\x00\x00zw\x02\x00\x97+\x00\x00\x8e;\x02\x00\xed\xfc\x00\x00r\xfc\x00\x00#\x01\x00\x00x\x01\x01\x00\xaa\x9b\x01\x00]\x16\x00\x00rE\x01\x00\xdd\x1a\x00\x007:\x00\x00\x02]\x00\x00H\xd9\x00\x00\xd09\x00\x00\t\x87\x02\x00\x0f \x00\x00+\xca\x00\x00\xfd\xf4\x00\x00\x9cj\x01\x00x\x0c\x00\x007\x88\x01\x00\xac\x7f\x00\x00\xfa\x9a\x01\x00\x0e[\x01\x00\xfb\x0f\x01\x00\x10\xcc\x01\x00qK\x00\x00{\xb8\x02\x00\x0f\xc2\x00\x00\x92"\x00\x00]\x05\x02\x00\xbaE\x02\x003\x01\x00\x00\x99\x07\x00\x00p\xfe\x01\x00\xa9\x89\x00\x00\x12\x08\x01\x00\x8a\xae\x00\x00\x05\x95\x01\x00\x91&\x01\x00n~\x01\x00pk\x00\x00\xdf\t\x00\x00\x04\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00F\x01\x00\x00\x0c\x00\x00\x00\x1f\x01\x00\x00?\x00\x00\x00\x1e\x00\x00\x00\xa3\x00\x00\x00\x96\x00\x00\x00e\x00\x00\x00m\x00\x00\x00\r\x00\x00\x00!\x00\x00\x001\x01\x00\x00\xa6\x01\x00\x00\xcd\x01\x00\x00\x07\x00\x00\x00q\x01\x00\x00]\x01\x00\x00]\x00\x00\x00\x89\x01\x00\x00\r\x00\x00\x008\x00\x00\x00i\x01\x00\x00\xf3\x00\x00\x00g\x00\x00\x00K\x00\x00\x00\n\x01\x00\x00\x90\x00\x00\x00$\x00\x00\x00\x08\x01\x00\x00*\x00\x00\x00\x95\x01\x00\x00\xc1\x16\x00\x00\xd6[\x00\x00|6\x00\x00\x02\r\x00\x00\t\x03\x00\x00\xd0d\x00\x00\x06\x1e\x00\x004\x05\x00\x00\xdd\xbb\x00\x00~\x86\x00\x00\x8c\xdd\x00\x00F\r\x00\x00\x14\xac\x00\x00\xf8\x01\x00\x00R\x1d\x00\x00\xcf\xc6\x01\x001\x1b\x00\x00\x00\x05\x00\x00N"\x00\x00\xebR\x00\x00\xb6+\x00\x00W\x11\x00\x00\xb8\x02\x00\x00\x13\t\x00\x00!R\x00\x00gd\x00\x00\xf3\x16\x01\x00d\xeb\x01\x00\x9b\x13\x00\x00\xdd\r\x00\x00n/\x01\x00\xce"\x00\x00\xe3\x18\x00\x00\xda%\x00\x00\xb3\xef\x00\x00\x05\x1e\x00\x00\x99-\x01\x00\x8f\xfa\x00\x00~\x87\x00\x00N\x95\x01\x00\x907\x00\x00Q"\x00\x00C\n\x00\x00\xd9^\x01\x00\xea.\x01\x00PG\x00\x00\x9f8\x00\x00\x1f\xce\x00\x00!Y\x00\x00\xe8\x05\x00\x002\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

script.dat differs
------------------
parsing desynced-level/script.dat
parsing mp-save-455/script.dat

level_with_tags.dat differs
---------------------------

replace   ref[5:6] -> des[5:6]
<random-generators> pos=3265
  <random-generator> pos=3333
ref: b'B\x96%\xba\t\xe0m\xa3\\$G\x88'
<random-generators> pos=3265
  <random-generator> pos=3333
des: b'\xab{!\xd0\x16\xee[m0\x14[%'

insert    ref[84122:84122] -> des[84122:84138]
<active-entities> pos=38791941
des: b'<entity name=small-spitter position={962.3476562500, -432.8320312500}><targeter name=small-spitter position={962.3476562500, -432.8320312500} flags=0></targeter></entity><entity name=medium-spitter position={-97.6093750000, 543.3007812500}><targeter name=medium-spitter position={-97.6093750000, 543.3007812500} flags=0></targeter></entity><entity name=small-spitter position={975.3085937500, -415.2500000000}><targeter name=small-spitter position={975.3085937500, -415.2500000000} flags=0></targeter></entity><entity name=medium-biter position={-95.7109375000, 537.5039062500}><targeter name=medium-biter position={-95.7109375000, 537.5039062500} flags=0></targeter></entity>'

User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 319
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: desync in biter battles scenario

Post by Stringweasel »

That gives a little more information, and shows that one client called `random` more than the other client, meaning the random number generators are in different states. But the cause of that is likely hard to track down.
Alt-F4 Author | Factorio Modder
Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock | Weasel's Demolition Derby

User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 319
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: desync in biter battles scenario

Post by Stringweasel »

Have you tried running the scenario in single player using Heavy Mode?

Edit: Some information about what it is here: https://wiki.factorio.com/Desynchroniza ... de_command
Alt-F4 Author | Factorio Modder
Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock | Weasel's Demolition Derby

DrButtons
Burner Inserter
Burner Inserter
Posts: 12
Joined: Thu Nov 25, 2021 12:26 am
Contact:

Re: desync in biter battles scenario

Post by DrButtons »

Stringweasel wrote:
Wed Apr 19, 2023 7:56 am
Have you tried running the scenario in single player using Heavy Mode?

Edit: Some information about what it is here: https://wiki.factorio.com/Desynchroniza ... de_command
Yea I tried that already. I haven't been able to reproduce anything locally.

When someone else spawns a bunch of biters in the scenario in multiplayer using the biter brush in /editor, I get desynced usually eventually. I tried for a long time to do it myself on the multiplayer server, couldn't reproduce it. I also tried in single player - couldn't get any error.

Genhis
Factorio Staff
Factorio Staff
Posts: 120
Joined: Wed Dec 24, 2014 8:19 am
Contact:

Re: desync in biter battles scenario

Post by Genhis »

1.1.81 has some changes which could help, although it's hard to say without a reliable way to reproduce the desync. Let us know if this issue still persists in the experimental version.

DrButtons
Burner Inserter
Burner Inserter
Posts: 12
Joined: Thu Nov 25, 2021 12:26 am
Contact:

Re: desync in biter battles scenario

Post by DrButtons »

Genhis wrote:
Wed Apr 19, 2023 3:45 pm
1.1.81 has some changes which could help, although it's hard to say without a reliable way to reproduce the desync. Let us know if this issue still persists in the experimental version.
Sadly that didn't seem to help. Although, for one reason or another (not sure) I seem to be able to somewhat reliable desync myself with the 1.1.81 biter battles test server (linux) by spawning biters.

Here are 3 fresh (and small!) desyncs:
https://drive.proton.me/urls/YGY19R9RD8#ay27fS9MQYLa
https://drive.proton.me/urls/43W68F2HX4#wdsk9n3Vbcll
https://drive.proton.me/urls/BZHE17G45C#5b195Dj1KSWB

TheBigZet
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Jul 03, 2017 5:02 pm
Contact:

Re: desync in biter battles scenario

Post by TheBigZet »

DrButtons wrote:
Wed Apr 19, 2023 8:35 am
Yea I tried that already. I haven't been able to reproduce anything locally.
I'd expect that you need at least two different machines for desync to occur.

DrButtons
Burner Inserter
Burner Inserter
Posts: 12
Joined: Thu Nov 25, 2021 12:26 am
Contact:

Re: desync in biter battles scenario

Post by DrButtons »

So I added print statements.... everywhere I could find. at the start and end of functions, and before every function return.

I unfortunately don't see any differences in and of the logs except for 2 calls to latency changes...
I guess that the overall flow must be identical, but somehow it must become different mid function.

How often do these desync checks occur? I have timestamps thanks to log but I don't know how far back I should check?

only differences:

Code: Select all

Info ClientSynchronizer.cpp:327: Latency changed to (59)
...
Info ClientSynchronizer.cpp:327: Latency changed to (50)

pseudo traceback:

Code: Select all

Script utils/event_core.lua:60: Func end Factorio-Biter-Battles/utils/event_core.lua:59
Script utils/event_core.lua:62: Func end Factorio-Biter-Battles/utils/event_core.lua:61
Script utils/event_core.lua:75: Func end Factorio-Biter-Battles/utils/event_core.lua:74
Script utils/event_core.lua:68: Func start Factorio-Biter-Battles/utils/event_core.lua:66
Script utils/event_core.lua:48: Func start Factorio-Biter-Battles/utils/event_core.lua:46
Script antigrief.lua:465: Func start Factorio-Biter-Battles/antigrief.lua:463
Script antigrief.lua:562: Func end Factorio-Biter-Battles/antigrief.lua:561
Script utils/event_core.lua:60: Func end Factorio-Biter-Battles/utils/event_core.lua:59
Script comfy_panel/score.lua:447: Func start Factorio-Biter-Battles/comfy_panel/score.lua:445
Script comfy_panel/score.lua:465: Func ret Factorio-Biter-Battles/comfy_panel/score.lua:464
Script utils/event_core.lua:60: Func end Factorio-Biter-Battles/utils/event_core.lua:59
Script modules/spawners_contain_biters.lua:20: Func start Factorio-Biter-Battles/modules/spawners_contain_biters.lua:18
Script modules/spawners_contain_biters.lua:26: Func ret Factorio-Biter-Battles/modules/spawners_contain_biters.lua:25
Script utils/event_core.lua:60: Func end Factorio-Biter-Battles/utils/event_core.lua:59
Script maps/biter_battles_v2/main.lua:94: Func start Factorio-Biter-Battles/maps/biter_battles_v2/main.lua:92
Script maps/biter_battles_v2/ai.lua:595: Func start Factorio-Biter-Battles/maps/biter_battles_v2/ai.lua:593
Script maps/biter_battles_v2/ai.lua:597: Func ret Factorio-Biter-Battles/maps/biter_battles_v2/ai.lua:596
Script maps/biter_battles_v2/functions.lua:325: Func start Factorio-Biter-Battles/maps/biter_battles_v2/functions.lua:323
Script maps/biter_battles_v2/functions.lua:327: Func ret Factorio-Biter-Battles/maps/biter_battles_v2/functions.lua:326
Script maps/biter_battles_v2/game_over.lua:469: Func start Factorio-Biter-Battles/maps/biter_battles_v2/game_over.lua:467
Script maps/biter_battles_v2/game_over.lua:425: Func start Factorio-Biter-Battles/maps/biter_battles_v2/game_over.lua:423
Script maps/biter_battles_v2/game_over.lua:428: Func ret Factorio-Biter-Battles/maps/biter_battles_v2/game_over.lua:427
Script maps/biter_battles_v2/game_over.lua:444: Func start Factorio-Biter-Battles/maps/biter_battles_v2/game_over.lua:442
Script maps/biter_battles_v2/game_over.lua:465: Func end Factorio-Biter-Battles/maps/biter_battles_v2/game_over.lua:464
Script maps/biter_battles_v2/game_over.lua:487: Func ret Factorio-Biter-Battles/maps/biter_battles_v2/game_over.lua:486
Script maps/biter_battles_v2/main.lua:109: Func end Factorio-Biter-Battles/maps/biter_battles_v2/main.lua:108
Script utils/event_core.lua:60: Func end Factorio-Biter-Battles/utils/event_core.lua:59
Script utils/event_core.lua:62: Func end Factorio-Biter-Battles/utils/event_core.lua:61
Script utils/event_core.lua:75: Func end Factorio-Biter-Battles/utils/event_core.lua:74

DrButtons
Burner Inserter
Burner Inserter
Posts: 12
Joined: Thu Nov 25, 2021 12:26 am
Contact:

Re: desync in biter battles scenario

Post by DrButtons »

Sorry to bump, but I was wondering if there was anything I could do to help track this down? happy to provide more desync saves or test with someone...

In the factorio discord bilka grabbed a save from a server that I could only desync connecting to, so hopefully that's enough, but otherwise I'm willing to put in the hours to help.

bigfatduck
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu May 04, 2023 6:15 pm
Contact:

Re: desync in biter battles scenario

Post by bigfatduck »

I also get the same exact bug with my M1 Max on Factorio Experimental, same mod

Genhis
Factorio Staff
Factorio Staff
Posts: 120
Joined: Wed Dec 24, 2014 8:19 am
Contact:

Re: desync in biter battles scenario

Post by Genhis »

Thanks for the report, we managed to track down the issue. It's fixed for the next release.

As the pathfinder got overloaded (which is a state when it tries to do more work per tick because there are too many waiting clients), there was a logic error. As a result, a negative double value got converted to uint32_t. On x86 platforms it wrapped around, ARM clamped the negative value to 0. Based on this value, a different code path was executed - and so it desynced.

DrButtons
Burner Inserter
Burner Inserter
Posts: 12
Joined: Thu Nov 25, 2021 12:26 am
Contact:

Re: desync in biter battles scenario

Post by DrButtons »

Hey Genhis,

The Biter battles server is tagged to stable, so today got a chance to try it out with a lot of people and a real game instead of small stuff.

within a very short period of time I desynced : (

not sure if you have any ideas of other ways I can investigate this, but here's a desync zip.
also have the hornwitser desync debug log as well.
Attachments
desync-report-2023-07-15_11-42-23.zip.log
(2.67 MiB) Downloaded 42 times

DrButtons
Burner Inserter
Burner Inserter
Posts: 12
Joined: Thu Nov 25, 2021 12:26 am
Contact:

Re: desync in biter battles scenario

Post by DrButtons »

sorry - here is the link -- forgot to upload https://drive.proton.me/urls/JQ5ZCVFTJ8#9xZnP1YTqXgd

Genhis
Factorio Staff
Factorio Staff
Posts: 120
Joined: Wed Dec 24, 2014 8:19 am
Contact:

Re: desync in biter battles scenario

Post by Genhis »

Having a save file which reliably reproduces the desync would be very helpful. So far I was unsuccessful in my attempts. You could try enabling replay and attaching last autosave together with a desync report when it happens. Keep autosave interval to at most 5 minutes.

Post Reply

Return to “Resolved Problems and Bugs”