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

Fix negotiation in stage 10 error #28

Merged
merged 1 commit into from Jun 16, 2015
Merged

Conversation

vatral
Copy link
Contributor

@vatral vatral commented May 20, 2015

Negotiation would sometimes fail during the connection stage, because writes to non-blocking sockets may fail with EAGAIN.

Problem fixed by adding a select() call to implement a timeout, and retrying writes if needed.

Problem fixed by adding a select() call to implement a timeout,
and retrying writes if needed.
@sunweaver sunweaver added the bug label May 21, 2015
@sunweaver sunweaver added this to the 3.6.0.x milestone May 21, 2015
@sunweaver
Copy link
Member

@vatral: Thanks for submitting this patch. Is there any way to reproduce the "negotiation stage '10'" issue? From [1], I see that on some sort of (Rev)NAT connection the issue is likely to appear. Do you have a test case where an EAGAIN is reproducible? (I presume enforcing a busy network connection while starting a session could be the way to go here, right?)

@sunweaver
Copy link
Member

Forgot to mention [1]:

[1] https://mail.kde.org/pipermail/freenx-knx/2007-March/004834.html

@sunweaver
Copy link
Member

@nitomartinez, @vatral : I asked Nito to provide some info on how to trigger this bug or the context of introducing this fix. Please provide that info, so I can merge this PR.

@vatral
Copy link
Contributor Author

vatral commented Jun 15, 2015

Hello, sorry for the late reply.

The error is unfortunately quite random and sometimes happens constantly and sometimes is hard to reproduce. I found it fairly easy to reproduce with our C client:

https://github.com/theqvd/theqvd/tree/master/libqvdclient

The error happens only during the negotiation stage, so if that goes well, just close the window and try again until it fails. When the bug is triggered it fails with a stage 10 error.

@sunweaver
Copy link
Member

@vatral: thanks for your feedback. I remember having it seen in X2Go a while back. I will merge this PR now.

sunweaver added a commit that referenced this pull request Jun 16, 2015
Fix negotiation in stage 10 error.
@sunweaver sunweaver merged commit d8f3aa4 into ArcticaProject:3.6.x Jun 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants