Hello community,

here is the log from the commit of package xorg-x11-libX11 for openSUSE:Factory
checked in at Fri Mar 18 09:17:37 CET 2011.



--------
--- xorg-x11-libX11/xorg-x11-libX11.changes     2010-12-21 04:19:26.000000000 
+0100
+++ /mounts/work_src_done/STABLE/xorg-x11-libX11/xorg-x11-libX11.changes        
2011-03-17 18:33:48.000000000 +0100
@@ -1,0 +2,19 @@
+Thu Mar 17 17:29:54 UTC 2011 - [email protected]
+
+- Ignore-user-locks-after-sleeping-in-_XReply-and-_XRe.patch
+  * Ignore user locks after sleeping in _XReply and _XReadEvents
+    (bnc #679177) 
+
+-------------------------------------------------------------------
+Tue Jan 18 16:32:18 UTC 2011 - [email protected]
+
+- reverted previous change due to creation of a pretty huge build
+  cycle according to coolo
+
+-------------------------------------------------------------------
+Mon Jan 17 14:22:28 UTC 2011 - [email protected]
+
+- added xmlto to BuildRequires to generate HTML documentation from
+  XML sources
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


New:
----
  Ignore-user-locks-after-sleeping-in-_XReply-and-_XRe.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xorg-x11-libX11.spec ++++++
--- /var/tmp/diff_new_pack.AqXVTW/_old  2011-03-18 09:15:43.000000000 +0100
+++ /var/tmp/diff_new_pack.AqXVTW/_new  2011-03-18 09:15:43.000000000 +0100
@@ -1,7 +1,7 @@
 #
-# spec file for package xorg-x11-libX11 (Version 7.6)
+# spec file for package xorg-x11-libX11
 #
-# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -28,7 +28,7 @@
 PreReq:         coreutils
 Url:            http://xorg.freedesktop.org/
 Version:        7.6
-Release:        1
+Release:        13
 License:        MIT License (or similar)
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Group:          System/Libraries
@@ -52,6 +52,7 @@
 Patch17:        Xcms.diff
 Patch18:        compose-zh_CN.UTF-8.diff
 Patch19:        scim_swallow.diff
+Patch20:        Ignore-user-locks-after-sleeping-in-_XReply-and-_XRe.patch
 
 %description
 This package contains the X.Org X11 library.
@@ -130,6 +131,7 @@
 %patch17 -p0
 %patch18 -p0
 %patch19 -p1
+%patch20 -p1
 
 %build
 autoreconf -fi

++++++ Ignore-user-locks-after-sleeping-in-_XReply-and-_XRe.patch ++++++
>From fd85aca7a616c595fc17b2520f84316a11e8906f Mon Sep 17 00:00:00 2001
From: Jamey Sharp <[email protected]>
Date: Mon, 14 Mar 2011 14:45:35 -0700
Subject: [PATCH] Ignore user locks after sleeping in _XReply and _XReadEvents.

This bug appears as a hang in applications that wait for replies from
multiple threads, where one such thread has taken a user lock using
XLockDisplay.

Prior to this fix, the code could deadlock in this way: If thread 1 goes
to sleep waiting for a reply, and then thread 2 takes a user lock and
waits for a reply, then thread 2 will wait for thread 1 to process its
reply (because responses must be processed in order), but thread 1 will
wait for thread 2 to drop its user lock.

Fixed by making thread 1 not wait for thread 2 to drop its user lock.
This makes the semantics of user locks hard to define, but they were
already hard to define. The new behavior appears to be consistent with
the way Xlib worked historically, anyway.

Fixes: http://lists.freedesktop.org/archives/xcb/2011-March/006802.html

There was a similar potential for deadlock in _XReadEvents, fixed the
same way, with the same caveats about user-lock semantics.

Signed-off-by: Jamey Sharp <[email protected]>
---
 src/xcb_io.c |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/xcb_io.c b/src/xcb_io.c
index 7e685de..8930736 100644
--- a/src/xcb_io.c
+++ b/src/xcb_io.c
@@ -340,7 +340,15 @@ void _XReadEvents(Display *dpy)
                        dpy->xcb->event_waiter = 1;
                        UnlockDisplay(dpy);
                        event = xcb_wait_for_event(dpy->xcb->connection);
-                       InternalLockDisplay(dpy, /* don't skip user locks */ 0);
+                       /* It appears that classic Xlib respected user
+                        * locks when waking up after waiting for
+                        * events. However, if this thread did not have
+                        * any user locks, and another thread takes a
+                        * user lock and tries to read events, then we'd
+                        * deadlock. So we'll choose to let the thread
+                        * that got in first consume events, despite the
+                        * later thread's user locks. */
+                       InternalLockDisplay(dpy, /* ignore user locks */ 1);
                        dpy->xcb->event_waiter = 0;
                        ConditionBroadcast(dpy, dpy->xcb->event_notify);
                        if(!event)
@@ -531,7 +539,10 @@ Status _XReply(Display *dpy, xReply *rep, int extra, Bool 
discard)
                req->reply_waiter = 1;
                UnlockDisplay(dpy);
                response = xcb_wait_for_reply(c, req->sequence, &error);
-               InternalLockDisplay(dpy, /* don't skip user locks */ 0);
+               /* Any user locks on another thread must have been taken
+                * while we slept in xcb_wait_for_reply. Classic Xlib
+                * ignored those user locks in this case, so we do too. */
+               InternalLockDisplay(dpy, /* ignore user locks */ 1);
 
                /* We have the response we're looking for. Now, before
                 * letting anyone else process this sequence number, we
-- 
1.7.4.1


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to