Latest Posts

Topic: Got disconnected from the metaserver after a short while playing r6346

hjd

Topic Opener
Joined: 2011-06-12, 19:24
Posts: 164
Ranking
At home in WL-forums
Location: bugs.launchpad.net/widelands
Posted at: 2012-04-22, 16:45

Yesterday, I tried to play a multiplayer game with another player across the Internet. Both had version r6346, and I hosted.

We picked a map and clicked "start game". When the map had finished loading, we both got a message from metaserver saying we were disconnected from the metaserver. Not thinking much about it because the game was already up and running, we ignored it.

Then after playing for a while, the game froze and the terminal kept printing it had disconnected and attempted to reconnect.

This also happened after a short while (less than 5 minutes) when we started a second game.

I am not sure what the metaserver checks, but I've checked from an external machine and I'm pingable. Also, I'm obviously able to host, since the other person managed to connect in the first place. So I would like to check whether others have this problem (mostly to rule out my setup).

Note that based on the backtrace when this problem occured, the reconnect code seem to have entered an infinite loop or something:

# 242 0x0000000000b6a754 in InternetGaming::handle_metaserver_communication (this=0x162f3b0)

at /home/user/widelands/src/network/internet_gaming.cc:254

# 243 0x0000000000b6a28a in InternetGaming::relogin (this=0x162f3b0)

at /home/user/widelands/src/network/internet_gaming.cc:188

# 244 0x0000000000b6a754 in InternetGaming::handle_metaserver_communication (this=0x162f3b0)

at /home/user/widelands/src/network/internet_gaming.cc:254

# 245 0x0000000000b6a28a in InternetGaming::relogin (this=0x162f3b0)

at /home/user/widelands/src/network/internet_gaming.cc:188

ad infinitum

edit:escape the number signs...

Edited: 2012-04-22, 16:50

Ships!

Top Quote
Nasenbaer
Avatar
Joined: 2009-02-21, 17:17
Posts: 828
Ranking
One Elder of Players
Location: Germany
Posted at: 2012-04-23, 07:19

hjd wrote:

Note that based on the backtrace when this problem occured, the reconnect code seem to have entered an infinite loop or something:

  • 242 0x0000000000b6a754 in InternetGaming::handle_metaserver_communication (this=0x162f3b0) at /home/user/widelands/src/network/internet_gaming.cc:254
  • 243 0x0000000000b6a28a in InternetGaming::relogin (this=0x162f3b0) at /home/user/widelands/src/network/internet_gaming.cc:188
  • 244 0x0000000000b6a754 in InternetGaming::handle_metaserver_communication (this=0x162f3b0) at /home/user/widelands/src/network/internet_gaming.cc:254
  • 245 0x0000000000b6a28a in InternetGaming::relogin (this=0x162f3b0)at /home/user/widelands/src/network/internet_gaming.cc:188

Oh my, that should never happen. Is there a way to secure reproduce this behaviour? I'll try to find out what might have happend on code side.

Edited: 2012-04-23, 07:21

Top Quote
Nasenbaer
Avatar
Joined: 2009-02-21, 17:17
Posts: 828
Ranking
One Elder of Players
Location: Germany
Posted at: 2012-04-23, 07:47

There is a way this can be triggered from code side (and it seems this was the case for you):

1) If Widelands encounters that the socket it is connected to is somehow broken, it closes down the connection and tries to reconnect. 2) If further the reopening of a socket works and the message to relogin can be send, it will try to read on the new socket. (go to 1))

So technically I see two possibilities how this can happen:

  • either something in the establishment of the socket connection on side of your computer wents wrong, but your system still seems to think the socket is valid.
  • or the metaserver does something strange in case of a relogin. Maybe a firewall closing down the connection after a relogin try as it thinks it's some kind of a DDOS attack?????

I somehow hope it's the later as that could hopefully be fixed and does not needa build17 rc3.

Anyway in the longterm there should be a check implemented that completely closes the connection to the metaserver if the socket breaks down twice and maybe should even set a timer for a second try to relogin after 1 minute or the like.


Top Quote
Nasenbaer
Avatar
Joined: 2009-02-21, 17:17
Posts: 828
Ranking
One Elder of Players
Location: Germany
Posted at: 2012-04-26, 15:38

The client side is fixed in current bzr. However this bug might reoccur with Build17 versions - depending on how often this is the case, we should think about a good resolution on metaserver side...


Top Quote