Tuesday, May 1, 2012

More about Bug 931181



Back in this post, I discussed Launchpad Bug #931181, a SHA1 implementation mistake that broke Debian/Ubuntu Simutrans multiplayer support. So Ubuntu and Debian players could share a game, but cold not connect to any other non-Debian server.

16 Feb 2011, the original patch that broke network play was applied.
12 Feb 2012, I reported the bug.
19 Feb 2012, a Simutrans dev noticed that the issue seemed to be endianness in the SHA1 hash used to communicate paksets between client and server.
21 Mar 2012, Version 111.2.2 of Simutrans is released
29 Apr 2012, the Debian package maintainer created a patch to fix the bug, and applied it to the 111.2.2 upload.

Today, Debian sid and testing (wheezy) and Ubuntu 12.10 have the patched version...but it still doesn't work.

For a clean set of tests, I installed a Debian 7 (testing) VM.

1) Test the Packages: Install the stock Debian Testing packages of simutrans 111.2.2 and simutrans-pak64 111.2 right out of the repos.

# apt-get install simutrans simutrans-pak64
$ simutrans -debug 3 &> s-package.log


Result: Fails to connect to the a.64.simutrans.entropy.me.uk server game. The UI claims the same pakset incompatibility as before. Here's the logfile.

As a check, let's take a look at one SHA1 hash:

PostOffice -> sha1 = 263C0CB8C858272A12FF54FC64F57292AF8ADAB7



2) Test the manual install: Install the upstream Simutrans versions of Simutrans 111.2.2 and Pak64 from the release announcement on the upstream website.

$ mkdir manual
$ cd manual
$ wget http://sourceforge.net/projects/simutrans/files/simutrans/111-2-2/simulinux-111-2-2.zip
$ wget http://sourceforge.net/projects/simutrans/files/pak64/111-2/simupak64-111-2.zip
$ unzip simulinux-111-2-2.zip
$ unzip simupak64-111-2.zip
$ chmod -R +Xr simutrans/pak       # This fixes the pakset's permissions
$ simutrans/simutrans -debug 3 &> ~/s-manual.log

Result: Succesful connection to the a.64.simutrans.entropy.me.uk server game. Here's the logfile.

Let's compare SHA1 hashes to see if the original issue (Launchpad Bug #931181, SHA1 endinaness ) has been fixed, or if this is a separate issue...

PostOffice -> sha1 = 263C0CB8C858272A12FF54FC64F57292AF8ADAB7

The hashes are the same. The original SHA1 issue has been fixed. There is a different bug or misconfiguration.

3) Is the Pakset good? Let's eliminate a possibility -- the packaged Pak64. Use the manually-installed Simutrans from #2 with the packaged Pak64 from #1.

$ simutrans/simutrans -debug 3 -object /usr/share/games/simutrans/pak &> ~/s-crossover.log

Result: Succesful connection to the a.64.simutrans.entropy.me.uk server game. Here's the logfile. The packaged pakset is not the problem. It's the correct version, and compiled properly. The problem is in Simutrans itself somewhere....

No comments: