Autosave after desync cannot be used to resume game

Bug #1800366 reported by Toni Förster
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Undecided
Unassigned

Bug Description

I'm not entirely sure if this is intended behavior or a bug. The savegame the host creates, when a client desyncs and therefore disconnects cannot be used to resume the game. It results in an immediate desync. I'd expect this to be a failsave from where the players should be able to continue.

Part of this bugreport:
https://bugs.launchpad.net/widelands/+bug/1797549/

Revision history for this message
Toni Förster (stonerl) wrote :
GunChleoc (gunchleoc)
Changed in widelands:
milestone: none → build20-rc1
tags: added: desync multiplayer savegame
Revision history for this message
GunChleoc (gunchleoc) wrote :

I noticed that clients can try to join a still running game again after a desync, resulting in a server crash. We don't support late joins yet, so the client shouldn't join at all.

Changed in widelands:
assignee: nobody → GunChleoc (gunchleoc)
status: New → In Progress
Revision history for this message
GunChleoc (gunchleoc) wrote :
Download full text (3.3 KiB)

I can confirm the desync with the attached savegame. Separate bug report for #2: https://bugs.launchpad.net/widelands/+bug/1805325

Server log:

 MapSaver::save() for 'Astoria 2.R' took 1899ms
Game: Writing Map Data took 1900ms
Game: Writing Player Economies Info ... took 0ms
Game: Writing ai persistent data ... took 4ms
Game: Writing Command Queue Data ... took 2533ms
Game: Writing Interactive Player Data ... took 1ms
GameSaver::save() took 4816ms
SaveHandler::save_game() took 4816ms
[Host]: disconnect_player_controller(1, Player 2)
[Host]: disconnect_client(0, CLIENT_DESYNCED, )

Client log:

MO(7012,wheat): cancel_moving
MO(6492,marble): cancel_moving
MO(6514,log): cancel_moving
MO(6943,fish): cancel_moving
MO(4471,empire_builder): [transfer]: starting task [movepath] and setting location to road 8677
MO(3198,barbarians_soldier): [transfer]: starting task [movepath] and setting location to road 8933
MO(3229,empire_soldier): [transfer]: starting task [movepath] and setting location to road 8806
MO(9894,barbarians_battlearena): Checking soldier (3) level 1)
MO(9894,barbarians_battlearena): okay
MO(9894,barbarians_battlearena): Check done!
MO(6630,wheat): cancel_moving
MO(7305,granite): cancel_moving
MO(6667,log): cancel_moving
MO(5485,empire_donkey): [transfer]: starting task [movepath] and setting location to road 8750
MO(3519,atlanteans_stonecutter): [transfer]: starting task [movepath] and setting location to road 8504
MO(7200,log): cancel_moving
MO(7075,meal): cancel_moving
MO(3402,atlanteans_builder): [transfer]: starting task [movepath] and setting location to road 9625
MO(6390,fish): cancel_moving
[NetClient] Error when trying to receive some data: End of file.
[NetClient] Closing network socket connected to fe80::ce81:da84:109d:caa5%wlp12s0:7396.
[Client] Pong!
[Client] received NETCMD_INFO_DESYNC. Trying to salvage some information for debugging.
[Client]: disconnect(CLIENT_DESYNCED, )

Current trunk will segfault - we probably have some savegame compatibility issues here from when we ripped out the anti-congestion algorithm.

Thread 1 "widelands" received signal SIGSEGV, Segmentation fault.
0x000055555702bed6 in Widelands::Flag::fetch_pending_ware (this=0xa56474000004e1, game=..., dest=...)
    at src/economy/flag.cc:519
519 for (int32_t i = 0; i < ware_filled_; ++i) {
(gdb) backtrace
#0 0x000055555702bed6 in Widelands::Flag::fetch_pending_ware (this=0xa56474000004e1, game=..., dest=...)
    at src/economy/flag.cc:519
#1 0x000055555689b6f7 in Widelands::Carrier::pickup_from_flag (this=0x612000740d40, game=..., state=...)
    at src/logic/map_objects/tribes/carrier.cc:256
#2 0x000055555689af71 in Widelands::Carrier::transport_update (this=0x612000740d40, game=..., state=...)
    at src/logic/map_objects/tribes/carrier.cc:169
#3 0x000055555669699e in Widelands::Bob::do_act (this=0x612000740d40, game=...)
    at src/logic/map_objects/bob.cc:193
#4 0x0000555556696706 in Widelands::Bob::act (this=0x612000740d40, game=..., data=5166)
    at src/logic/map_objects/bob.cc:179
#5 0x00005555566d4692 in Widelands::CmdAct::execute (this=0x603001c44580, game=...)
    at src/logic/map_objects/map_object.cc:100
#6 0x0000555556885c...

Read more...

Revision history for this message
kaputtnik (franku) wrote :

Since the map Astoria allows seafaring, this bug is likely fixed with:

https://code.launchpad.net/~widelands-dev/widelands/bug-1811030-desync-ai/+merge/361689

Revision history for this message
Notabilis (notabilis27) wrote :

I compiled r8934 with the mentioned fix for bug 1811030 and could no longer reproduce the desync with the above savegame. So I think this bug is indeed fixed now.

kaputtnik (franku)
Changed in widelands:
status: In Progress → Fix Committed
assignee: GunChleoc (gunchleoc) → nobody
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build20-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.