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

Weird hiccoughs when reconnecting. #20

Open
zenhack opened this issue Oct 23, 2016 · 1 comment
Open

Weird hiccoughs when reconnecting. #20

zenhack opened this issue Oct 23, 2016 · 1 comment

Comments

@zenhack
Copy link
Owner

zenhack commented Oct 23, 2016

Sometimes when I reconnect, the IRC Idler will drop the server connection and try to reconnect. This should happen if and only if the server-side of the session was in the middle of a handshake, which should only be the case if another client is connected, which should not be the case. Furthermore, the attempt to reconnect to the server hangs. If at some point another client tries to connect, this also deadlocks the http interface, as it will hang trying to pass the connection to the backend. See also zenhack/go.sandstorm#1

When this happens, I have to restart the grain to get it to start behaving again. The symptoms above are probably not all the same bug. I suspect that the hanging reconnect is related to #8.

Here is the bit of the grain console during this process:

time="2016-10-23T23:09:50Z" level=debug msg="serve(): Top of loop" 
** SANDSTORM SUPERVISOR: Grain has been backgrounded; staying up for now.
time="2016-10-23T23:10:20Z" level=debug msg="serve(): Top of loop" 
time="2016-10-23T23:10:50Z" level=debug msg="serve(): Top of loop" 
time="2016-10-23T23:11:20Z" level=debug msg="serve(): Top of loop" 
** SANDSTORM SUPERVISOR: Grain has been backgrounded; staying up for now.
time="2016-10-23T23:11:50Z" level=debug msg="serve(): Top of loop" 
time="2016-10-23T23:12:20Z" level=debug msg="serve(): Top of loop" 
sandstorm/supervisor.c++:438: error: exception = (remote):0: failed: remote exception: This vat does not expose any public/bootstrap interfaces.
stack: 0x437640 0x5ecec0 0x5ed930 0x444c90 0x459100 0x5ed930 0x5c73c0 0x5c7a20 0x5c7953 0x4a59a2
time="2016-10-23T23:12:34Z" level=debug msg="Sending client connection to daemon." 
time="2016-10-23T23:12:34Z" level=debug msg="serve(): Got client connection" 
time="2016-10-23T23:12:34Z" level=debug msg="dropClient(): dropping client connection." 
time="2016-10-23T23:12:34Z" level=debug msg="dropClient(): handshake incomplete; dropping server connection." 
time="2016-10-23T23:12:34Z" level=debug msg="Connecting to server..." 
time="2016-10-23T23:12:41Z" level=debug msg="Sending client connection to daemon." 
** SANDSTORM SUPERVISOR: Grain still in use; staying up for now.
** SANDSTORM SUPERVISOR: Grain has been backgrounded; staying up for now.
** SANDSTORM SUPERVISOR: Grain has been backgrounded; staying up for now.
** SANDSTORM SUPERVISOR: Grain has been backgrounded; staying up for now.
@zenhack
Copy link
Owner Author

zenhack commented Nov 10, 2016

After some debuging, I've determined that the hang is happening during the TLS handshake; IRC Idler sends some data and the server never responds. I have a hunch this is related to #8.

The messages about dropping the server are misleading; it prints those if the server is not connected at all, which is the case -- it's typically been dropped due to a PING timeout.

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

1 participant