All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Eric Blake <eblake@redhat.com>,
	libvir-list@redhat.com, Markus Armbruster <armbru@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: [Qemu-devel] [PULL 5/7] vnc: fix update stalls
Date: Thu,  7 Mar 2019 16:11:39 +0100	[thread overview]
Message-ID: <20190307151141.6483-6-kraxel@redhat.com> (raw)
In-Reply-To: <20190307151141.6483-1-kraxel@redhat.com>

vnc aborts display update jobs on video mode switches and page flips.
That can cause vnc update stalls in case an unfinished vnc job gets
aborted.  The vnc client will never receive the requested update then.
Fix that by copying the state from job_update back to update in that
case.

Reports complain about stalls with two or more clients being connected
at the same time, on some but not all connections.  I suspect it can
also happen with a single connection, multiple connections only make
this more much likely to happen.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1662260
Reported-by: Ying Fang <fangying1@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Ying Fang <fangying1@huawei.com>
Message-id: 20190305130930.24516-1-kraxel@redhat.com
---
 ui/vnc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ui/vnc.c b/ui/vnc.c
index da4a21d4ce94..2f2ab62fcf71 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -700,6 +700,12 @@ static void vnc_abort_display_jobs(VncDisplay *vd)
     }
     QTAILQ_FOREACH(vs, &vd->clients, next) {
         vnc_lock_output(vs);
+        if (vs->update == VNC_STATE_UPDATE_NONE &&
+            vs->job_update != VNC_STATE_UPDATE_NONE) {
+            /* job aborted before completion */
+            vs->update = vs->job_update;
+            vs->job_update = VNC_STATE_UPDATE_NONE;
+        }
         vs->abort = false;
         vnc_unlock_output(vs);
     }
-- 
2.18.1

  parent reply	other threads:[~2019-03-07 15:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07 15:11 [Qemu-devel] [PULL 0/7] Ui 20190307 patches Gerd Hoffmann
2019-03-07 15:11 ` [Qemu-devel] [PULL 1/7] Reduce curses escdelay from 1s to 25ms Gerd Hoffmann
2019-03-07 15:11 ` [Qemu-devel] [PULL 2/7] curses: support wide input Gerd Hoffmann
2019-03-07 15:11 ` [Qemu-devel] [PULL 3/7] iconv: detect and make curses depend on it Gerd Hoffmann
2019-03-07 15:11 ` [Qemu-devel] [PULL 4/7] curses: add option to specify VGA font encoding Gerd Hoffmann
2019-03-07 15:11 ` Gerd Hoffmann [this message]
2019-03-07 15:11 ` [Qemu-devel] [PULL 6/7] vnc: allow specifying a custom authorization object name Gerd Hoffmann
2019-03-07 15:11 ` [Qemu-devel] [PULL 7/7] monitor: deprecate acl_show, acl_reset, acl_policy, acl_add, acl_remove Gerd Hoffmann
2019-03-08 14:04 ` [Qemu-devel] [PULL 0/7] Ui 20190307 patches Peter Maydell
2019-03-11  8:33   ` Gerd Hoffmann
2019-03-11 13:52     ` Samuel Thibault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190307151141.6483-6-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.