Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#4235 closed defect (invalid)

[PATCH] Hash mismatch debugging tools

Reported by: elexis Owned by:
Priority: Nice to Have Milestone:
Component: UI & Simulation Keywords:
Cc: Patch:

Description

In the last two years, there were two insidious bugs that caused mismatches without differences in the simulation state when rejoining games.

The first example being #3108, that was caused by a libc++ update r172542 which was present on only some OS X versions.

Second one being the turn 2840 thing of comment:6:ticket:3637, which existed for multiple alphas.

Each time these hash mismatches have the same routine of being debugged. Since the simulation state is identical, one has to dump the data that the hasher receives and compare that between machines.

Hence there should be a either command line option or some #if directive (similar to DEBUG_SERIALIZER_ANNOTATE in StdSerializer.cpp) that is addressed to developers debugging hash mismatches.

Attachments (3)

hash_dump_proof_of_concept.patch (7.4 KB ) - added by elexis 8 years ago.
Proof of concept. WARNING: Do not attempt to execute, as it will spam an insane amount of files, many gigabytes. Only useful to dump a single turn right now.
hash_dump_wip_v1.patch (8.8 KB ) - added by elexis 8 years ago.
Usable, writes one 8mb zip file per turn. Will make that one file in the next version.
hash_dump_wip_v1.1.patch (8.9 KB ) - added by elexis 8 years ago.
Fix few bugs. Don't use one zip for everything since that runs out of memory. Zip manually afterwards.

Download all attachments as: .zip

Change History (6)

by elexis, 8 years ago

Proof of concept. WARNING: Do not attempt to execute, as it will spam an insane amount of files, many gigabytes. Only useful to dump a single turn right now.

by elexis, 8 years ago

Attachment: hash_dump_wip_v1.patch added

Usable, writes one 8mb zip file per turn. Will make that one file in the next version.

by elexis, 8 years ago

Attachment: hash_dump_wip_v1.1.patch added

Fix few bugs. Don't use one zip for everything since that runs out of memory. Zip manually afterwards.

comment:1 by elexis, 8 years ago

Can be closed as won't fix if it's shown that the binary oosdump state is identical with the output of this one. I assumed incorrectly that the textual simstate representation is equivalent to the binary one from the -ooslog option.

comment:2 by Itms, 8 years ago

Resolution: invalid
Status: newclosed

Maybe you don't write the files with the exact same method so the files differ, but the information in the binary dump is indeed the same as in your output.

comment:3 by Stan, 8 years ago

Keywords: patch removed
Milestone: Backlog
Note: See TracTickets for help on using tickets.