[pkg-fso-maint] Bug#520902: wicd: breaks non-wireless configured interfaces when installed

Luca Capello luca at pca.it
Mon Mar 23 13:37:36 UTC 2009


Package: wicd
Version: 1.5.9-5
Severity: important

Hello,

wicd has been choosen to be the default WiFi manager on Debian on the
Openmoko FreeRunner.  Since I am working to solve bug #520014 [1], I
tried to install it without fulfilling its dependencies and I got an
IMHO completely unrelated error.

[1] http://bugs.debian.org/520014

BTW, the severity of this bug is important, but I consider it to be more
than that, especially in such situations (like on the Openmoko FR) where
you are working remotely, since you lost the connection to the device.

Here what happens:
=====
debian-gta02:~# ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:22 errors:0 dropped:0 overruns:0 frame:0
          TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2144 (2.0 KiB)  TX bytes:2144 (2.0 KiB)

usb0      Link encap:Ethernet  HWaddr de:d2:78:7e:81:d8
          inet addr:192.168.0.202  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::dcd2:78ff:fe7e:81d8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:954 errors:0 dropped:0 overruns:0 frame:0
          TX packets:522 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:367137 (358.5 KiB)  TX bytes:71125 (69.4 KiB)

debian-gta02:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 usb0
0.0.0.0         192.168.0.200   0.0.0.0         UG    0      0        0 usb0

debian-gta02:~# cat /etc/resolv.conf
nameserver 208.67.222.222
nameserver 208.67.220.220

debian-gta02:~# apt-get --download-only install wicd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  dhcpcd
Suggested packages:
  pm-utils
The following packages will be REMOVED:
  udhcpc
The following NEW packages will be installed:
  dhcpcd wicd
0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
Need to get 303kB of archives.
After this operation, 1966kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.ch.debian.org unstable/main dhcpcd 1:3.2.3-3 [48.1kB]
Get:2 http://ftp.ch.debian.org unstable/main wicd 1.5.9-5 [255kB]
Fetched 303kB in 0s (309kB/s)
Download complete and in download only mode

debian-gta02:~# dpkg --force-all -i /var/cache/apt/archives/wicd_1.5.9-5_all.deb
Selecting previously deselected package wicd.
(Reading database ... 15798 files and directories currently installed.)
Unpacking wicd (from .../archives/wicd_1.5.9-5_all.deb) ...
dpkg: wicd: dependency problems, but configuring anyway as you request:
 wicd depends on dhcpcd | dhcp3-client | pump; however:
  Package dhcpcd is not installed.
  Package dhcp3-client is not installed.
  Package pump is not installed.
Setting up wicd (1.5.9-5) ...

Configuration file `/etc/default/wicd', does not exist on system.
Installing new config file as you request.

Configuration file `/etc/xdg/autostart/wicd-tray.desktop', does not exist on system.
Installing new config file as you request.

Configuration file `/etc/init.d/wicd', does not exist on system.
Installing new config file as you request.

Configuration file `/etc/dbus-1/system.d/wicd.conf', does not exist on system.
Installing new config file as you request.

Configuration file `/etc/acpi/resume.d/80-wicd-connect.sh', does not exist on system.
Installing new config file as you request.

Configuration file `/etc/acpi/suspend.d/50-wicd-suspend.sh', does not exist on system.
Installing new config file as you request.

Configuration file `/etc/wicd/encryption/templates/ttls', does not exist on system.
Installing new config file as you request.

Configuration file `/etc/wicd/encryption/templates/wep-passphrase', does not exist on system.
Installing new config file as you request.

Configuration file `/etc/wicd/encryption/templates/eap', does not exist on system.
Installing new config file as you request.

Configuration file `/etc/wicd/encryption/templates/peap', does not exist on system.
Installing new config file as you request.

Configuration file `/etc/wicd/encryption/templates/eap-tls', does not exist on system.
Installing new config file as you request.

Configuration file `/etc/wicd/encryption/templates/leap', does not exist on system.
Installing new config file as you request.

Configuration file `/etc/wicd/encryption/templates/wpa', does not exist on system.
Installing new config file as you request.

Configuration file `/etc/wicd/encryption/templates/peap-tkip', does not exist on system.
Installing new config file as you request.

Configuration file `/etc/wicd/encryption/templates/wep-hex', does not exist on system.
Installing new config file as you request.

Configuration file `/etc/wicd/encryption/templates/active', does not exist on system.
Installing new config file as you request.

Configuration file `/etc/wicd/encryption/templates/wpa-psk', does not exist on system.
Installing new config file as you request.

Configuration file `/etc/wicd/encryption/templates/wep-shared', does not exist on system.
Installing new config file as you request.
Reloading system message bus config...done.
Starting Network connection manager: wicd.
Processing triggers for man-db ...
=====

At this point the SSH connection is not working anymore and pinging the
Openmoko FR does not work either.  Since I can reproduce this every time
I install wicd on my FreeRunner, I tried again in a screen session.
There, the dpkg process finished correctly, but there is clear a
problem, since the usb0 interface got misconfigured:
=====
debian-gta02:~# ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

debian-gta02:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

debian-gta02:~# cat /etc/resolv.conf
nameserver 208.67.222.222
nameserver 208.67.220.220

debian-gta02:~# ifup usb0
ifup: interface usb0 already configured

debian-gta02:~# ifdown usb0
SIOCDELRT: No such process

debian-gta02:~# ifup usb0

debian-gta02:~# ifconfig
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

usb0      Link encap:Ethernet  HWaddr 76:aa:86:f6:29:73
          inet addr:192.168.0.202  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::74aa:86ff:fef6:2973/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1085 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1028 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:68000 (66.4 KiB)  TX bytes:265455 (259.2 KiB)

debian-gta02:~#
=====

First problem: why wicd wants to manage the usb0 interface?  It is *not*
a WiFi interface (read the whole mail before replying to this point)
nor, according to /usr/share/doc/wicd/README.Debian, it is listed as
"usable" in /etc/network/interfaces:

--8<---------------cut here---------------start------------->8---
wicd for Debian
---------------

If Wicd fails to connect after you install it, make sure that the only 
entry in your /etc/network/interfaces file is

    auto lo
    iface lo inet loopback

You can change the contents of this file by using various editors, but
remember: you have to be root!
--8<---------------cut here---------------end--------------->8---

Indeed, the /etc/network/interfaces for my FR contains more than that:
=====
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# Wireless interfaces
iface eth0 inet dhcp
        wireless-power on
        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

# Ethernet/RNDIS gadget (g_ether)
# ... or on host side, usbnet and random hwaddr
allow-hotplug usb0
iface usb0 inet static
        address 192.168.0.202
        netmask 255.255.255.0
        network 192.168.0.0
        gateway 192.168.0.200
        up echo nameserver 208.67.222.222 >> /etc/resolv.conf
        up echo nameserver 208.67.220.220 >> /etc/resolv.conf

# Bluetooth networking
iface bnep0 inet dhcp

debian-gta02:~#
=====

Second problem: oh, wicd is *both* a wired and wireless connection
manager, so it is normal that it wants to manage the usb0 interface as
well.  However, why should it put every interface down when the daemon
starts?  From /var/log/wicd/wicd.log:

--8<---------------cut here---------------start------------->8---
2009/03/23 13:55:55 :: ---------------------------
2009/03/23 13:55:55 :: wicd initializing...
2009/03/23 13:55:56 :: ---------------------------
2009/03/23 13:55:56 :: Configuration file not found, creating, adding defaults...
2009/03/23 13:55:56 :: Couldn't detect a wireless interface.
2009/03/23 13:55:56 :: automatically detected wired interface usb0
2009/03/23 13:55:56 :: setting wireless interface None
2009/03/23 13:55:57 :: setting wired interface usb0
2009/03/23 13:55:57 :: setting wpa driver wext
2009/03/23 13:55:57 :: Setting dhcp client to 0
2009/03/23 13:55:57 :: setting automatically reconnect when connection drops
2009/03/23 13:55:57 :: setting use global dns to False
2009/03/23 13:55:57 :: setting use global dns to boolean False
2009/03/23 13:55:57 :: setting global dns
2009/03/23 13:55:57 :: global dns servers are None None None
2009/03/23 13:55:57 :: Wireless configuration file not found, creating...
2009/03/23 13:55:58 :: Wired configuration file not found, creating a default...
2009/03/23 13:55:58 :: Creating wired profile for wired-default
2009/03/23 13:55:58 :: chmoding configuration files 0600...
2009/03/23 13:55:58 :: chowning configuration files root:root...
2009/03/23 13:55:58 :: Using wired interface...usb0
2009/03/23 13:55:58 :: Using wireless interface...
2009/03/23 13:55:58 :: WARNING: No supported DHCP Client could be found!
2009/03/23 13:55:58 :: WARNING: No supported DHCP Client could be found!
2009/03/23 13:55:58 :: autoconnecting... 
2009/03/23 13:55:58 :: Putting interface down
2009/03/23 13:55:58 ::  Attempting to autoconnect with wired interface...
2009/03/23 13:55:59 :: Releasing DHCP leases...
--8<---------------cut here---------------end--------------->8---

This is plain wrong, since it breaks every working connections at
installation/start.  The correct behavior should be to check each
interface status and act accordingly.  This however *only* for the
interfaces the admin wants to be managed by wicd: in my case, it is
clear that usb0 does not belong to this group (and IIRC network-manager
would skip it).

FYI and for the sake of completeness, /var/log/wicd/wicd.log continues
with the following lines:

--8<---------------cut here---------------start------------->8---
2009/03/23 13:55:59 :: Exception in thread Thread-1:
2009/03/23 13:55:59 :: Traceback (most recent call last):
2009/03/23 13:55:59 ::   File "/usr/lib/python2.5/threading.py", line 486, in __bootstrap_inner
2009/03/23 13:55:59 ::     self.run()
2009/03/23 13:55:59 ::   File "/usr/share/wicd/wicd/networking.py", line 914, in run
2009/03/23 13:55:59 ::     self.release_dhcp_clients(wiface, liface)
2009/03/23 13:55:59 ::   File "/usr/share/wicd/wicd/networking.py", line 335, in release_dhcp_clients
2009/03/23 13:55:59 ::     liface.ReleaseDHCP()
2009/03/23 13:55:59 ::   File "/usr/share/wicd/wicd/wnettools.py", line 531, in ReleaseDHCP
2009/03/23 13:55:59 ::     cmd = self.DHCP_RELEASE + " " + self.iface + " 2>/dev/null"
2009/03/23 13:55:59 :: TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
2009/03/23 13:55:59 :: 
--8<---------------cut here---------------end--------------->8---

This is normal, since the none of DHCP clients wicd depends on is
installed.  However, this error comes *after* the connection has been
lost, which is the error we are talking here.

Thx, bye,
Gismo / Luca

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: armel (armv4tl)

Kernel: Linux 2.6.29-20090303.gitb9de904e (PREEMPT)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages wicd depends on:
ii  adduser                       3.110      add and remove users and groups
pn  dhcpcd | dhcp3-client | pump  <none>     (no description available)
ii  net-tools                     1.60-23    The NET-3 networking toolkit
ii  python                        2.5.4-2    An interactive high-level object-o
ii  python-dbus                   0.83.0-1   simple interprocess messaging syst
ii  python-glade2                 2.14.1-1   GTK+ bindings: Glade support
ii  python-gtk2                   2.14.1-1   Python bindings for the GTK+ widge
ii  python-support                0.8.7      automated rebuilding support for P
ii  wireless-tools                29-1.1     Tools for manipulating Linux Wirel
ii  wpasupplicant                 0.6.4-3    Client support for WPA and WPA2 (I

wicd recommends no packages.

Versions of packages wicd suggests:
pn  pm-utils                      <none>     (no description available)

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 314 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-fso-maint/attachments/20090323/7864ebc3/attachment.pgp 


More information about the pkg-fso-maint mailing list