Bug#695985: gwibber-service: dbus starts multiple instances of gwibber because of poor service configuration
Sorry for taking this long to come back to the patch. Today I proted the changes to 3.5.2 in experimental but I still didn't figure out all build dependecies for 3.6.0. I quickly tested the interface. I also checked that only single service is started even if I remove the racy check from service starter. That means patch should be complete fix for 3.5.2. I will make an untested patch for maste so we can see upstream comments too. Porting seems to be relatively simple operations what I have looked the diff. On Fri, Dec 21, 2012 at 6:32 PM, Pauli Nieminen suok...@gmail.com wrote: On Mon, Dec 17, 2012 at 11:58 AM, Kartik Mistry kartik.mis...@gmail.comwrote: On Sat, Dec 15, 2012 at 2:39 PM, Pauli suok...@gmail.com wrote: I noticed that sometimes gwibber generates multiple notifications for a single update. I quickly figured out that issue was dbus starting multiple gwibber-service instances because a race condition in service startup. When I looked around I saw some Ubuntu bug report having similar issues with their indicator. I don't know if there is any more issues that are caused by the race condition. I have made a proposed fix to gwibber code and dbu service configuration to avoid the race condition in startup. The fix is simple refactoring dbus interface to be under single service name that allows dbus to provide atomic single service startup functionality for gwibber-service. I checked upstream code that same bug still exists in the latest development version. But I could easily compile the latest version in Sid so I decided to first cook a patch for the debian package. I will today forward port my changes for upstream inclusion. Attached patch will require also changes to packaging because it reduces .service files to only two. Thanks a lot. Can you redo patch against experimental package of Gwibber? We really need to re-work on package as it has more dependencies which are not in Debian yet. I will do that after Christmas. I didn't have time to figure out the build dependencies when I tried to build gwibber from upstream. I also opened upstream bug if someone there would like to forward port changes before I have time to figure out how to get required dependencies. https://bugs.launchpad.net/gwibber/+bug/1090670 fix-for-3.5.2.diff Description: Binary data
Bug#695985: gwibber-service: dbus starts multiple instances of gwibber because of poor service configuration
The master merge request can be found from https://code.launchpad.net/~paniemin/gwibber/gwibber/+merge/143341
Bug#695985: gwibber-service: dbus starts multiple instances of gwibber because of poor service configuration
On Mon, Dec 17, 2012 at 11:58 AM, Kartik Mistry kartik.mis...@gmail.comwrote: On Sat, Dec 15, 2012 at 2:39 PM, Pauli suok...@gmail.com wrote: I noticed that sometimes gwibber generates multiple notifications for a single update. I quickly figured out that issue was dbus starting multiple gwibber-service instances because a race condition in service startup. When I looked around I saw some Ubuntu bug report having similar issues with their indicator. I don't know if there is any more issues that are caused by the race condition. I have made a proposed fix to gwibber code and dbu service configuration to avoid the race condition in startup. The fix is simple refactoring dbus interface to be under single service name that allows dbus to provide atomic single service startup functionality for gwibber-service. I checked upstream code that same bug still exists in the latest development version. But I could easily compile the latest version in Sid so I decided to first cook a patch for the debian package. I will today forward port my changes for upstream inclusion. Attached patch will require also changes to packaging because it reduces .service files to only two. Thanks a lot. Can you redo patch against experimental package of Gwibber? We really need to re-work on package as it has more dependencies which are not in Debian yet. I will do that after Christmas. I didn't have time to figure out the build dependencies when I tried to build gwibber from upstream. I also opened upstream bug if someone there would like to forward port changes before I have time to figure out how to get required dependencies. https://bugs.launchpad.net/gwibber/+bug/1090670
Bug#695985: gwibber-service: dbus starts multiple instances of gwibber because of poor service configuration
On Sat, Dec 15, 2012 at 2:39 PM, Pauli suok...@gmail.com wrote: I noticed that sometimes gwibber generates multiple notifications for a single update. I quickly figured out that issue was dbus starting multiple gwibber-service instances because a race condition in service startup. When I looked around I saw some Ubuntu bug report having similar issues with their indicator. I don't know if there is any more issues that are caused by the race condition. I have made a proposed fix to gwibber code and dbu service configuration to avoid the race condition in startup. The fix is simple refactoring dbus interface to be under single service name that allows dbus to provide atomic single service startup functionality for gwibber-service. I checked upstream code that same bug still exists in the latest development version. But I could easily compile the latest version in Sid so I decided to first cook a patch for the debian package. I will today forward port my changes for upstream inclusion. Attached patch will require also changes to packaging because it reduces .service files to only two. Thanks a lot. Can you redo patch against experimental package of Gwibber? We really need to re-work on package as it has more dependencies which are not in Debian yet. -- Kartik Mistry | IRC: kart_ {0x1f1f, kartikm}.wordpress.com -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#695985: gwibber-service: dbus starts multiple instances of gwibber because of poor service configuration
Package: gwibber-service Version: 3.0.0.1-2.2 Severity: important Tags: patch upstream Dear Maintainer, I noticed that sometimes gwibber generates multiple notifications for a single update. I quickly figured out that issue was dbus starting multiple gwibber-service instances because a race condition in service startup. When I looked around I saw some Ubuntu bug report having similar issues with their indicator. I don't know if there is any more issues that are caused by the race condition. I have made a proposed fix to gwibber code and dbu service configuration to avoid the race condition in startup. The fix is simple refactoring dbus interface to be under single service name that allows dbus to provide atomic single service startup functionality for gwibber-service. I checked upstream code that same bug still exists in the latest development version. But I could easily compile the latest version in Sid so I decided to first cook a patch for the debian package. I will today forward port my changes for upstream inclusion. Attached patch will require also changes to packaging because it reduces .service files to only two. -- System Information: Debian Release: 7.0 APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages gwibber-service depends on: ii python2.7.3-3 ii python-dbus 1.1.1-1 ii python-egenix-mxdatetime 3.2.5-1 ii python-gnomekeyring 2.32.0+dfsg-2+b1 ii python-imaging1.1.7-4 ii python-notify 0.1.1-3 ii python-oauth 1.0.1-3 ii python-pycurl 7.19.0-5 ii python-simplejson 2.6.2-1 ii python-support1.0.15 ii python-xdg0.19-4 Versions of packages gwibber-service recommends: ii gwibber-service-facebook 3.0.0.1-2.2 ii gwibber-service-identica 3.0.0.1-2.2 ii gwibber-service-twitter 3.0.0.1-2.2 ii python-indicate 0.6.92-1 ii python-libproxy 0.3.1-5.1 gwibber-service suggests no packages. -- no debconf information From 66a327840fedca095961a2b8360450fa6099cbd3 Mon Sep 17 00:00:00 2001 From: Pauli Nieminen suok...@gmail.com Date: Sat, 15 Dec 2012 08:51:31 +0200 Subject: [PATCH] fix dbus service startup not to start multiple instances gwibber-service process can be started multiple times by dbus for each service file. If previous startup hadn't yet had time to register the com.Gwibber.Connection second instance will be able start duplicate instance. To avoid dealing with the startup race condition we can use single service file to provide all services making dbus handle correctly single gwibber-service instance per user login. Signed-off-by: Pauli Nieminen suok...@gmail.com --- MANIFEST.in|2 +- com.Gwibber.Accounts.service |3 --- com.Gwibber.Connection.service |3 --- com.Gwibber.Searches.service |3 --- com.Gwibber.Service.service|3 --- com.Gwibber.Streams.service|3 --- com.Gwibber.URLShorten.service |3 --- com.Gwibber.service|3 +++ gwibber/lib/__init__.py|2 +- gwibber/microblog/dispatcher.py|8 gwibber/microblog/storage.py |8 gwibber/microblog/util/__init__.py |8 setup.py |2 +- 13 files changed, 18 insertions(+), 33 deletions(-) delete mode 100644 com.Gwibber.Accounts.service delete mode 100644 com.Gwibber.Connection.service delete mode 100644 com.Gwibber.Searches.service delete mode 100644 com.Gwibber.Service.service delete mode 100644 com.Gwibber.Streams.service delete mode 100644 com.Gwibber.URLShorten.service create mode 100644 com.Gwibber.service diff --git a/MANIFEST.in b/MANIFEST.in index ee6d6b5..ea23713 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,6 +1,6 @@ include AUTHORS COPYING INSTALL README include MANIFEST.in MANIFEST -include com.Gwibber.*.service +include com.Gwibber.service include com.GwibberClient.service include po/* include ui/* diff --git a/com.Gwibber.Accounts.service b/com.Gwibber.Accounts.service deleted file mode 100644 index b9ead43..000 --- a/com.Gwibber.Accounts.service +++ /dev/null @@ -1,3 +0,0 @@ -[D-BUS Service] -Name=com.Gwibber.Accounts -Exec=/usr/bin/gwibber-service diff --git a/com.Gwibber.Connection.service b/com.Gwibber.Connection.service deleted file mode 100644 index 07020fa..000 --- a/com.Gwibber.Connection.service +++ /dev/null @@ -1,3 +0,0 @@ -[D-BUS Service] -Name=com.Gwibber.Connection -Exec=/usr/bin/gwibber-service diff --git a/com.Gwibber.Searches.service b/com.Gwibber.Searches.service deleted file mode 100644 index b641b37..000 --- a/com.Gwibber.Searches.service +++ /dev/null @@ -1,3 +0,0 @@ -[D-BUS Service]