rpms/libgnome-keyring/devel libgnome-keyring-2.30.1-dbus-endless-loop.patch, NONE, 1.1 libgnome-keyring.spec, 1.7, 1.8

Tomas Bzatek tbzatek at fedoraproject.org
Mon Apr 19 12:05:29 UTC 2010


Author: tbzatek

Update of /cvs/extras/rpms/libgnome-keyring/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv3466

Modified Files:
	libgnome-keyring.spec 
Added Files:
	libgnome-keyring-2.30.1-dbus-endless-loop.patch 
Log Message:
* Mon Apr 19 2010 Tomas Bzatek <tbzatek at redhat.com> - 2.30.0-2
- Workaround for problem with endless loop during blocking operations (#573202)


libgnome-keyring-2.30.1-dbus-endless-loop.patch:
 gkr-operation.c |   15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

--- NEW FILE libgnome-keyring-2.30.1-dbus-endless-loop.patch ---
>From 942ff4eae19732d9f5fd0d549385a7f2d9842444 Mon Sep 17 00:00:00 2001
From: Stef Walter <stef at memberwebs.com>
Date: Fri, 09 Apr 2010 18:39:38 +0000
Subject: Workaround for problem with endless loop during blocking operations.

Research done by Hiroyuki Ikezoe

This is due to a bug in libdbus where the pending call is completed
without the relevant callback being called when used in certain
threading situations.

Fixes bug #606902
---
diff --git a/library/gkr-operation.c b/library/gkr-operation.c
index 214ecc7..9f49e73 100644
--- a/library/gkr-operation.c
+++ b/library/gkr-operation.c
@@ -363,13 +363,25 @@ gkr_operation_request (GkrOperation *op, DBusMessage *req)
 GnomeKeyringResult
 gkr_operation_block (GkrOperation *op)
 {
+	DBusPendingCall *pending;
 	g_return_val_if_fail (op, BROKEN);
 
 	gkr_operation_ref (op);
 
 	while ((int) gkr_operation_get_result (op) == INCOMPLETE) {
 		if (op->pending) {
-			dbus_pending_call_block (op->pending);
+			/*
+			 * DBus has strange behavior that can complete a pending call
+			 * in another thread and somehow does this without calling our
+			 * on_pending_call_notify. So guard against this brokenness.
+			 */
+			pending = op->pending;
+			dbus_pending_call_block (pending);
+			if (op->pending == pending) {
+				g_return_val_if_fail (dbus_pending_call_get_completed (pending), BROKEN);
+				on_pending_call_notify (pending, op);
+				g_assert (op->pending != pending);
+			}
 		} else if (op->prompting) {
 			dbus_connection_flush (op->conn);
 			while (op->prompting && (int) gkr_operation_get_result (op) == INCOMPLETE) {
--
cgit v0.8.3.1


Index: libgnome-keyring.spec
===================================================================
RCS file: /cvs/extras/rpms/libgnome-keyring/devel/libgnome-keyring.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- libgnome-keyring.spec	31 Mar 2010 02:00:50 -0000	1.7
+++ libgnome-keyring.spec	19 Apr 2010 12:05:28 -0000	1.8
@@ -6,7 +6,7 @@
 Summary: Framework for managing passwords and other secrets
 Name: libgnome-keyring
 Version: 2.30.0
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2+ and LGPLv2+
 Group: System Environment/Libraries
 #VCS: git:git://git.gnome.org/libgnome-keyring
@@ -21,6 +21,10 @@ BuildRequires: intltool
 Conflicts: gnome-keyring < 2.29.4
 
 
+# from upstream
+Patch0: libgnome-keyring-2.30.1-dbus-endless-loop.patch
+
+
 %description
 gnome-keyring is a program that keep password and other secrets for
 users. The library libgnome-keyring is used by applications to integrate
@@ -43,6 +47,7 @@ header files needed to develop applicati
 
 %prep
 %setup -q -n libgnome-keyring-%{version}
+%patch0 -p1 -b .dbus-endless-loop
 
 
 %build
@@ -85,6 +90,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Mon Apr 19 2010 Tomas Bzatek <tbzatek at redhat.com> - 2.30.0-2
+- Workaround for problem with endless loop during blocking operations (#573202)
+
 * Tue Mar 30 2010 Matthias Clasen <mclasen at redhat.com> - 2.30.0-1
 - Update to 2.30.0
 



More information about the scm-commits mailing list