summaryrefslogtreecommitdiffstats
path: root/server/spice.h
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2010-10-11 17:16:39 +0200
committerHans de Goede <hdegoede@redhat.com>2010-10-11 22:36:42 +0200
commitf8c6e1c42a16d6b00f058389ee79baef7c0ff5d4 (patch)
treec82997cbc93ad66dd0f37c7e8962360279fe407b /server/spice.h
parent57cea3235fd2c6a0b88ea67b4fbb350058ebe724 (diff)
downloadspice-f8c6e1c42a16d6b00f058389ee79baef7c0ff5d4.tar.gz
spice-f8c6e1c42a16d6b00f058389ee79baef7c0ff5d4.tar.xz
spice-f8c6e1c42a16d6b00f058389ee79baef7c0ff5d4.zip
spicec-x11: Put locks around xlib calls which wait for a reply
Since libX11-1.3.4 the multi-threading handling code of libX11 has been changed, see: http://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=933aee1d5c53b0cc7d608011a29188b594c8d70b This causes several issues. One of them is the display inside the client not getting updated when there are no XEvents being generated, this is caused by the following part of the referenced commit message: Caveats: - If one thread is waiting for events and another thread tries to read a reply, both will hang until an event arrives. Previously, if this happened it might work sometimes, but otherwise would trigger either an assertion failure or a permanent hang. We were depending on the otherwise behavior and apparently were lucky. This can be seen by starting F14 in runlevel 3 and then doing startx and not touching the mouse / keyb afterwards. Once you move the mouse (generate an event you see the UI contents being updated but not before. Another thing both I and Alon (iirc) have seen are hangs where 2 threads are stuck in XSync waiting for a reply simultaneously. This might be related to libxcb version, according to the libX11 commit a libxcb newer then 1.6 was needed, and my system had 1.5 at the time I saw this after updating to libxcb 1.7 I can no longer reproduce. This patch tackles both problems (and is needed for the 1st one indepently of the 2nd one possibly being fixed) by adding XLockDisplay calls around all libX11 calls which wait for a reply or an event.
Diffstat (limited to 'server/spice.h')
0 files changed, 0 insertions, 0 deletions