Add upstream patch fixing rhbz#995041

This commit is contained in:
Christophe Fergeau 2013-09-13 17:12:59 +02:00
parent 1081338830
commit 52d5919839
2 changed files with 72 additions and 1 deletions

View File

@ -0,0 +1,66 @@
From 6ced0f698507de02a67cfcd25b7ab07e8c423fad Mon Sep 17 00:00:00 2001
Message-Id: <6ced0f698507de02a67cfcd25b7ab07e8c423fad.1377595745.git.uril@redhat.com>
From: Yonit Halperin <yhalperi@redhat.com>
Date: Mon, 5 Aug 2013 12:10:15 -0400
Subject: [PATCH] red_worker: decrease the timeout when flushing commands and waiting for the client.
150 seconds is way too long period for holding the guest driver and
waiting for a response for the client. This timeout was 15 seconds, but
when off-screen surfaces ware introduced it was arbitrarily multiplied by
10.
Other existing related bugs emphasize why it is important to decrease
the timeout:
(1) 994211 - the qxl driver waits for an async-io reponse for 60 seconds
and after that, it switches to sync-io mode. Not only that the
driver might use invalid data (since it didn't wait for the query to
complete), falling back to sync-io mode introduces other errors.
(2) 994175 - spice server sometimes doesn't recognize that the client
has disconnected.
(3) There might be cache inconsistency between the client and the server,
and then the display channel waits indefinitely for a cache item (e.g., bug
977998)
This patch changes the timeout to 30 seconds. I tested it under wifi +emulating 2.5Mbps network,
together with playing video on the guest and changing resolutions in a loop. The timeout didn't expired
during my tests.
This bug is related to rhbz#964136 (but from rhbz#964136 info it is still not
clear why the client wasn't responsive).
---
server/red_worker.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/server/red_worker.c b/server/red_worker.c
index b45208b..9896696 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -103,7 +103,7 @@
#define CHANNEL_PUSH_TIMEOUT 30000000000ULL //nano
#define CHANNEL_PUSH_SLEEP_DURATION 10000 //micro
-#define DISPLAY_CLIENT_TIMEOUT 15000000000ULL //nano
+#define DISPLAY_CLIENT_TIMEOUT 30000000000ULL //nano
#define DISPLAY_CLIENT_MIGRATE_DATA_TIMEOUT 10000000000ULL //nano, 10 sec
#define DISPLAY_CLIENT_RETRY_INTERVAL 10000 //micro
@@ -9716,7 +9716,7 @@ static inline void flush_display_commands(RedWorker *worker)
if (ring_is_empty) {
break;
}
- end_time = red_now() + DISPLAY_CLIENT_TIMEOUT * 10;
+ end_time = red_now() + DISPLAY_CLIENT_TIMEOUT;
int sleep_count = 0;
for (;;) {
red_channel_push(&worker->display_channel->common.base);
@@ -9760,7 +9760,7 @@ static inline void flush_cursor_commands(RedWorker *worker)
if (ring_is_empty) {
break;
}
- end_time = red_now() + DISPLAY_CLIENT_TIMEOUT * 10;
+ end_time = red_now() + DISPLAY_CLIENT_TIMEOUT;
int sleep_count = 0;
for (;;) {
red_channel_push(&worker->cursor_channel->common.base);
--
1.7.1

View File

@ -1,6 +1,6 @@
Name: spice
Version: 0.12.4
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Implements the SPICE protocol
Group: User Interface/Desktops
License: LGPLv2+
@ -14,6 +14,7 @@ Patch5: 0005-reds-s-red_client_disconnect-red_channel_client_shut.patch
Patch6: 0006-snd_worker-fix-memory-leak-of-PlaybackChannel.patch
Patch7: 0007-snd_worker-snd_disconnect_channel-don-t-call-snd_cha.patch
Patch8: 0008-log-improve-debug-information-related-to-client-disc.patch
Patch9: 0009-red_worker-decrease-the-timeout-when-flushing-comman.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=613529
%if 0%{?rhel}
@ -76,6 +77,7 @@ using spice-server, you will need to install spice-server-devel.
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%build
@ -106,6 +108,9 @@ mkdir -p %{buildroot}%{_libexecdir}
%changelog
* Fri Sep 13 2013 Christophe Fergeau <cfergeau@redhat.com> 0.12.4-2
- Add upstream patch fixing rhbz#995041
* Fri Aug 2 2013 Hans de Goede <hdegoede@redhat.com> - 0.12.4-1
- New upstream bug-fix release 0.12.4
- Add patches from upstream git to fix sound-channel-free crash (rhbz#986407)