[Spice-devel] [PATCH] spicec-x11: Fix going into a never ending loop upon xrandr event (#628573)
Hans de Goede
hdegoede at redhat.com
Thu Sep 2 01:18:30 PDT 2010
Hi,
On 09/02/2010 09:51 AM, Alexander Larsson wrote:
> On Wed, 2010-09-01 at 20:15 +0200, Hans de Goede wrote:
>> ---
>> client/x11/platform.cpp | 5 +++++
>> 1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/client/x11/platform.cpp b/client/x11/platform.cpp
>> index 8292d44..1f25a7f 100644
>> --- a/client/x11/platform.cpp
>> +++ b/client/x11/platform.cpp
>> @@ -778,6 +778,11 @@ DynamicScreen::DynamicScreen(Display* display, int screen, int& next_mon_id)
>> platform_win = XCreateSimpleWindow(display, RootWindow(display, screen), 0, 0, 1, 1, 0, 0, 0);
>> XSelectInput(display, platform_win, StructureNotifyMask);
>> XRRSelectInput(display, platform_win, RRScreenChangeNotifyMask);
>> +
>> + Monitor::self_monitors_change++;
>> + process_monitor_configure_events(platform_win);
>> + Monitor::self_monitors_change--;
>> +
>> XPlatform::set_win_proc(platform_win, root_win_proc);
>> intern_clipboard_atoms();
>> X_DEBUG_SYNC(display);
>
> Does this really work? I guess the events come from the XRRSelectInput
> call, but there is no guarantee that this has even been sent to the
> xserver (XFlush), even less so gotten the reply into the client event
> queue. Shouldn't we have some XSync thing here?
>
Also this is really easy to test yourself, run spice-0.6.0 in windowed
mode on a recent Xorg (I use F-14, has been reported to happen with
RHEL-6 too), and change your desktop resolution using "xrandr -s XxY"
Note spicec and xorg going into very high cpu load, kill -9 spicec before
your X dies.
Apply above patch, redo, problem gone :)
Regards,
Hans
More information about the Spice-devel
mailing list