Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network-game Synchronisation Failed when running Vactrain newgrf #5007

Closed
DorpsGek opened this issue Jan 24, 2012 · 15 comments
Closed

Network-game Synchronisation Failed when running Vactrain newgrf #5007

DorpsGek opened this issue Jan 24, 2012 · 15 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

brownan opened the ticket and wrote:

When running OpenTTD with the Vactrain [1] newgrf (and no others) in a multiplayer game, the game runs fine until someone starts up a vactrain. These trains go very fast, 2000+ km/h. After 10-20 seconds, everyone in the game gets ejected with "Network-game synchronisation failed". I'm told this is an OpenTTD bug and not a problem with the newgrf, so I'm reporting it here.

Other information that I've been able to discover: there's no problem while the train is docked in the depot, only when it's running. When running, I can expect to be disconnected within 10-20 seconds. This may be related to the train getting up to speed, which takes about the same amount of time. When a vactrain is running, I can stay connected for long enough to send it to a depot. After it docks, and perhaps with one more disconnection after that, the server runs just fine and the clients stay connected.

The server doesn't print anything relevant on its console.

We've tried with 1.1.5, 1.2.0-beta3, and r23845, same error.

We've seen this problem when running the server on a headless xen VPS (linode) running Gentoo. I was not able to reproduce this locally running the server and the client on my machine. We haven't tried it anywhere else. The server owner and I can provide any other cooperation needed in tracking this down.

As you can imagine, it takes quite a lot of time and money to save up and build a vactrain system, so I'm attaching our savegame with a vactrain line built and a single train docked. Join the company CompuGlobalHyperMegaNet and start up the vactrain to (attempt to) reproduce. On my tests, it gets to the other end of the line and arrives at the station before the client crashes. On some occasions it has made almost a full round-trip before the client crashes. (It seems to vary a bit)

Any ideas? How can we help track this down?

[1] http://binaries.openttd.org/bananas/newgrf/Vacuum_Tube_Train-0.22.tar.gz

Attachments

Reported version: trunk
Operating system: Linux


This issue was imported from FlySpray: https://bugs.openttd.org/task/5007
@DorpsGek
Copy link
Member Author

agrif wrote:

I'm running the server we were able to reproduce this on, and would be happy to try anything to help resolve this bug. I also have two details to add.

First, my client was not disconnected when the vactrains were running, though everybody else's was; as far as I could tell this had nothing to do with what I was doing or what company I was in.

Second, we tested the following versions of dedicated server (in order) and all of them failed: 1.1.5 via Gentoo Portage, 1.2.0-beta3 from source with CFLAGS="-O2 -pipe -march=native", r23845 from source with "-O2 -pipe -march=native", and r23845 with no custom CFLAGS. Everything after the first was configured with "--enable-dedicated --without-liblzo2".


This comment was imported from FlySpray: https://bugs.openttd.org/task/5007#comment10785

@DorpsGek
Copy link
Member Author

michi_cc wrote:

Could you run the server (and maybe also the clients where possible) with "./openttd -d desync=2" (+ any other arguments you usually pass) and report back if you get any unusual console output?


This comment was imported from FlySpray: https://bugs.openttd.org/task/5007#comment10786

@DorpsGek
Copy link
Member Author

agrif wrote:

Nothing interesting, and only two new messages: "'brownan' reported an error and is closing its connection (desync error)" on the server, and "Sync error detected!" on the client.

We also attempted to follow the instructions here: http://wiki.openttd.org/OpenTTDDevBlackBook/Network/Desync_debugging , but the client timed out every time it tried to connect, with "Your computer took too long to join".


This comment was imported from FlySpray: https://bugs.openttd.org/task/5007#comment10788

@DorpsGek
Copy link
Member Author

michi_cc wrote:

So no cache mismatch it seems. That makes debugging it a lot harder :(


This comment was imported from FlySpray: https://bugs.openttd.org/task/5007#comment10789

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Actually, -ddesync doesn't log to the console but to save/autosave/commands-out.log.

So please make a savegame, then run openttd -D -ddesync=3 -g. When people have desynced you should upload the commands-out.log and the initial savegame to here. Please keep the dmp_cmds_*.sav savegames as we might need those at a later stage.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5007#comment10791

@DorpsGek
Copy link
Member Author

brownan wrote:

We can most likely try -ddesync=3 later today (this evening, EST). I see that there is indeed a commands-out.log on the client and server, as well as two dmp_cmds_*.sav files on each, presumably from our runs with -d desync=2 last night. The server also has a random-out.log (which is 12MB).

Would you like me to upload the commands-out.log files from last night?

Also, would you like us to clear out the commands-out.log files before we try -ddesync=3?


This comment was imported from FlySpray: https://bugs.openttd.org/task/5007#comment10792

@DorpsGek
Copy link
Member Author

Rubidium wrote:

commands-out.log gets overwritten when starting OpenTTD again, but yet the previous commands-out.log would be interesting together with the savegame you loaded to start the game.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5007#comment10793

@DorpsGek
Copy link
Member Author

Rubidium wrote:

It would be nice if you would be able to reproduce the desync with the latest nightly. That would prevent us from chasing some possible desyncs that have been fixed recently. Still running it with -ddesync=3.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5007#comment10797

@DorpsGek
Copy link
Member Author

brownan wrote:

Sorry we didn't get around to doing that yesterday. Looks like our schedules didn't sync up. When we get a chance we'll do a -ddesync=3 test with the latest nightly and report back.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5007#comment10798

@DorpsGek
Copy link
Member Author

brownan wrote:

We ran the latest nightly: r23850, with -ddesync=3. I'm attaching the client commands-out.log. agrif should be attaching the server save file and server commands-out.log shortly.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5007#comment10801

@DorpsGek
Copy link
Member Author

agrif wrote:

We've just run the bug with -ddesync=3; here's the log and save file. We're using the r23850 nightly (both server and client) for this.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5007#comment10802

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Could you both upload the dmp_cmds_3b45c1f9_000c2c80.sav file from save/autosave? So one from the client and one from the server.

Can you also tell me what kind of hardware the server uses? Especially the type of CPU, together with the operating system you're using and whether it's a 32 or 64 bits server. Finally I'd like to know whether you compiled OpenTTD yourself, or whether you downloaded it from our site. If it's the latter, which one did you download exactly?


This comment was imported from FlySpray: https://bugs.openttd.org/task/5007#comment10804

@DorpsGek
Copy link
Member Author

agrif wrote:

Here's the server's copy.

I'm running the server on a Xen VM (Linode 512, specifically). The CPU reports itself as 4 cores, "Intel(R) Xeon(R) CPU L5520 @ 2.27GHz", and I'm running 32-bit Gentoo with a linux kernel that reports itself as "2.6.39.1-linode34".

I couldn't find any no-graphics builds on the website, so I've been compiling it myself. This bug was tested on a r23850 nightly source tarball configured with "--enable-dedicated --without-liblzo2".

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5007#comment10805

@DorpsGek
Copy link
Member Author

brownan wrote:

Attached is the client dmp_cmds_3b45c1f9_000c2c80.sav. If it's relevant, I've been downloading the binaries from the site to run the client. This one right here: http://binaries.openttd.org/nightlies/trunk/r23850/openttd-trunk-r23850-linux-generic-amd64.tar.xz

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5007#comment10806

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Fixed

In r23855


This comment was imported from FlySpray: https://bugs.openttd.org/task/5007

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Network labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant