Debian Bug report logs - #692413
wicd-daemon: /etc/init.d/wicd stop doesn't kill wpa_supplicant

version graph

Package: wicd-daemon; Maintainer for wicd-daemon is David Paleino <dapal@debian.org>; Source for wicd-daemon is src:wicd.

Reported by: Cyril Brulebois <kibi@debian.org>

Date: Mon, 5 Nov 2012 22:09:01 UTC

Severity: important

Tags: fixed-upstream, upstream

Found in versions wicd/1.7.2.4-2, wicd/1.5.2-1

Forwarded to https://bugs.launchpad.net/bugs/1081718

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, kibi@debian.org, David Paleino <dapal@debian.org>:
Bug#692413; Package wicd-daemon. (Mon, 05 Nov 2012 22:09:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Cyril Brulebois <kibi@debian.org>:
New Bug report received and forwarded. Copy sent to kibi@debian.org, David Paleino <dapal@debian.org>. (Mon, 05 Nov 2012 22:09:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Cyril Brulebois <kibi@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: wicd-daemon: /etc/init.d/wicd stop doesn't kill wpa_supplicant
Date: Mon, 05 Nov 2012 23:05:24 +0100
Package: wicd-daemon
Version: 1.7.2.4-2
Severity: serious
Justification: Fails to stop properly

Hi,

I first noticed it when trying to replace wicd with network-manager:
wicd stop doesn't kill the wpa_supplicant it spawned. Even when one
asks to actually purge the wicd-daemon package. Not good.
| root     16710  0.0  0.0  31084  1268 ?        Ss   22:51   0:00 wpa_supplicant -B -i wlan0 -c /var/lib/wicd/configurations/f4cae5ee62fc -Dwext

This even leads to network-manager's thinking the “device is not
ready” (the wireless one), meaning no network. Really not good.

Workaround:
  sudo killall wpa_supplicant
  sudo /etc/init.d/network-manager restart

Since the tech-ctte believes wicd and NM are on par, one should be
able to switch from one to another with no hassle, right?

Purging network-manager and replacing it with wicd-daemon is a no
brainer.

Mraw,
KiBi.

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages wicd-daemon depends on:
ii  adduser                         3.113+nmu3
ii  dbus                            1.6.8-1
ii  debconf                         1.5.46
ii  iproute                         20120521-3
ii  iputils-ping                    3:20101006-1+b1
ii  isc-dhcp-client [dhcp3-client]  4.2.2.dfsg.1-5+deb70u2
ii  lsb-base                        4.1+Debian7
ii  net-tools                       1.60-24.2
ii  psmisc                          22.19-1
ii  python                          2.7.3~rc2-1
ii  python-dbus                     1.1.1-1
ii  python-gobject                  3.2.2-1
ii  python-wicd                     1.7.2.4-2
ii  wireless-tools                  30~pre9-8
ii  wpasupplicant                   1.0-2

Versions of packages wicd-daemon recommends:
ii  wicd-curses [wicd-client]  1.7.2.4-2
ii  wicd-gtk [wicd-client]     1.7.2.4-2

Versions of packages wicd-daemon suggests:
ii  pm-utils  1.4.1-9

Versions of packages wicd-gtk depends on:
ii  python         2.7.3~rc2-1
ii  python-glade2  2.24.0-3
ii  python-gtk2    2.24.0-3

Versions of packages wicd-gtk recommends:
ii  gksu           2.0.2-6
ii  python-notify  0.1.1-3

Versions of packages wicd-curses depends on:
ii  python        2.7.3~rc2-1
ii  python-urwid  1.0.1-2

Versions of packages wicd-curses recommends:
ii  sudo  1.8.5p2-1

Versions of packages python-wicd depends on:
ii  python     2.7.3~rc2-1
ii  python2.6  2.6.8-0.2
ii  python2.7  2.7.3~rc2-2.1

-- debconf information excluded



Information forwarded to debian-bugs-dist@lists.debian.org, David Paleino <dapal@debian.org>:
Bug#692413; Package wicd-daemon. (Wed, 21 Nov 2012 13:33:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Edmondson <dme@dme.org>:
Extra info received and forwarded to list. Copy sent to David Paleino <dapal@debian.org>. (Wed, 21 Nov 2012 13:33:10 GMT) Full text and rfc822 format available.

Message #10 received at 692413@bugs.debian.org (full text, mbox):

From: David Edmondson <dme@dme.org>
To: 692413@bugs.debian.org
Subject: proposed fix
Date: Wed, 21 Nov 2012 13:29:59 +0000
[Message part 1 (text/plain, inline)]
The wicd daemon doesn't currently disconnect any active links when it
terminates. Doing so results in wpa-supplicant being correctly stopped.

Attached is a proposed patch (I've also uploaded a build of the package
to mentors.debian.net).

I'm very new to Debian packaging and workflow, so please review
carefully and give relevant feedback!
[0001-Disconnect-any-active-links-when-the-daemon-terminat.patch (text/x-diff, inline)]
From bc568d2e7158b27fd49e55217720c340a7532100 Mon Sep 17 00:00:00 2001
From: David Edmondson <dme@dme.org>
Date: Tue, 20 Nov 2012 13:49:32 +0000
Subject: [PATCH] Disconnect any active links when the daemon terminates.

---
 debian/changelog                                |    7 +++++++
 debian/patches/33-disconnect-on-terminate.patch |   12 ++++++++++++
 debian/patches/series                           |    1 +
 3 files changed, 20 insertions(+)
 create mode 100644 debian/patches/33-disconnect-on-terminate.patch

diff --git a/debian/changelog b/debian/changelog
index 1e0c95c..909f0c4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+wicd (1.7.2.4-4.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Disconnect any active links when the daemon terminates (Closes: #692413)
+
+ -- David Edmondson <dme@dme.org>  Wed, 21 Nov 2012 13:16:05 +0000
+
 wicd (1.7.2.4-4) unstable; urgency=low
 
   * Move user-adding code from debconf-config to wicd-daemon postinst
diff --git a/debian/patches/33-disconnect-on-terminate.patch b/debian/patches/33-disconnect-on-terminate.patch
new file mode 100644
index 0000000..79741cf
--- /dev/null
+++ b/debian/patches/33-disconnect-on-terminate.patch
@@ -0,0 +1,12 @@
+Disconnect any active links when the daemon terminates.
+--- a/wicd/wicd-daemon.py
++++ b/wicd/wicd-daemon.py
+@@ -814,7 +814,7 @@
+     @dbus.service.signal(dbus_interface='org.wicd.daemon', signature='')
+     def DaemonClosing(self):
+         """ Emits a signal indicating the daemon will be closing. """
+-        pass
++        self.Disconnect()
+ 
+     @dbus.service.method('org.wicd.daemon', in_signature='uav')
+     def EmitStatusChanged(self, state, info):
diff --git a/debian/patches/series b/debian/patches/series
index d6f65fb..304452c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@
 04-fix_resolv.conf_backup-restore.patch
 26-support_etc-network_scripts.patch
 32-prefer_gksu.patch
+33-disconnect-on-terminate.patch
-- 
1.7.10.4

[Message part 3 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, David Paleino <dapal@debian.org>:
Bug#692413; Package wicd-daemon. (Wed, 21 Nov 2012 16:45:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to dapal@debian.org:
Extra info received and forwarded to list. Copy sent to David Paleino <dapal@debian.org>. (Wed, 21 Nov 2012 16:45:04 GMT) Full text and rfc822 format available.

Message #15 received at 692413@bugs.debian.org (full text, mbox):

From: David Paleino <dapal@debian.org>
To: David Edmondson <dme@dme.org>
Cc: 692413@bugs.debian.org
Subject: Re: Bug#692413: proposed fix
Date: Wed, 21 Nov 2012 17:41:04 +0100
[Message part 1 (text/plain, inline)]
tags 692413 upstream
severity 692413 important
thanks

On Wed, 21 Nov 2012 13:29:59 +0000, David Edmondson wrote:

> The wicd daemon doesn't currently disconnect any active links when it
> terminates. Doing so results in wpa-supplicant being correctly stopped.
> 
> Attached is a proposed patch (I've also uploaded a build of the package
> to mentors.debian.net).

The patch is not appropriate. It might work, but that's not the right place to
stop a connection. Just FYI, the appropriate place should be at the end of
main(), just before the DaemonClosing signal is emit.

Besides that, I don't consider this to be a bug. Rather, I consider it a feature
-- being able to replace/restart/... wicd while still keeping a connection
alive.
I have thought about doing so since its filing, but I just wanted to think more
about it, and now it comes: I'm downgrading this bug's severity.

I do understand KiBi's reasons -- even though I *do* *not* consider his wording
appropriate or fair at all -- and I could consider adding a separate
command-line option to the daemon (to keep the connection alive) and changing
the current default. But this surely is _not_ RC IMHO.

Kindly,
David

-- 
 . ''`.   Debian developer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://deb.li/dapal
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
[signature.asc (application/pgp-signature, attachment)]

Added tag(s) upstream. Request was from David Paleino <dapal@debian.org> to control@bugs.debian.org. (Wed, 21 Nov 2012 16:45:05 GMT) Full text and rfc822 format available.

Severity set to 'important' from 'serious' Request was from David Paleino <dapal@debian.org> to control@bugs.debian.org. (Wed, 21 Nov 2012 16:45:06 GMT) Full text and rfc822 format available.

Marked as found in versions wicd/1.5.2-1. Request was from David Paleino <dapal@debian.org> to control@bugs.debian.org. (Wed, 21 Nov 2012 16:48:03 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, David Paleino <dapal@debian.org>:
Bug#692413; Package wicd-daemon. (Wed, 21 Nov 2012 16:54:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to dapal@debian.org:
Extra info received and forwarded to list. Copy sent to David Paleino <dapal@debian.org>. (Wed, 21 Nov 2012 16:54:07 GMT) Full text and rfc822 format available.

Message #26 received at 692413@bugs.debian.org (full text, mbox):

From: David Paleino <dapal@debian.org>
To: David Edmondson <dme@dme.org>
Cc: 692413@bugs.debian.org
Subject: Re: Bug#692413: proposed fix
Date: Wed, 21 Nov 2012 17:52:06 +0100
[Message part 1 (text/plain, inline)]
On Wed, 21 Nov 2012 13:29:59 +0000, David Edmondson wrote:

> Attached is a proposed patch (I've also uploaded a build of the package
> to mentors.debian.net).

Actually, probably that's the best place, thanks for your patch, I'll consider
it.

(my other arguments still apply)

-- 
 . ''`.   Debian developer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://deb.li/dapal
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, David Paleino <dapal@debian.org>:
Bug#692413; Package wicd-daemon. (Wed, 21 Nov 2012 17:00:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Edmondson <dme@dme.org>:
Extra info received and forwarded to list. Copy sent to David Paleino <dapal@debian.org>. (Wed, 21 Nov 2012 17:00:08 GMT) Full text and rfc822 format available.

Message #31 received at 692413@bugs.debian.org (full text, mbox):

From: David Edmondson <dme@dme.org>
To: David Paleino <dapal@debian.org>
Cc: 692413@bugs.debian.org
Subject: Re: Bug#692413: proposed fix
Date: Wed, 21 Nov 2012 16:58:31 +0000
[Message part 1 (text/plain, inline)]
On Wed, Nov 21 2012, David Paleino wrote:
> On Wed, 21 Nov 2012 13:29:59 +0000, David Edmondson wrote:
>
>> The wicd daemon doesn't currently disconnect any active links when it
>> terminates. Doing so results in wpa-supplicant being correctly stopped.
>> 
>> Attached is a proposed patch (I've also uploaded a build of the package
>> to mentors.debian.net).
>
> The patch is not appropriate. It might work, but that's not the right place to
> stop a connection. Just FYI, the appropriate place should be at the end of
> main(), just before the DaemonClosing signal is emit.

Understood.

> Besides that, I don't consider this to be a bug. Rather, I consider it a feature
> -- being able to replace/restart/... wicd while still keeping a connection
> alive.

Whilst not deeply passionate about it, I disagree. Stopping the daemon
should revert the system to the state it was in before starting, else
the originally described scenario is difficult to avoid. How does an
upgrade of the wicd daemon avoid this problem?

And, if you don't believe that this is a bug, shouldn't it be closed as
such rather than simply downgraded in severity?

> I have thought about doing so since its filing, but I just wanted to think more
> about it, and now it comes: I'm downgrading this bug's severity.

I'd agree - it doesn't seem like something to stop the release.

> I do understand KiBi's reasons -- even though I *do* *not* consider his wording
> appropriate or fair at all -- and I could consider adding a separate
> command-line option to the daemon (to keep the connection alive) and changing
> the current default. But this surely is _not_ RC IMHO.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, David Paleino <dapal@debian.org>:
Bug#692413; Package wicd-daemon. (Wed, 21 Nov 2012 17:18:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to dapal@debian.org:
Extra info received and forwarded to list. Copy sent to David Paleino <dapal@debian.org>. (Wed, 21 Nov 2012 17:18:05 GMT) Full text and rfc822 format available.

Message #36 received at 692413@bugs.debian.org (full text, mbox):

From: David Paleino <dapal@debian.org>
To: David Edmondson <dme@dme.org>
Cc: 692413@bugs.debian.org
Subject: Re: Bug#692413: proposed fix
Date: Wed, 21 Nov 2012 18:14:55 +0100
[Message part 1 (text/plain, inline)]
On Wed, 21 Nov 2012 16:58:31 +0000, David Edmondson wrote:

> On Wed, Nov 21 2012, David Paleino wrote:
> > Besides that, I don't consider this to be a bug. Rather, I consider it a
> > feature -- being able to replace/restart/... wicd while still keeping a
> > connection alive.
> 
> Whilst not deeply passionate about it, I disagree. Stopping the daemon
> should revert the system to the state it was in before starting, else
> the originally described scenario is difficult to avoid. How does an
> upgrade of the wicd daemon avoid this problem?

The described scenario is that NM *thinks* there is no network, when there
actually is.
When WICD upgrades, it's able to detect that a network link is alive, so this
problem doesn't exist at all.

Last time (years ago) I installed wicd while using NM, it detected the
connection status fine (yes, it wasn't able to properly manage it, because it
was started by NM). Honestly, I don't know whether this is still the case.

> And, if you don't believe that this is a bug, shouldn't it be closed as
> such rather than simply downgraded in severity?

Because _I_ don't consider it a bug, but I understand it's questionable.

As I said, this bug isn't release-critical to me. I already prepared a commit,
and I'm currently testing it -- this will certainly be in the next upstream
release (1.7.3).

Kindly,
David

-- 
 . ''`.   Debian developer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://deb.li/dapal
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, David Paleino <dapal@debian.org>:
Bug#692413; Package wicd-daemon. (Wed, 21 Nov 2012 18:03:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to dapal@debian.org:
Extra info received and forwarded to list. Copy sent to David Paleino <dapal@debian.org>. (Wed, 21 Nov 2012 18:03:03 GMT) Full text and rfc822 format available.

Message #41 received at 692413@bugs.debian.org (full text, mbox):

From: David Paleino <dapal@debian.org>
To: David Edmondson <dme@dme.org>
Cc: 692413@bugs.debian.org
Subject: Re: Bug#692413: proposed fix
Date: Wed, 21 Nov 2012 19:01:10 +0100
[Message part 1 (text/plain, inline)]
tags 692413 fixed-upstream
thanks

FYI,

  http://bazaar.launchpad.net/~wicd-devel/wicd/experimental/revision/851

David

-- 
 . ''`.   Debian developer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://deb.li/dapal
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
[signature.asc (application/pgp-signature, attachment)]

Added tag(s) fixed-upstream. Request was from David Paleino <dapal@debian.org> to control@bugs.debian.org. (Wed, 21 Nov 2012 18:03:05 GMT) Full text and rfc822 format available.

Set Bug forwarded-to-address to 'https://bugs.launchpad.net/bugs/1081718'. Request was from David Paleino <dapal@debian.org> to control@bugs.debian.org. (Wed, 21 Nov 2012 18:36:05 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 11:05:01 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.