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

connection lost without notice #35

Open
nsklaus opened this issue Jul 27, 2020 · 22 comments
Open

connection lost without notice #35

nsklaus opened this issue Jul 27, 2020 · 22 comments

Comments

@nsklaus
Copy link

nsklaus commented Jul 27, 2020

i was playing on igs, and suddenly my opponent was taking a long time to respond and do his move.
on the server window (where there is the igs console, user list and player list) i tried to refresh game and user list, but nothing would show up. these areas went all white with nothing in it. igs console didn't reply to my input properly, like: typing "help commands" didn't gave me the list of commands.

so now i have no idea how to resume my previous game, if it is possible at all.
if there is a long server lag or connection lost, maybe q5go could tell us about it ?

@bernds
Copy link
Owner

bernds commented Jul 27, 2020

It already reports connection closed, but it may not detect it if there's a problem on your end. I've never seen the behaviour you describe, but my connection is stable.
In theory you should be able to resume a game if your opponent is online; I think "load" is the command. But the last time I did that was more than a decade ago, when the program was still qGo, not q5go.

@nsklaus
Copy link
Author

nsklaus commented Jul 27, 2020

so how do you propose to confirm the connection problem i've just reported to you ?
i mean, for the next time it might happen.
is there anything i could gather for you ? a debug or a connection log somewhere ?
anything at all you could recommend to diagnose and, in the end, confirm or infirm the things i've said ?

@bernds
Copy link
Owner

bernds commented Jul 27, 2020

Perhaps I can have the program send ayt messages to the server while in a match. That should hopefully detect a connection failure.

@nsklaus
Copy link
Author

nsklaus commented Jul 27, 2020

what you're saying in your last post is an idea that might be worth trying, but,
i think a proper method to confirm what a person report to you would be a must to have.
otherwise it's a bit like shooting in the dark.
maybe an optional -debug argument for q5go, that would store all events in a log file.
so the person reporting to you could send that file and you would be able to tell more precisely what was going on.

sending ayt is an idea, but you could also wrap that in a timer method, to check how long did the response from igs took.

i think it shouldn't matter if problem is on q5go, igs server itself, or user connectivity.
for any kind of reason, if connection is lost or not responsive the client (q5go) should tell about it.

@bernds
Copy link
Owner

bernds commented Jul 27, 2020

That's a good goal, but sometimes you're just at the mercy of your environment - ideally the OS needs to discover that the connection is lost and report it to the application.
There already is a debug file switch: -D . Use -h to list all available arguments. These log files do grow rather large unfortunately.
It would also help to know if you use the release or the most current sources.

@nsklaus
Copy link
Author

nsklaus commented Jul 27, 2020

i think i know a good way to test this. i will create a debug file, launch a game online, and simulate degradation of connection. we'll see in the log what will happen then, as far as how q5go sees these kind of things. the bad side is that my opponent will be like a guinea pig, and i will look like an escaper, i might loose the game too. but i'll have the logs.

@bernds
Copy link
Owner

bernds commented Jul 27, 2020

We could have a test game some time this week. I've wanted to test resuming a game for a while, and I can't do it purely locally because the NNGS server I have for testing is a little too broken for this.

@nsklaus
Copy link
Author

nsklaus commented Jul 27, 2020

sure, that would be a better solution most probably. rather than testing with normal players. they might find it unfair treatement to them. i'd gladly help if i can. just let me know when it might be a good time for you.

@bernds
Copy link
Owner

bernds commented Jul 28, 2020

I'm venkman on IGS. Let me know your username. I'll try to be on-line in the evenings, but I might not be at the computer the whole time.

@nsklaus
Copy link
Author

nsklaus commented Jul 28, 2020

my nick on igs is the same as here on github, nsklaus.

@nsklaus
Copy link
Author

nsklaus commented Jul 29, 2020

i confirm i just had a problem with loosing connection again.
and these cases are not being handled by q5go well.
the connection become suddenly unresponsive, because wifi signal problem or something like that,
and q5go's connection to igs just sit dead without telling the user. after a while i think something is wrong, i try to reload players or games list, and i get blank list. i tried to save my game on my local drive. i reconnected igs, and tried to load the game, giving full path.
load /home/klaus/Documents/2020-07-30-nsklaus-ya0466.sgf
but that didn't work. i see no way to even resign this game, so i am considered escaper most probably.
how can i resume a game that couldn't be finished on igs ?
aren't the game saved on the server until they are being properly terminated ?

resign 2020-07-30-nsklaus-ya0466
That game does not exist.

resign nsklaus-ya0466
That game does not exist.

i think the time while the connection was stalled with me without noticing was being counted on igs.
after 5 minutes game is forfeit says igs docs:
http://pandanet-igs.com/communities/pandanet/11
( looking at: "What happens if any of the players disconnects?" ).
but since q5go was being stalled without telling me there was no way for me to know.
could it be possible that after q5go test 3 to 5 ayt without response, q5go kills the connection and asks the user to reconnect ? ( or better automatically reconnect itself? also eventualy automatically reload the game that was in progress at the time the connection was stalled ?)
it would be nice to test this situation together like you offered a few posts above.. there must be various ways to handle a bit more these cases. we could provoke such situations of loss of connectivity, to start thinking about it quietly, trying to figure possible solutions for the future would be nice.

@bernds
Copy link
Owner

bernds commented Jul 30, 2020

You should use the "stored" command to see if any games were saved and under what name. You can't use local paths. Let's see if we can test this one of the next few days.

Were you using development sources in all cases, or did you use the last release? There was a small change in how q5go communicates with the server, and while it's working fine here, I wonder if that could be causing your issues. It would be good to rule this out if possible.

@nsklaus
Copy link
Author

nsklaus commented Jul 30, 2020

i'm currently using the sources from your repo i've cloned it and pulled it last a few hours ago.
about igs i just know a small subset of its commands. i mostly used igs with panda client before, beside my little attempt with python were i've learned a few things but that's it. i'll check that "stored" command tomorrow. i'll probably be around starting at 14-15h (france time).

@bernds
Copy link
Owner

bernds commented Jul 30, 2020

Did IGS go down for you? It booted me out, and when I try to reconnect I just get "sorry".

@nsklaus
Copy link
Author

nsklaus commented Jul 30, 2020

yes, same here. i cannot connect back.
can you come on irc ? freenode for example.
i'm 'klaus' there, i opened a channel /join #q5go

@bernds
Copy link
Owner

bernds commented Jul 30, 2020

Oh well. To summarize here what we saw: once the connection was lost on your end, the game adjourned on my end, as expected. It showed up as stored at that point.
Just as you reconnected, the following appeared in my log:

"68 1 32652.00 49 115 32652.00 49 115"
"24 SYSTEM: Disconnected game with nsklaus was removed."
OnReadyRead....
"21 {nsklaus [8k ] has connected.}"

Not sure whether it was a timeout, but it would be a big coincidence if it just happened at the same time. So maybe IGS just doesn't really allow resuming games at the moment? I'm not sure what's going on.

The focus on the chat window is something I noticed today, too. That's somewhat annoying.

@bernds
Copy link
Owner

bernds commented Jul 30, 2020

Let's wait and see if IGS comes back. If it doesn't, the conversation is a bit moot :-(

@nsklaus
Copy link
Author

nsklaus commented Jul 30, 2020

igs can't just die. worst case we were kicked for strange behavior, testing connectivity, disconnecting, not resuming game or things like that. i think they're just have a little bit of down time for maintenance or something.
irc can be better for talking than github issue section, or q5go chat window which needs little work here and there, or even plain igs.

let's hope it's not "日本が没む日" ("The day Japan disappeared", it's a joke on a recurrent theme in japanese culture that someday japan will sink into the sea and disappear)

well, it will be a good test case for resuming game after loosing connectivity :)
for irc, if you don't want to install a client (hexchat, konversation, irssi), you can use this web based client, it works without installing anything: https://webchat.freenode.net/
you choose a nick, no password, and for channel you put "#q5go" (without the quotes)

hmm..

$ nc -zv igs.joyjoy.net 7777
igs.joyjoy.net [210.155.158.200] 7777 (cbt) open

ok i tried with gopanda, and i saw: "sorry your account is currently banned"
i will try to write them a message. if you do the same, please mention me, tell them we were both just working on q5go development, and we didn't do anything wrong ..

(message sent, msg id is: 2007310009-6352)
maybe q5go did something wrong with igs protocol and they didn't like it ? or they just thought it was suspicious activity ? that's the only reason i could think of.

@nsklaus
Copy link
Author

nsklaus commented Jul 30, 2020

ban lifted

@bernds
Copy link
Owner

bernds commented Jul 31, 2020

Same here. That's a relief at least.
I think in summary it seems that

  • a poor connection does not necessarily mean disconnect (so at application level it's hard to tell what's going on)
  • a disconnect may just cause a loss as far as IGS is concerned.

So, not much that can be done here, I think. OK to close?

@nsklaus
Copy link
Author

nsklaus commented Jul 31, 2020

for example, my irc client.
when i was disconnected because of poor conectivity (poor wifi signal).
my irc client wasn't able to keep connection to server open. obviously.
but,
when my connection came back, my irc client automaticaly reconnected me to irc server.
in comparison q5go was still stuck. it never noticed the connection was lost. it never told me there was a problem. and it never reconnected me afterward. it was just sitting there, in a crashed like situation.
you can close the issue if you want but i think that compared to many other tools (clients) that connect users to remote services, q5go is not handling the connectivity problems well. as long as everything is fine, then all works ok. but as soon as there is a problem q5go just hold its hands up and freeze.

it could be possible to see there is a network connectivity problem in the code (by exchanging an ayt every minute for example) and if that ayt fails 3 times (so 3 minutes) then q5go could manualy sever the connection and at the very least tell the user there was a network problem and he needs to connect/login again.

tomorrow i will be looking at how gopanda handle these situation.
i know kgs does that kind of things. if network connection goes banana, kgs disconnect you and the client asks you to reconnect. the real problem with q5go is it never give up on the dead connection and never come back online. it keep acting like the connection was up and running despite the fact everything is dead and nothing respond. and as a player, it is possible to believe your opponent is just taking his sweet time to think his next move carefully, so you let him the time he needs, it can go like that a few minutes. until you realize it's been 5 minutes or more that you were disconnected. and nothing told you so. and that, unless you (as a user, a player) do something, it will stays like this forever.

@nsklaus
Copy link
Author

nsklaus commented Jul 31, 2020

i think summary and conclusion were done a bit too fast here.
we barely scratched the issue today.

all in all what i'm saying is:
q5go should detect loss of connection and not let player believe all is fine and wait for opponent move that will never come. somekind of message alert or popup box should tell him: "there was a problem, please reconnect" or something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants