From nobody Sun Nov 9 16:20:26 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1551791467192784.6248347920849; Tue, 5 Mar 2019 05:11:07 -0800 (PST) Received: from localhost ([127.0.0.1]:42955 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h19qU-0007lE-Oi for importer@patchew.org; Tue, 05 Mar 2019 08:10:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h19pB-00073d-Tc for qemu-devel@nongnu.org; Tue, 05 Mar 2019 08:09:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h19pB-0001QQ-3O for qemu-devel@nongnu.org; Tue, 05 Mar 2019 08:09:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50242) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h19pA-0001LK-TU for qemu-devel@nongnu.org; Tue, 05 Mar 2019 08:09:37 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8A9F1307D760; Tue, 5 Mar 2019 13:09:34 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-211.ams2.redhat.com [10.36.116.211]) by smtp.corp.redhat.com (Postfix) with ESMTP id 83382608C3; Tue, 5 Mar 2019 13:09:31 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B342E16E07; Tue, 5 Mar 2019 14:09:30 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 5 Mar 2019 14:09:30 +0100 Message-Id: <20190305130930.24516-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 05 Mar 2019 13:09:34 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] vnc: fix update stalls X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fangying1@huawei.com, Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=3D1662260 Reported-by: Ying Fang Signed-off-by: Gerd Hoffmann Reviewed-by: Ying Fang --- 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 =3D=3D VNC_STATE_UPDATE_NONE && + vs->job_update !=3D VNC_STATE_UPDATE_NONE) { + /* job aborted before completion */ + vs->update =3D vs->job_update; + vs->job_update =3D VNC_STATE_UPDATE_NONE; + } vs->abort =3D false; vnc_unlock_output(vs); } --=20 2.18.1