News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

Desync issue (devel-new-2) with Linux Server/Windows client

Started by Ves, October 22, 2016, 09:03:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Vladki

Yes I'm running Linux. I think the "normal desync" happens when you tamper with something - typically schedule, or vehicles in depot. But if you just watch the game it should be ok. And most importantly you can reconnect again.

Ves

Normal desync was in contrast to the crashes mentioned earlier. They occurred without doing anything. Yes I run windows.

Felix

On server.exp.simutrans.com:13354 the game runs without the initial disconnect. I also tried to build some stuff, which also works.

I am running the game in Linux (64-bit). The pakset is actually newer than the one on the server (9a8d1a8e61c296a1d65303643f1f268f0ad24e40). I forced the connection via "load" dialog.

jamespetts

Testing again, I do desync within <10 seconds of connecting both on the Bridgewater-Brunel server and on server.exp.simutrans.com:13354. I notice that server.exp.simutrans.com:13354 reports having the routemaster-rescaled object whereas the Bridgewater-Brunel server does not (and nor does my client).
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

jamespetts

#109
Testing with my Linux client and compiling from the latest commit on devel-new-2 for the code and half-heights for the pakset, I desync shortly after connecting both to the Bridgewater-Brunel server and to server.exp.simutrans.com:13354 (although not as quickly as with my Windows machine). I have connected to the default port of server.exp.simutrans.com and have not desynced yet (after circa 2-3 minutes). Edit: Still connected about 20 minutes later.

However, I am not sure that the Bridgewater-Brunel server or server.exp.simutrans.com are running the latest versions.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Felix

On the Bridgewater-Brunel server and with a build of the latest sources, my client crashes right after the connect with a segmentation fault.

jamespetts

Thank you for testing. Are you able to run GDB to find where the fault occurs? I should note that I have been integrating a lot of updates from Standard this evening, so the server will not be up to date with the latest code on Github; desyncs are known to cause crashes in some cases for reasons that remain elusive (the crash occurs in code that is unmodified from Standard).
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Felix

I hope the following is already helpful for you. If you need something else, please, let me know.


Program received signal SIGSEGV, Segmentation fault.
0x000000000040e57e in player_t::get_player_nr (this=0x0) at bauer/../player/simplay.h:302
302             sint8 get_player_nr() const {return player_nr; }
(gdb) bt
#0  0x000000000040e57e in player_t::get_player_nr (this=0x0) at bauer/../player/simplay.h:302
#1  0x000000000076a7ad in tool_add_message_t::init (this=0x14fb3cd0, player=0x0) at simtool.cc:9102
#2  0x00000000005ea5af in nwc_tool_t::do_command (this=0x153dc310, welt=0x35bd830)
    at network/network_cmd_ingame.cc:1339
#3  0x00000000007975c5 in karte_t::do_network_world_command (this=0x35bd830, nwc=0x153dc310) at simworld.cc:9714
#4  0x0000000000796fe3 in karte_t::process_network_commands (this=0x35bd830, ms_difference=0x7fffffffb158)
    at simworld.cc:9659
#5  0x0000000000797c3a in karte_t::interactive (this=0x35bd830, quit_month=2147483647) at simworld.cc:9820
#6  0x000000000072ffaa in simu_main (argc=2, argv=0x7fffffffda68) at simmain.cc:1370
#7  0x0000000000742cd0 in sysmain (argc=2, argv=0x7fffffffda68) at simsys.cc:805
#8  0x00000000007ffb6f in main (argc=2, argv=0x7fffffffda68) at simsys_s2.cc:800

jamespetts

Thank you for that. It is difficult to tell exactly what is going on there and therefore the ultimate cause, but I have just pushed a fix that might help to deal with the immediate cause. Are you able to re-test? I should be grateful.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.


jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Felix

Now, the game is running very slow, when I try to connect and I get "no response from server" when trying to force the connect via load dialog.

jamespetts

That is very odd indeed, and extremely difficult to understand. Is the game running slowly for you even in single player mode? What map are you running?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Felix

Sorry, should have been more clear. The game starts to respond slowly once I click on the "play online" button or try to connect to a server via load dialog. I am currently on the devel-new-2 branch. I got quite a number of patched files, when I pulled. So it might be related to something else that was pushed. Of course, my build configuration might be also less then optimal.

I also cannot see any server in the server browser, even if I select to also display mismatched. I can ping the server.

jamespetts

Taking a long time to respond when actually selecting an individual server in the list is usually caused by that server being slow to respond. Is this what you are experiencing?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Felix

No, the game gets slow and consumes an unusual amount of CPU time once I open the server dialog. Before selecting anything within the dialog window.


But I think it is unlikely to be caused by the change you commited. Trying to bisect the other commits, now.

jamespetts

That is very odd indeed. It performs normally before attempting to connect to the server?

Edit: Even more oddly, I cannot reproduce this in Windows.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Felix

Yes, it performs normal, if not trying to connect to a server.

By the way, are you using IRC or something?



ecb9712b19b66298062464702410c69702119a26 does not have the issue. Still no response from the server.

jamespetts

I am currently in the process of doing some work on the Bridgewater-Brunel server to try to get it up to the latest version, enable automatic version numbering, and make sure that the server is always running the latest nightly build. Because of my poor multi-tasking skills, IRC may not work well at present in any event. However, the as a result of that, the Bridgewater-Brunel server is not currently running.

Edit: Incidentally, are you able to identify the latest version that does not have this problem?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Felix


jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Felix

The issue with the slow speed after opening the network dialog was introduced with commit 959405a1da3cc2b569a508e371ed10b4f9f55720.


Might be a setup issue on my side, but reintroducing "local_hints.ai_socktype = SOCK_STREAM;" in line 237 of network.cc fixes the slowness problem for me.


I can connect to the bridgewater-brunel copy on server.exp.simutrans.com:13354 without crashing, now, but I still get the desync after some seconds.

jamespetts

I have just been looking into this. That was the commit in which I merged in some of Dr. Supergood's network changes; however, they seem to have been merged into an already outdated network code-base. I have now managed to bring it fully up-to-date with the latest code in Standard. Do you think that you could re-test with this new code?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.


jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Felix

This change also fixes the slowness issue. The crash issue seems also to be resolved. Still get the desync, though.

jamespetts

#131
Excellent - thank you for re-testing. That is some progress at least.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Felix

Definitely! Let me know, when you need something tested.

jamespetts

Thank you again.

I have now restarted the Bridgewater-Brunel server with the latest version. Do you think that you could re-test for the desync? Thank you again.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Felix

I seem to have a different revision than the server. If I force the connection via load, I still get the desync :-(

(just trying to get some more debug information)

jamespetts

I think that the different revision is caused by an issue discussed here.

Are you able to run Simutrans-Experimental as a server on your own computer (use the "-server" command line flag), load the same saved game as is on the Bridgewater-Brunel server, and then connect to it with another instance of Simutrans-Experimental running on your own computer using the "net:127.0.0.1" command in the load dialogue to see whether that stays in sync?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Felix


jamespetts

Can you test whether this is still the case with the latest build?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Felix

Do you happen to have a fresh dump of the savegame? Mine might be outdated.

jamespetts

The best thing to get the exact same thing as is running on the server is to connect to the server, wait for it to desync, then save the game.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.