[Bugs] #1401 UNSP: s-p-s exits if system bus cannot be accessed

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Sun Sep 20 13:50:30 EDT 2009


#1401: s-p-s exits if system bus cannot be accessed
------------------------------------------+---------------------------------
    Reporter:  sascha_silbe               |          Owner:  tomeu                      
        Type:  defect                     |         Status:  new                        
    Priority:  Unspecified by Maintainer  |      Milestone:  Unspecified by Release Team
   Component:  sugar-presence-service     |        Version:  Git as of bugdate          
    Severity:  Major                      |       Keywords:                             
Distribution:  Unspecified                |   Status_field:  New                        
------------------------------------------+---------------------------------
 psutils.py already fails gracefully if NetworkManager cannot be found, but
 it breaks if the entire session bus is unreachable (e.g. because of
 running inside a chroot environment):

 {{{
 1253468327.196359 INFO s-p-s: Starting presence service 0.85.3...
 Traceback (most recent call last):
   File "/home/sascha.silbe/sugar-jhbuild/install/bin/sugar-presence-
 service", line 24, in <module>
     main.main()
   File "/home/sascha.silbe/sugar-jhbuild/install/share/sugar-presence-
 service/main.py", line 64, in main
     presenceservice.main(test_num, randomize)
   File "/home/sascha.silbe/sugar-jhbuild/install/share/sugar-presence-
 service/presenceservice.py", line 885, in main
     ps = PresenceService()
   File "/home/sascha.silbe/sugar-jhbuild/install/share/sugar-presence-
 service/presenceservice.py", line 87, in __init__
     self._owner = self._create_owner()
   File "/home/sascha.silbe/sugar-jhbuild/install/share/sugar-presence-
 service/presenceservice.py", line 56, in _create_owner
     return ShellOwner(self, self._session_bus)
   File "/home/sascha.silbe/sugar-jhbuild/install/share/sugar-presence-
 service/buddy.py", line 992, in __init__
     tags=tags)
   File "/home/sascha.silbe/sugar-jhbuild/install/share/sugar-presence-
 service/buddy.py", line 680, in __init__
     self._ip4_addr_monitor = psutils.IP4AddressMonitor.get_instance()
   File "/home/sascha.silbe/sugar-jhbuild/install/share/sugar-presence-
 service/psutils.py", line 151, in get_instance
     _ip4am = IP4AddressMonitor()
   File "/home/sascha.silbe/sugar-jhbuild/install/share/sugar-presence-
 service/psutils.py", line 162, in __init__
     self._sys_bus = dbus.SystemBus()
   File "/usr/lib/pymodules/python2.5/dbus/_dbus.py", line 202, in __new__
     private=private)
   File "/usr/lib/pymodules/python2.5/dbus/_dbus.py", line 108, in __new__
     bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
   File "/usr/lib/pymodules/python2.5/dbus/bus.py", line 125, in __new__
     bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
 dbus.exceptions.DBusException: org.freedesktop.DBus.Error.FileNotFound:
 Failed to connect to socket /var/run/dbus/system_bus_socket: No such file
 or directory
 1253468327.227770 DEBUG root: _cleanup_temp_files
 }}}

 Since the shell breaks if it cannot reach the presence service, Sugar
 won't work at all without a system bus running, even though it's only
 required for optional features (non-permanent connection to jabber server,
 removable media):

 {{{
 1253468325.289580 ERROR root: Keypair exists, skip generation.
 1253468326.440811 ERROR dbus.proxies: Introspect error on
 org.laptop.Sugar.Presence:/org/laptop/Sugar/Presence:
 dbus.exceptions.DBusException:
 org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with
 unknown return code 1
 1253468326.442057 DEBUG dbus.proxies: Executing introspect queue due to
 error
 1253468327.290424 ERROR sugar.presence.presenceservice: Unable to retrieve
 local user/owner from presence service
 Traceback (most recent call last):
   File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-
 packages/sugar/presence/presenceservice.py", line 443, in get_owner
     owner_op = self._ps.GetOwner()
   File "/usr/lib/pymodules/python2.5/dbus/proxies.py", line 68, in
 __call__
     return self._proxy_method(*args, **keywords)
   File "/usr/lib/pymodules/python2.5/dbus/proxies.py", line 140, in
 __call__
     **keywords)
   File "/usr/lib/pymodules/python2.5/dbus/connection.py", line 622, in
 call_blocking
     message, timeout)
 DBusException: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper
 exited with unknown return code 1
 Traceback (most recent call last):
   File "/home/sascha.silbe/sugar-jhbuild/install/bin/sugar-session", line
 225, in <module>
     main()
   File "/home/sascha.silbe/sugar-jhbuild/install/bin/sugar-session", line
 194, in main
     start_ui_service()
   File "/home/sascha.silbe/sugar-jhbuild/install/bin/sugar-session", line
 95, in start_ui_service
     ui_service.start()
   File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-
 packages/jarabe/view/service.py", line 59, in start
     owner_model = owner.get_model()
   File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-
 packages/jarabe/model/owner.py", line 112, in get_model
     _model = Owner()
   File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-
 packages/jarabe/model/owner.py", line 77, in __init__
     self._invites = Invites()
   File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-
 packages/jarabe/model/invites.py", line 78, in __init__
     owner = ps.get_owner()
   File "/home/sascha.silbe/sugar-jhbuild/install/lib/python2.5/site-
 packages/sugar/presence/presenceservice.py", line 447, in get_owner
     raise RuntimeError("Could not get owner object.")
 RuntimeError: Could not get owner object.
 1253468327.350193 DEBUG root: _cleanup_temp_files
 }}}

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/1401>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list