Use a different dbus name for uniqueness purposes

Bug #639017 reported by Roman Yepishev on 2010-09-15
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Ubuntu One Foundations+ team
ubuntuone-client (Ubuntu)
Ubuntu One Client Engineering team

Bug Description

Currently ubuntuone-syncdaemon contains the following code to ensure that there is only one instance on current session bus:

def is_already_running():
    """ check if there is another instance registered in DBus """
    bus = dbus.SessionBus()
    request = bus.request_name(dbus_interface.DBUS_IFACE_NAME,
    return request == dbus.bus.REQUEST_NAME_REPLY_EXISTS

Since libsyncdaemon-derived applications use NameOwnerChanged signal from dbus to start calling syncdaemon methods this creates a timeout condition. DBus listener is not yet installed, but DBus name is already acquired.

Is it possible to use a different name for startup purposes, something like com.ubuntuone.SyncDaemon.UniqueInstance or similar that will be acquired in is_already_running(), maintained through syncdaemon lifetime thus serving its purpose and will not clash with NameOwnerChanged of real syncdaemon DBus listener?

Related branches

John Lenton (chipaca) on 2010-09-17
tags: added: desktop+
removed: foundations+
Changed in ubuntuone-client:
importance: Undecided → High
status: New → In Progress
dobey (dobey) on 2010-09-17
Changed in ubuntuone-client:
status: In Progress → Fix Committed
Changed in ubuntuone-client (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Ubuntu One Desktop+ team (ubuntuone-desktop+)
milestone: none → ubuntu-10.10
Changed in ubuntuone-client (Ubuntu):
status: Triaged → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntuone-client - 1.4.2-0ubuntu1

ubuntuone-client (1.4.2-0ubuntu1) maverick; urgency=low

  * New upstream release:
    - Adding a try-except block around clientdefs constants import to be able to run on development environments (Natalia Bidart) (LP: #628956)
    - Fix LR to delete the share metadata or unsubscribe the udf if the volume
      directory is missing from disk but VolumeManager still have the volume as
      "active" (Guillermo Gonzalez) (LP: #556783)
    - FSM creates the directories now, not Sync (Facundo Batista)
    - Default logging for ubuntuone-preferences is INFO (Natalia Bidart)
      (LP: #640438)
    - Plug a memory leak (Rodrigo Moya)
    - Added contacts for users with no addressbooks are kept in memory correctly
      now (Rodrigo Moya) (LP: #640171)
    - Fixed syncdaemon_metadata_get_is_synced to work for post-generations
      folders (Rodrigo Moya) (LP: #640392)
    - Fix a regression in VolumeManager, now it calls refresh_shares after
      server rescan (Guillermo Gonzalez) (LP: #638187)
    - Use com.syncdaemon.SyncDaemon.UniqueInstance name to check for existing
      instance of syncdaemon (Roman Yepishev) (LP: #639017)
    - Include glib's gi18n-lib.h, which forces definition of GETTEXT_PACKAGE
      (Rodrigo Moya) (LP: #640955)
    - Add syncdaemon_authentication_clear_token API for the music store to deal
      with invalid tokens (Rodrigo Moya) (LP: #634384)
 -- Rodrigo Moya <email address hidden> Mon, 20 Sep 2010 22:37:05 +0200

Changed in ubuntuone-client (Ubuntu):
status: In Progress → Fix Released
Changed in ubuntuone-client:
status: Fix Committed → Fix Released
Roman Yepishev (rye) wrote :

This change introduced bug 683116 so it was reverted in bug 698113.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers