App crashes directly with dbus exception

Bug #795492 reported by brejoc
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Lernid
Fix Released
Low
John S. Gruber
desktopcouch (Ubuntu)
Confirmed
Undecided
Unassigned
lernid (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

$ lernid
Traceback (most recent call last):
  File "/usr/bin/lernid", line 455, in <module>
    window = NewLernidWindow()
  File "/usr/bin/lernid", line 434, in NewLernidWindow
    window.finish_initializing(builder)
  File "/usr/bin/lernid", line 90, in finish_initializing
    if HAVE_APPINDICATOR and Preferences.get('show_appindicator'):
  File "/usr/lib/python2.7/dist-packages/lernid/CouchDBPreferences.py", line 75, in get
    klass = cls.get_instance()
  File "/usr/lib/python2.7/dist-packages/lernid/CouchDBPreferences.py", line 66, in get_instance
    cls._instance = cls()
  File "/usr/lib/python2.7/dist-packages/lernid/CouchDBPreferences.py", line 31, in __init__
    self._database = CouchDatabase(self._db_name, create=True)
  File "/usr/lib/pymodules/python2.7/desktopcouch/application/server.py", line 101, in __init__
    oauth_tokens=oauth_tokens, ctx=ctx)
  File "/usr/lib/pymodules/python2.7/desktopcouch/application/server.py", line 75, in __init__
    oauth_tokens=oauth_tokens, ctx=ctx, views_factory=views_factory)
  File "/usr/lib/pymodules/python2.7/desktopcouch/records/database.py", line 123, in __init__
    self._reconnect()
  File "/usr/lib/pymodules/python2.7/desktopcouch/application/server.py", line 81, in _reconnect
    port = find_port(ctx=self.ctx)
  File "/usr/lib/pymodules/python2.7/desktopcouch/application/platform/__init__.py", line 48, in find_port
    return platform_find_port(pid, ctx)
  File "/usr/lib/pymodules/python2.7/desktopcouch/application/platform/linux/__init__.py", line 100, in platform_find_port
    proxy = bus.get_object('org.desktopcouch.CouchDB', '/')
  File "/usr/lib/pymodules/python2.7/dbus/bus.py", line 244, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/pymodules/python2.7/dbus/proxies.py", line 241, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/pymodules/python2.7/dbus/bus.py", line 183, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/pymodules/python2.7/dbus/bus.py", line 281, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/pymodules/python2.7/dbus/connection.py", line 630, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

Revision history for this message
John S. Gruber (jsjgruber) wrote :

Thank you for the bug report. Would you mind reporting what version of Ubuntu you were using and what version of desktopcouch you are running?

Revision history for this message
brejoc (brejoc) wrote :

Oh, sorry. Sure! I'm running a rather fresh intallation of natty. desktopcouch has version "1.0.7-0ubuntu2". But I just discovered, that I'm able to run Lernid with my second user account on the same installation. Might be an error with the user environment and not Lernid.

Revision history for this message
John S. Gruber (jsjgruber) wrote : Re: [Bug 795492] Re: App crashes directly with dbus exception

Thanks, brejoc. If you learn more please add comments.

From the traceback it appears to be a case where lernid is trying to
retrieve a preference, which is stored in couchdb. couchdb is a
separate process for each each user session that looks up and stores
all lernid preferences. In this case the dbus mechanism isn't able to
start couchdb up as it must for things to work.

Revision history for this message
John S. Gruber (jsjgruber) wrote :

Since it seems to be related to your individual desktopcouch state, I think I'll mark this invalid. Please revive it if you continue to have problems.

Changed in lernid:
status: New → Invalid
Revision history for this message
John S. Gruber (jsjgruber) wrote :

I've learned that this error occurs if /usr/bin/gnome-keyring-daemon doesn't start (at least for Ubuntu One users on Oneiric).

Changed in lernid:
status: Invalid → Confirmed
Revision history for this message
John S. Gruber (jsjgruber) wrote :

I've seen this problem again so I'm resurrecting it.

In my case, Ubuntu One is installed, the userid has never been logged in and therefore there is no Ubuntu One key in the key-chain, even though the gnome-keyring-daemon is running. Logging into Ubuntu One puts such a key (set of tokens) in the keyring and the userid can seem to avoid this error from then on.

desktopcouch-service seems to be waiting on the desktopcouch.application.plugins.ubuntuone_pairing semaphore as when a connection is made that semaphore is removed and things take off.

Before and after the connection looks like this:

DBusException: org.freedesktop.DBus.Error.TimedOut: Activation of org.desktopcouch.CouchDB timed out
migration 2011-09-04 18:41:22,883 - failed to finish migrating.
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/desktopcouch/application/service.py", line 180, in start
    migration.run_needed_migrations(ctx=self._ctx)
  File "/usr/lib/pymodules/python2.7/desktopcouch/application/migration/__init__.py", line 123, in run_needed_migrations
    all_dbs = _all_dbs(ctx)
  File "/usr/lib/pymodules/python2.7/desktopcouch/application/migration/__init__.py", line 102, in _all_dbs
    port = find_port(ctx=ctx)
  File "/usr/lib/pymodules/python2.7/desktopcouch/application/platform/__init__.py", line 48, in find_port
    return platform_find_port(pid, ctx)
  File "/usr/lib/pymodules/python2.7/desktopcouch/application/platform/linux/__init__.py", line 100, in platform_find_port
    proxy = bus.get_object('org.desktopcouch.CouchDB', '/')
  File "/usr/lib/pymodules/python2.7/dbus/bus.py", line 244, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/pymodules/python2.7/dbus/proxies.py", line 241, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/pymodules/python2.7/dbus/bus.py", line 183, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/pymodules/python2.7/dbus/bus.py", line 281, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/pymodules/python2.7/dbus/connection.py", line 630, in call_blocking
    message, timeout)
DBusException: org.freedesktop.DBus.Error.TimedOut: Activation of org.desktopcouch.CouchDB timed out
DEBUG:root:Not adding desktopcouch pairing since we are already paired

and then as soon as the connection is made:

INFO:root:removing semaphore for desktopcouch.application.plugins.ubuntuone_pairing
and, if waiting, the create database function will take off.

I got this result with this small code fragment:

rom desktopcouch.application.server import DesktopDatabase; d=DesktopDatabase('george', create=True)

Revision history for this message
John S. Gruber (jsjgruber) wrote :

from desktopcouch.application.server import DesktopDatabase; d=DesktopDatabase('george', create=True)

was that code fragment. Sorry

Revision history for this message
John S. Gruber (jsjgruber) wrote :

I was able to circumvent this problem by removing the pairing plugin: "sudo apt-get remove desktopcouch-ubuntuone"

Changed in desktopcouch (Ubuntu):
status: New → Confirmed
Revision history for this message
John S. Gruber (jsjgruber) wrote :

In 0.8.2 this should no longer produce a traceback, using a backup config file instead. The implication is that window sizes and pane placement will be forgotten, and there is a substantial wait for this timeout to occur.

Changed in lernid:
importance: Undecided → Low
Revision history for this message
John S. Gruber (jsjgruber) wrote :

I've confirmed the last comment by testing in a user account that has not connected to Ubuntu One.

In Ubuntu version 0.8.0.2 on the same account, this bug produces a traceback and crashes Lernid, so this should have a high or critical priority there.

Changed in lernid (Ubuntu):
status: New → Confirmed
Revision history for this message
John S. Gruber (jsjgruber) wrote :

If LP: #780972 is not fixed, this symptom can again be produced on
some accounts, rather than having Lernid crash directly with an
"unauthorized" error, according to my testing. In this situation the
Lernid timeout crash is accompanied by a desktopcouch "unauthorized"
error.

They are two different bugs, however.

Revision history for this message
John S. Gruber (jsjgruber) wrote :

Removing desktopcouch from lernid in 0.8.5.

Changed in lernid:
assignee: nobody → John S. Gruber (jsjgruber)
milestone: none → 0.8.5
Changed in lernid:
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (6.4 KiB)

This bug was fixed in the package lernid - 0.8.5

---------------
lernid (0.8.5) quantal; urgency=low

  * Release 0.8.5. (LP: #1039839)

lernid (0.8.4.11) precise; urgency=low

  * Merge lernid-proposed

lernid (0.8.4.10) precise; urgency=low

  * Merge translations

lernid (0.8.4.9) precise; urgency=low

  * Disable all plugins through webkit settings so they won't crash
    lernid. Future webkit releases may run plugins in a separate
    process allowing us to reconsider this eventually.
    lernid/widgets/Browser.py . Closes LP: #995695.

lernid (0.8.4.8) precise; urgency=low

  * Don't add irc logs for future events in lernid/widgets/Schedule.py

lernid (0.8.4.7) precise; urgency=low

  * Change version number and create new version of .pot files

  * Fix scrolling case when there are no sessions in the schedule timeframe.

  * Underline Irclog entries to make it apparent that they are clickable.

lernid (0.8.4.6) precise; urgency=low

  * Change version number and create new version of .pot files

  * Get rid of slide error message more quickly, and when a new attempt
    is made to download slides.

lernid (0.8.4.5) precise; urgency=low

  * Don't release the nick--it causes the server to change previous
    signons elsewhere to Guestn.

  * Add calendar override option for use in testing.

  * Create irclog lines for current and future sessions, too.

  * If there are no future sessions, scroll to the bottom of the calendar.

  * Add the --no-update command line option to supress lernid's
    scheduled schedule updates.

  * Scramble the calendar domain name before every calendar download

  * At disconnect time, be sure schedule _update handle is removed. Don't
    let an initial calendar load ending after an event is disconnected
    produce schedule the update chain.

  * Ignore callbacks from cancelled messages

  * Select time to trigger calendar updates from a list. At :06 after
    the hour and half hour. Other times are :01, :11, :21, :31, :41, :51

  * Add remarks about the schedule buttons in the lernid man page.

  * Clean up some corner cases when events are terminated. Schedule._event
    is now None when there is no event active. Rename irclog click callback.

  * Remove event interrupted message when the next connection is made.

  * When a new slide load attempt is made, stop outstanding I/O and retries.

  * Add a schedule refresh button

  * Clean up and simplify calendar reload scheduling. Only load it every
    ten minutes and once a night to produce a new irclog entry in the
    schedule.

  * Be sure we don't pre-announce the same session twice in a row.

  * Make server disconnections more robust

lernid (0.8.4.4) precise; urgency=low

  * New version number; new .pot file. Clear lintian errors

lernid (0.8.4.3) precise; urgency=low

  * Depend on python version 2.6 as lernid uses the io module

  * Don't reparse calendar unless it has changed. Simplify
    _calendar_refresh parameters.

  * Don't scroll schedule unless we have just connected to an event.`

lernid (0.8.4.2) precise; urgency=low

  * Increment release version by .1. Adjust version number in package.
    Make python-support a straight build depend...

Read more...

Changed in lernid (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.