Packet reordering can cause a wrong client-side map #14506
Labels
Bug
Issues that were confirmed to be a bug
@ Network
Non-trivial
A large amount of work is required to address this (sometimes to the point of being infeasible).
Minetest version
Irrlicht device
X11
Operating system and version
Arch Linux
CPU model
dual core Intel Core i5-6200U [MT MCP]
GPU model
No response
Active renderer
No response
Summary
Minetest detects and fixes network packet reordering if the packets are in the same channel (as far as I know).
TOCLIENT_BLOCKDATA, TOCLIENT_ADDNODE and TOCLIENT_REMOVENODE packets all modify the client-side map but TOCLIENT_BLOCKDATA is in a different channel than the other two:
minetest/src/network/serveropcodes.cpp
Lines 161 to 163 in e79587c
If TOCLIENT_BLOCKDATA and TOCLIENT_ADDNODE (or TOCLIENT_REMOVENODE) packets arrive in the wrong order, the client-side map can contain different nodes than the server-side map although the server has sent all map updates (if I understand the code correctly).
Steps to reproduce
This adds 700 ms delay to packets with 500 ms jitter, which often leads to packet reordering.
To undo the traffic control manipulation later, execute
sudo tc qdisc del dev lo root
.nplace
chat command. Without packet reordering, the client-side map and the server-side one are the same. Otherwise, the TOCLIENT_ADDNODE packet fromminetest.set_node
and the TOCLIENT_BLOCKDATA packet from voxel manipuation arrive in the wrong order, so the client map has a wrong node in the corner.Here's a video of the problem:
vm_setnode_packet_reordering.mp4
The text was updated successfully, but these errors were encountered: