Server disappears from lobby over time

Reported by Trueblade on 2011-06-18
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Gang Garrison 2
Undecided
Unassigned

Bug Description

When I host, my server only appears in the lobby for a certain amount of time before it disappears. I'm unsure if one is able to join manually when this happens, as I haven't tested. People who joined before it happened can still play normally, they just can't rejoin if they exit. My computer is connected directly to a modem and everything seemed to work fine before 2.3 so I'm not sure if it's a problem on my end or a problem with the game. It's an issue with a select few so I figured I might as well report it if there's a chance of it being a bug in the game.

I've tested custom maps and the default rotation, used the default port and I have tried closing all other programs and nothing has worked so far.

MedO (smaxein) wrote :

I started a server to try reproducing the problem. If it happens to you again, please test if other people can still connect manually. This question is quite important for locating the problem.

CrazNoDale (justinpark58) wrote :

I made attempts on fixing this bug, but I didn't do anything but only narrow it down. It's not a computer/router/internet/map problem.

For other people this problem started to occur after 2.3 got released. My server started disappearing from the lobby right after I got my internet back which was a while after 2.3 got released.

Also when the server disappeared from the lobby I tried to make other people manually get in by entering my I.P. address, but they were unable to.

And I will do as you requested open another client and then try to manually join.

CrazNoDale (justinpark58) wrote :

Okay I did what you asked me to do.

I multicliented with the same pc, and heres what I got. When the server was still in the lobby, but didn't react to anything when clicked, it did the same when I tried to join manually no reaction, nothing happens at all as if I didn't do anything.

When the server was gone from the lobby, it says you have been disconnected.

So you can't join manually even on the same pc.

By the way what did you want me to do with currports again?

MedO (smaxein) wrote :

currPorts can show you which ports are currently open and in which state they are. Keep in mind that the list doesn't refresh automatically unless you set it to. The interesting port is the one you are hosting on, probably 0.0.0.0:8190. Start up currPorts once gg2 becomes unreachable again and make a copy or screenshot of the line with that port. Another thing to try, if you have IPv6 installed (on Vista and above you always have), try connecting to the address ::1 instead (still port 8190) when you can't join anymore.

MedO (smaxein) wrote :

PM from CrazNoDale:
"I didn't do 2.2 because I just couldn't find the download link, but I used the one that you used in that April Fools one which was definitly before 2.3 so yeah.

I was hosting for like 3 hours, but I was still able to get back in through the lobby. While with 2.3 it would have tooken like an hour or so then bam, gone from the lobby.

Also I would try out what you told me to do, but I have no idea what that means."

MedO (smaxein) wrote :

I hope the currports part is clear at least. What I am asking you to do with the IPv6 part is this:
Make a server and wait until it disappears from the lobby and doesn't react to a normal manual connection attempt any more. Then start a second client on the same PC, click "Join (manual)" and enter ::1 as the IP address instead of the default (127.0.0.1).

CrazNoDale (justinpark58) wrote :

Alright I will do that as soon as I have time.

Also I was hosting with an earlier version of gg2, it was a version somewhere around 2.1, but couldn't find the exact version. I was hosting this version for like 3 straight hours and the server never disappeared from the lobby. While with the current 2.3 update the server will disappear no more than an hour. So I am guessing this is a problem with 2.3.

CrazNoDale (justinpark58) wrote :

Wow. I haven't tried the Currports thing out yet. But when the server was inaccessible like when the server was in the lobby, but people couldn't connect to it no matter how many times clicked or how many attempts manually joining. But after a couple minutes it says timeout even when the server was still being hosted and after that the server disappeared

So I tried the : :1. But it didn't work.

MedO (smaxein) wrote :

The address is ::1, there is not supposed to be a space between the colons. In case that's just a typo, can you elaborate a bit *how* it didn't work? Did it time out just like a conneciton to 127.0.0.1 or was there some kind of error/did it fail immediately?

CrazNoDale (justinpark58) wrote :

I know, I did every single possible way just to make sure that I didn't have to do this again.

Okay when I tried to connect using that : :1 while manually joining, it was the same as all the other attempts "You have been disconnected from the server"

CrazNoDale (justinpark58) wrote :

Well, I think this bug only happens to people with old computers. Could this be a possibility, maybe people with windows xp or lower only get the bug, should I take a look at this. Or is there no possibility that this can be causing this problem

CrazNoDale (justinpark58) wrote :

file:///C:/Documents%20and%20Settings/Justin%20Park/My%20Documents/Downloads/cports/report.html

CrazNoDale (justinpark58) wrote :

http://i.imgur.com/Zb9AV.png
http://i.imgur.com/B2vUu.png

I left a little bit out between those 2 screenshots, do you need them?
Also why were there so many ports open? D:

Also about the operating system thing, I asked 2 other people that had this same hosting bug. We all have Windows XP. Should I ask other successful hoster's such as Ultros and Boner what operating system they use? Or do you think this is a coincidence?

MedO (smaxein) wrote :

Ah, we are getting closer :)
For some reason, the connections are not closed properly. No idea why yet, but it's an interesting lead.

CrazNoDale (justinpark58) wrote :

:) Anything else that I should test out to get even closer?

CrazNoDale (justinpark58) wrote :

Okay so far 4 people I got with Windows xp have this same hosting bug.

MedO (smaxein) wrote :

Will try to reproduce this on WinXP myself, this would make debugging a lot easier.

MedO (smaxein) wrote :

One question, why is the version number on the exe 2.3.6.0 instead of 2.3.7.0? Are you using the older version or perhaps some mod?

MedO (smaxein) wrote :

Ok, I reproduced the problem on WinXP. There were tons of CLOSE_WAIT connections according to CurrPorts, but only 6 open handles in Faucet Networking. It looks like the sockets might not get closed properly by the networking extension :/

CrazNoDale (justinpark58) wrote :

Oh yeah, I was hosting on vanilla. I was to lazy to update to 2.3.7 because it was still compatible. Should I do it all over again with 2.3.7 :(

Also the problem is by Windows XP right?
And I got more reports from other Windows 7 users, 5/5 people that use windows 7 can successfully host a server. 4/4 people with Windows XP have this same hosting issue

MedO (smaxein) wrote :

Aha! It's a Faucet Networking bug, and it seems to happen when the networking connection is lost for a short time. That causes the TcpAcceptor to error out and stop accepting new connections.

I had assumed when writing the code that the TcpAcceptor would only receive errors if there was a critical problem, but apparently it can also get an error if e.g. a connection attempt is interrupted because the link goes down. I'll fix this and run a new test.

CrazNoDale (justinpark58) wrote :

Awesome! So we found out the issue and how to fix it!

High five Medo!

CrazNoDale (justinpark58) wrote :

Why does it only happen to users using XP and not 7?

MedO (smaxein) wrote :

I don't know. Maybe Microsoft changed listening sockets to only report severe errors because nobody is actually interested in connecitons that error out before they are established, but that's just a wild guess.

MedO (smaxein) wrote :

I attached a test version which includes a new Faucet Networking build as well as a fix for a stupid bug which caused handles to be leaked all the time (probably not related to any reported problem, but I stumbled over it while searching). Please try it out and see if this fixes the problem.

CrazNoDale (justinpark58) wrote :

Can people using 2.3.7 get into this server or do I have to open up another gg2?

MedO (smaxein) wrote :

Yes, it should be completely compatible. You could have found that out withing a few seconds by just testing it...

CrazNoDale (justinpark58) wrote :

:0 Oh yeah, never thought about that.

MedO (smaxein) wrote :

Just as a heads-up, this will probably not be "officially" fixed in the 2.3 line of releases because we'll release 2.4 very soon anyway. Please test the version I posted here regardless so that I know whether your problem is actually gone now.

Changed in gg2:
status: New → Fix Committed
CrazNoDale (justinpark58) wrote :

So far its a thumbs up, hosted it for 2 hours and still running really smoothly. But I'm going to have to shut down my computer soon, but tomorrow since I will have more time I will host the test for approximately for 6 hours to make sure.

CrazNoDale (justinpark58) wrote :

Yup! Its absolutely excellent! Hosted for 6 hours without a problem.

So case closed, I guess!

Okay Medo, you have to give me a high five now.
*offers Medo a high five*

MedO (smaxein) wrote :

*high five* :D
So, fixed in Faucet Networking 1.2.1 and 1.2.1-gg2-1. Will be fixed in GG2 2.4.

Changed in gg2:
milestone: none → 2.4
MedO (smaxein) on 2011-10-23
Changed in gg2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers