bzr visualize crashed with DBus error

Bug #377476 reported by Andrew Cowie
80
This bug affects 13 people
Affects Status Importance Assigned to Milestone
Bazaar GTK+ Frontends
Invalid
High
Unassigned
seahorse
Fix Released
Medium
bzr-gtk (Fedora)
Fix Released
Medium
seahorse (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Various bzr-gtk commands can fail to start because of a dbus error. Repeating the command will typically fix the problem.

mbp@grace% ./bzr selftest TestReconfigureStacking
bzr: ERROR: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 0

Traceback (most recent call last):
  File "/home/mbp/bzr/391411-reconfigure-stacked/bzrlib/commands.py", line 835, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/home/mbp/bzr/391411-reconfigure-stacked/bzrlib/commands.py", line 1030, in run_bzr
    ret = run(*run_argv)
  File "/home/mbp/bzr/391411-reconfigure-stacked/bzrlib/commands.py", line 647, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/mbp/bzr/391411-reconfigure-stacked/bzrlib/builtins.py", line 3474, in run
    result = selftest(**selftest_kwargs)
  File "/home/mbp/bzr/391411-reconfigure-stacked/bzrlib/tests/__init__.py", line 3146, in selftest
    suite = test_suite(keep_only, starting_with)
  File "/home/mbp/bzr/391411-reconfigure-stacked/bzrlib/tests/__init__.py", line 3586, in test_suite
    plugin_suite = plugin.load_plugin_tests(loader)
  File "/home/mbp/bzr/391411-reconfigure-stacked/bzrlib/plugin.py", line 383, in load_plugin_tests
    return loader.loadTestsFromModule(self.module)
  File "/home/mbp/bzr/391411-reconfigure-stacked/bzrlib/tests/TestUtil.py", line 129, in loadTestsFromModule
    return load_tests(basic_tests, module, self)
  File "/home/mbp/.bazaar/plugins/gtk/__init__.py", line 190, in load_tests
    ["%s.%s" % (__name__, tmn) for tmn in testmod_names]))
  File "/home/mbp/bzr/391411-reconfigure-stacked/bzrlib/tests/TestUtil.py", line 92, in loadTestsFromModuleNames
    result.addTests(self.loadTestsFromModuleName(name))
  File "/home/mbp/bzr/391411-reconfigure-stacked/bzrlib/tests/TestUtil.py", line 99, in loadTestsFromModuleName
    result.addTests(self.loadTestsFromModule(module))
  File "/home/mbp/bzr/391411-reconfigure-stacked/bzrlib/tests/TestUtil.py", line 129, in loadTestsFromModule
    return load_tests(basic_tests, module, self)
  File "/home/mbp/.bazaar/plugins/gtk/tests/__init__.py", line 31, in load_tests
    ["%s.%s" % (__name__, tmn) for tmn in testmod_names]))
  File "/home/mbp/bzr/391411-reconfigure-stacked/bzrlib/tests/TestUtil.py", line 92, in loadTestsFromModuleNames
    result.addTests(self.loadTestsFromModuleName(name))
  File "/home/mbp/bzr/391411-reconfigure-stacked/bzrlib/tests/TestUtil.py", line 97, in loadTestsFromModuleName
    module = _load_module_by_name(name)
  File "/home/mbp/bzr/391411-reconfigure-stacked/bzrlib/tests/TestUtil.py", line 166, in _load_module_by_name
    module = __import__(mod_name)
  File "/home/mbp/.bazaar/plugins/gtk/tests/test_annotate_config.py", line 23, in <module>
    from bzrlib.plugins.gtk.annotate import (
  File "/home/mbp/.bazaar/plugins/gtk/annotate/gannotate.py", line 31, in <module>
    from bzrlib.plugins.gtk.revisionview import RevisionView
  File "/home/mbp/.bazaar/plugins/gtk/revisionview.py", line 36, in <module>
    from bzrlib.plugins.gtk import seahorse
  File "/home/mbp/.bazaar/plugins/gtk/seahorse.py", line 33, in <module>
    crypto = dbus.Interface(bus.get_object(BUS_NAME, CRYPTO_PATH),
  File "/var/lib/python-support/python2.6/dbus/bus.py", line 244, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/var/lib/python-support/python2.6/dbus/proxies.py", line 241, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/var/lib/python-support/python2.6/dbus/bus.py", line 183, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/var/lib/python-support/python2.6/dbus/bus.py", line 281, in start_service_by_name
    'su', (bus_name, flags)))
  File "/var/lib/python-support/python2.6/dbus/connection.py", line 622, in call_blocking
    message, timeout)
DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 0

Revision history for this message
In , Warren (warren-redhat-bugs) wrote :
Download full text (3.6 KiB)

[warren@newcaprica ltsp-trunk]$ rpm -qa 'bzr*'
bzr-1.14-0.2.rc1.fc11.x86_64
bzr-gtk-0.95.0-4.fc11.x86_64
[warren@newcaprica ltsp-trunk]$ bzr info
Standalone tree (format: pack-0.92)
Location:
  branch root: .

Related branches:
    push branch: bzr+ssh://<email address hidden>/%7Eltsp-upstream/ltsp/ltsp-trunk/
  parent branch: bzr+ssh://<email address hidden>/%7Eltsp-upstream/ltsp/ltsp-trunk/
[warren@newcaprica ltsp-trunk]$ bzr viz
/usr/lib64/python2.6/site-packages/bzrlib/plugins/gtk/ui.py:224: DeprecationWarning: bzrlib.progress.ProgressBarStack was deprecated in version 1.12.
  self._progress_bar_stack = progress.ProgressBarStack(klass=widget)
bzr: ERROR: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 0

Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 727, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 922, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 559, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib64/python2.6/site-packages/bzrlib/plugins/gtk/__init__.py", line 288, in run
    pp = start_viz_window(br, revids, limit)
  File "/usr/lib64/python2.6/site-packages/bzrlib/plugins/gtk/__init__.py", line 256, in start_viz_window
    from bzrlib.plugins.gtk.viz import BranchWindow
  File "/usr/lib64/python2.6/site-packages/bzrlib/plugins/gtk/viz/__init__.py", line 14, in <module>
    from branchwin import BranchWindow
  File "/usr/lib64/python2.6/site-packages/bzrlib/plugins/gtk/viz/branchwin.py", line 18, in <module>
    from bzrlib.plugins.gtk.tags import AddTagDialog
  File "/usr/lib64/python2.6/site-packages/bzrlib/plugins/gtk/tags.py", line 27, in <module>
    from bzrlib.plugins.gtk.revisionview import RevisionView
  File "/usr/lib64/python2.6/site-packages/bzrlib/plugins/gtk/revisionview.py", line 32, in <module>
    from bzrlib.plugins.gtk import seahorse
  File "/usr/lib64/python2.6/site-packages/bzrlib/plugins/gtk/seahorse.py", line 33, in <module>
    crypto = dbus.Interface(bus.get_object(BUS_NAME, CRYPTO_PATH),
  File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 244, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/usr/lib/python2.6/site-packages/dbus/proxies.py", line 241, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 183, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/usr/lib/python2.6/site-packages/dbus/bus.py", line 281, in start_service_by_name
    'su', (bus_name, flags)))
  File "/usr/lib/python2.6/site-packages/dbus/connection.py", line 630, in call_blocking
    message, timeout)
DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 0

bzr 1.14rc1 on python 2.6 (linux2)
arguments: ['/usr/bin/bzr', 'viz']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.utf8'
plugins:
  gtk /usr/lib64/python2....

Read more...

Revision history for this message
In , Toshio (toshio-redhat-bugs) wrote :

I'm not able to reproduce this. It works for me with seahorse installed and uninstalled. When seahorse-daemon is running or not running. To see if seahorse is a red herring could you try:

  $ ps aux |grep warren > before-fail.log
  $ bzr viz
    [traceback]
  $ ps aux |grep warren > after-fail.log
  $ bzr viz
    [success]
  $ ps aux | grep warren > after-success.log

If I'm right we'll see that seahorse-daemon is not running in the before-fail case and then it will be in one of the after cases. I'm curious to know whether it's started by the time we get to after-fail or not until after-success. Also if there's anything other process that gets started in the meantime... Maybe dbus itself is having to start?

Versions of dbus and seahorse here are:
  dbus-1.2.4-2.fc10.i386
  dbus-python-0.83.0-3.fc10.i386
  seahorse-2.24.1-1.fc10.i386

Revision history for this message
Andrew Cowie (afcowie) wrote :

The branch that breaks can now be found at

bzr://research.operationaldynamics.com/bzr/java-gnome/hackers/andrew/bug-visualize-dbus/

for comparison, the mainline does not break is

bzr://research.operationaldynamics.com/bzr/java-gnome/mainline/

AfC

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

as I mentioned on IRC, I can't reproduce this on Debian with Python2.5 against either of these branches.

affects: bzr → bzr-gtk
Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 377476] Re: bzr visualize crashed with DBus error

I do intermittently see this error; I don't think it's correlated with
the particular branch.

Maybe we should just catch all DBusExceptions here and turn them into
a warning or treat them as Seahorse not being available?

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
Andrew Cowie (afcowie) wrote :

On Sun, 2009-05-17 at 04:42 +0000, Martin Pool wrote:
> Maybe we should just catch all DBusExceptions here and turn them into
> a warning or treat them as Seahorse not being available?

As an aside I would note that seahorse is present on my system.

AfC

Revision history for this message
Vincent Ladeuil (vila) wrote :

It seems to me that the error occurs at first try after a reboot, which may explain why it's hard to reproduce.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

fwiw I can't reproduce this on Debian first try after boot either.

Revision history for this message
Gediminas Paulauskas (menesis) wrote :

It happens to me on the first try, later works. I do have and use seahorse.

My guess is something is wrong with dbus initialization or obtaining the service that has to be started.

Revision history for this message
Szilveszter Farkas (phanatic) wrote :

Gediminas, exactly. I'll check out what happens if we just swallow that exception.

Revision history for this message
In , Toshio (toshio-redhat-bugs) wrote :
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I'm not sure if catching and ignoring this exception is a good idea. It seems to me like a bug in the way we start up DBus. Squashing the exception just means we get no seahorse the first time "bzr viz" is started.

Changed in bzr-gtk:
importance: Undecided → High
status: New → Triaged
Revision history for this message
In , Toshio (toshio-redhat-bugs) wrote :

Built for RawHide. Leaving this open until we see if upstream comes up with what the problem is:

http://koji.fedoraproject.org/koji/taskinfo?taskID=1380071

Michael Terry (mterry)
Changed in bzr-gtk (Ubuntu):
status: New → Confirmed
Changed in bzr-gtk (Fedora):
status: Unknown → Confirmed
Revision history for this message
Michael Terry (mterry) wrote :

This is not a bzr-gtk bug, though maybe you do want to work around it. You can simply reproduce this by the following sequence:

$ killall seahorse-daemon
$ dbus-send --print-reply --dest=org.gnome.seahorse /org/gnome/seahorse/opengpg org.gnome.seahorse.Keys.Test

I've filed an upstream seahorse bug (linked to this report).

Changed in seahorse:
status: Unknown → New
Revision history for this message
In , Bug (bug-redhat-bugs) wrote :

This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Michael Terry (mterry)
Changed in seahorse:
status: New → Unknown
Changed in seahorse:
status: Unknown → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bzr-gtk - 0.95.0+bzr635-1ubuntu1

---------------
bzr-gtk (0.95.0+bzr635-1ubuntu1) karmic; urgency=low

  * Merge from debian unstable (LP: #385200)
  * seahorse.py:
    - Treat ChildExited dbus errors as if seahorse is not available
      LP: #377476

bzr-gtk (0.95.0+bzr635-1) unstable; urgency=low

  * New upstream snapshot.
   + Fixes compatibility with Bazaar 1.15.
  * Bump standards version to 3.8.1.

bzr-gtk (0.95.0+bzr631-1) unstable; urgency=low

  * New upstream snapshot.

 -- Michael Terry <email address hidden> Tue, 09 Jun 2009 10:20:19 -0400

Changed in bzr-gtk (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

This was a seahorse problem.

Changed in bzr-gtk:
status: Triaged → Invalid
affects: bzr-gtk (Ubuntu) → seahorse (Ubuntu)
Revision history for this message
Martin Pool (mbp) wrote :

I see this fairly often (I guess once per session) when running selftest on my Jaunty machine. Running the tests again fixes it.

I wonder if bzr-gtk should retry just once if it sees this exception, as a workaround.

description: updated
Revision history for this message
Savvas Radevic (medigeek) wrote :

I've just run olive-gtk and got the same error:
$ olive-gtk
/usr/lib/python2.6/dist-packages/bzrlib/plugins/gtk/ui.py:224: DeprecationWarning: bzrlib.progress.ProgressBarStack was deprecated in version 1.12.
  self._progress_bar_stack = progress.ProgressBarStack(klass=widget)
Traceback (most recent call last):
  File "/usr/bin/olive-gtk", line 92, in <module>
    from bzrlib.plugins.gtk.olive import OliveGtk
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/gtk/olive/__init__.py", line 51, in <module>
    from bzrlib.plugins.gtk.annotate.gannotate import GAnnotateWindow
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/gtk/annotate/gannotate.py", line 31, in <module>
    from bzrlib.plugins.gtk.revisionview import RevisionView
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/gtk/revisionview.py", line 33, in <module>
    from bzrlib.plugins.gtk import seahorse
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/gtk/seahorse.py", line 33, in <module>
    crypto = dbus.Interface(bus.get_object(BUS_NAME, CRYPTO_PATH),
  File "/var/lib/python-support/python2.6/dbus/bus.py", line 244, in get_object
    follow_name_owner_changes=follow_name_owner_changes)
  File "/var/lib/python-support/python2.6/dbus/proxies.py", line 241, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/var/lib/python-support/python2.6/dbus/bus.py", line 183, in activate_name_owner
    self.start_service_by_name(bus_name)
  File "/var/lib/python-support/python2.6/dbus/bus.py", line 281, in start_service_by_name
    'su', (bus_name, flags)))
  File "/var/lib/python-support/python2.6/dbus/connection.py", line 622, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 0

As Martin said above, running it again fixes the issue

Revision history for this message
In , Toshio (toshio-redhat-bugs) wrote :

Looks like when upstream figured out that it's a bug in seahorse, they reverted the workaround in bzr-gtk. Warren will try the patch in the seahorse bug http://bugzilla.gnome.org/show_bug.cgi?id=583356

If that works, we can see if the seahorse maintainer would be willing to inlude it in a bugfix release.

Revision history for this message
Stephen Warren (srwarren) wrote :

How come this is marked "Fix Released" for "Seahorse (Ubuntu)"? I'm still seeing it on Jaunty with the bzr PPA enabled:

bzr 1.13.1-1
bzr-dbus 0.1~bzr36-3
bzr-gtk 0.97.0-1~bazaar1~jaunty1
bzrtools 1.13.0-1
seahorse 2.26.1-0ubuntu1
seahorse-plugins 2.26.1-0ubuntu1

Note: The upstream bug report says the fix will be in Gnome 2.26.3, which as far as I can tell has been released containing seahorse 2.26.2, so this could be included in Jaunty?

Changed in seahorse (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

the issue should be fixed in karmic don't reopen the bug without testing it there, it seems not important enough for a jaunty stable update though

Changed in seahorse (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Stephen Warren (srwarren) wrote :

OK, thanks for bothering to answer my previous question then. I figured that since nobody answered, it was a mistake.

I'd also debate that it's not serious enough to warrant an update, since IIRC it blocks bzr-gtk from working, since it crashes. I suppose it's easy to just re-run the command, but why should anyone have to?

Revision history for this message
In , Warren (warren-redhat-bugs) wrote :

Fixed in F-12

Changed in bzr-gtk (Fedora):
status: Confirmed → Fix Released
Changed in seahorse:
importance: Unknown → Medium
Changed in bzr-gtk (Fedora):
importance: Unknown → Medium
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.