From 0e0cd483582ace024beb9b4f0d733cd63dedd693 Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Sun, 19 Mar 2017 18:12:17 +0000 Subject: [PATCH spice-server] BUG: Attempt to make client crash taking too much memory This patch attempt to make the client crash taking too much memory. The idea is to make the client waiting the rendering causing excessive queue up. This is caused by some problem on the client: - the client do the queue with uncompressed frames so server do not need to send large compressed frames; - the server control the delay to display the frames so can decide the length of the queue. So this patch increase the delay (MM_TIME_DELTA). I manage to reproduce the issue with a Windows 7 machine. Using spicy and vp8 encoding and playing a video with this patch I got the issue. Apparently the audio is fixing the server time. To avoid this you can simply disable the device from the guest. --- server/reds-private.h | 2 +- server/reds.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/reds-private.h b/server/reds-private.h index 07b7b38..0ce48ca 100644 --- a/server/reds-private.h +++ b/server/reds-private.h @@ -28,7 +28,7 @@ #include "red-record-qxl.h" #define MIGRATE_TIMEOUT (MSEC_PER_SEC * 10) -#define MM_TIME_DELTA 400 /*ms*/ +#define MM_TIME_DELTA (1000 * 60 * 5) /*ms*/ typedef struct TicketAuthentication { char password[SPICE_MAX_PASSWORD_LENGTH]; diff --git a/server/reds.c b/server/reds.c index c730daa..ee68dad 100644 --- a/server/reds.c +++ b/server/reds.c @@ -3039,7 +3039,7 @@ static void migrate_timeout(void *opaque) uint32_t reds_get_mm_time(void) { - return spice_get_monotonic_time_ms(); + return spice_get_monotonic_time_ms() + 1000 * 10 * 60; } void reds_enable_mm_time(RedsState *reds) -- 2.9.3