Presence server crashes if no interface is configure

Bug #297329 reported by mungewell
4
Affects Status Importance Assigned to Milestone
sugar-presence-service (Ubuntu)
Fix Released
Undecided
Morgan Collett

Bug Description

Binary package hint: sugar

It looks like Sugar (and Sugar-Emulator) will fail to start if there is not an ethx(??) interface configured.

--
1226490893.407684 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
1226490893.946251 WARNING sugar.presence.presenceservice: Unable to retrieve local user/owner
                   from presence service: org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with unknown return code 1
Traceback (most recent call last):
  File "/usr/bin/sugar-shell", line 32, in <module>
    main()
  File "/usr/share/sugar/shell/main.py", line 153, in main
    view.Shell.get_instance()
  File "/usr/share/sugar/shell/view/Shell.py", line 259, in get_instance
    _instance = Shell()
  File "/usr/share/sugar/shell/view/Shell.py", line 55, in __init__
    self._model = shellmodel.get_instance()
  File "/usr/share/sugar/shell/model/shellmodel.py", line 102, in get_instance
    _instance = ShellModel()
  File "/usr/share/sugar/shell/model/shellmodel.py", line 48, in __init__
    self._owner = ShellOwner()
  File "/usr/share/sugar/shell/model/Owner.py", line 76, in __init__
    self._invites = Invites()
  File "/usr/share/sugar/shell/model/Invites.py", line 78, in __init__
    owner = ps.get_owner()
  File "/usr/lib/python2.5/site-packages/sugar/presence/presenceservice.py", line 452, in get_owner
    raise RuntimeError("Could not get owner object.")
RuntimeError: Could not get owner object.
--

Doing 'sudo ifconfig eth0 192.168.1.20 netmask 255.255.255.0' allow the boot to continue and start Sugar interface.

Simon.

Revision history for this message
Morgan Collett (morgan) wrote :

It works for me, with only the lo interface up.

If you can reproduce, can you run with "PRESENCESERVICE_DEBUG=1 SUGAR_LOGGER_LEVEL=debug sugar-emulator" and attach your ~/.sugar/default/presenceservice.log - and check if presence-service is running at the time?

Revision history for this message
mungewell (simon-mungewell) wrote :

Checked and still crashes. It seems to do it when the default interface is up but not connected.

Method: remove ethernet cable and 'sudo /etc/init.d/networking restart', watch the dhclient timeout.
--
simon@destiny:~$ sudo /etc/init.d/networking restart
 * Reconfiguring network interfaces... RTNETLINK answers: No such process
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:d0:59:b7:80:76
Sending on LPF/eth0/00:d0:59:b7:80:76
Sending on Socket/fallback
DHCPRELEASE on eth0 to 192.168.32.1 port 67
send_packet: Network is unreachable
send_packet: please consult README file regarding broadcast address.
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:d0:59:b7:80:76
Sending on LPF/eth0/00:d0:59:b7:80:76
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
                                                                                                        [ OK ]
simon@destiny:~$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 0.0.0.0 0.0.0.0 U 1000 0 0 eth0
--

It does not crash (testing after each command) if I do:
1) 'sudo ifdown eth0'
2) 'sudo ifconfig eth0 up' with no parameters
3) 'sudo ifconfig eth0 up 192.168.1.123 netmask 255.255.255.0'
4) 'sudo route add -net default gw 192.168.1.123'

I did try 'sudo route add -net default gw 0.0.0.0', but apparently this is illegal.

After the crash presence server is not running.
Mungewell.

Morgan Collett (morgan)
Changed in sugar:
assignee: nobody → morgan
status: New → Confirmed
Changed in sugar-presence-service:
status: Unknown → New
Changed in sugar-presence-service:
status: New → Confirmed
Revision history for this message
Morgan Collett (morgan) wrote :

Mungewell, are you using Network Manager to manage your interfaces?

Revision history for this message
mungewell (simon-mungewell) wrote : Re: [Bug 297329] Re: Presence server crashes if no interface is configure

> Mungewell, are you using Network Manager to manage your interfaces?
>
> --
> Presence server crashes if no interface is configure
> https://bugs.launchpad.net/bugs/297329
> You received this bug notification because you are a direct subscriber
> of the bug.
>

On my normal machine I use a hack of 'essid-scan' and olsrd (yes I'm
probably only person who has a ad-hoc mesh running around the appartment).

I was playing with Network Manager on my LiveCD/USB build last night and
only got as far as having the AP show in neighbour, but with no names and
doing nothing on a 'connect'.

'nm-tool' gave a full listing, but I can't see a command line interface to
control NetworkManager.

Cheers,
Simon

Revision history for this message
Morgan Collett (morgan) wrote :

It seems there is a permissions problem with Sugar with the NM 0.7 patch talking to NM. Some of the calls are denied, to get the AP properties.

I'll work with the upstream team to get that fixed.

When it is fixed, the NM patches should "fix" the problem in this bug report, unless you're not using NM... I've been unable to reproduce this particular problem, but I'll think about it again once the NM stuff is out the way.

Revision history for this message
David Farning (dfarning) wrote :

This has been fix upstream.

Changed in sugar-presence-service (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.