After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 703326 - vino message processing code fails to take account of cached pending data in gnutls buffers
vino message processing code fails to take account of cached pending data in ...
Status: RESOLVED FIXED
Product: vino
Classification: Applications
Component: Server
git master
Other All
: Normal normal
: ---
Assigned To: Vino Maintainer(s)
Vino Maintainer(s)
: 703026 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-06-29 19:43 UTC by Jonh Wendell
Modified: 2013-09-16 20:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (2.20 KB, patch)
2013-06-29 19:47 UTC, Jonh Wendell
none Details | Review
Use gnutls_record_check_pending call (3.35 KB, patch)
2013-09-16 15:53 UTC, Daniel P. Berrange
committed Details | Review

Description Jonh Wendell 2013-06-29 19:43:05 UTC
I don't know why, but it seems the first framebuffer update request is lost, and is only sent when we process another event.

for example: connect to a gnome server (vino) and do not send any event (mouse or keyboard). the screen remains black until you generate some event. if you are connecting in view-only mode, the screen remains black forever, because we are not generating any event, and the server didn't send any event either.

tested with vinagre and gvnc.
Comment 1 Jonh Wendell 2013-06-29 19:47:33 UTC
Created attachment 248062 [details] [review]
proposed patch

I've tried to debug the real cause of this issue, without success.

This patch however seems to fix it.
Comment 2 Jonh Wendell 2013-07-01 12:30:36 UTC
*** Bug 703026 has been marked as a duplicate of this bug. ***
Comment 3 Daniel P. Berrange 2013-09-16 15:51:42 UTC
There is no flaw in GTK-VNC. Using a combination of strace + gtk-vnc's debug capabilities shows the first frame buffer update request being sent at the right time. It also shows that the vino server receives the data.

The actual problem is that vino is not correctly processing incoming data when TLS is enabled. It doesn't take account of the fact that gnutls is free to read more bytes than asked, and will cache the unused bytes. This breaks the logic in vino's vino_server_client_data_pending method, which process 1 single RFB message then checks for POLLIN condition again. This condition is not true, but there is still pending data in the gnutls buffers.
Comment 4 Daniel P. Berrange 2013-09-16 15:53:21 UTC
Created attachment 255038 [details] [review]
Use gnutls_record_check_pending call
Comment 5 David King 2013-09-16 20:30:58 UTC
Comment on attachment 255038 [details] [review]
Use gnutls_record_check_pending call

Thanks for the fix, Daniel! I pushed your patch to master as commit 3b38cf49321924ff2ec657a6e4db8a1932245ef9.