Debian Bug report logs - #692414
network-manager: /etc/init.d/network-manager stop leaves wpa_supplicant behind

version graph

Package: network-manager; Maintainer for network-manager is Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>; Source for network-manager is src:network-manager.

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

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

Severity: important

Found in version network-manager/0.9.4.0-6

Done: Michael Biebl <biebl@debian.org>

Bug is archived. No further changes may be made.

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, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#692414; Package network-manager. (Mon, 05 Nov 2012 22:30: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, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Mon, 05 Nov 2012 22:30: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: network-manager: /etc/init.d/network-manager stop leaves wpa_supplicant behind
Date: Mon, 05 Nov 2012 23:27:22 +0100
Package: network-manager
Version: 0.9.4.0-6
Severity: important

Hi,

“/etc/init.d/network-manager stop” indeed drop all networking,
but the wpa_supplicant instance it spawned is left behind. Not a
practical issue when e.g. switching to wicd, but still not nice.
| root      7820  0.0  0.0  31212  3156 ?        S    23:18   0:00 /sbin/wpa_supplicant -u -s -O /var/run/wpa_supplicant

The good news is that one gets reused (there's no second one
started) when network-manager is started again.

See #692413 for the other way around.

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-3-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 network-manager depends on:
ii  adduser                3.113+nmu3
ii  dbus                   1.6.8-1
ii  dpkg                   1.16.9
ii  isc-dhcp-client        4.2.2.dfsg.1-5+deb70u2
ii  libc6                  2.13-35
ii  libdbus-1-3            1.6.8-1
ii  libdbus-glib-1-2       0.100-1
ii  libgcrypt11            1.5.0-3
ii  libglib2.0-0           2.33.12+really2.32.4-2
ii  libgnutls26            2.12.20-1
ii  libgudev-1.0-0         175-7
ii  libnl-3-200            3.2.7-4
ii  libnl-genl-3-200       3.2.7-4
ii  libnl-route-3-200      3.2.7-4
ii  libnm-glib4            0.9.4.0-6
ii  libnm-util2            0.9.4.0-6
ii  libpolkit-gobject-1-0  0.105-1
ii  libuuid1               2.20.1-5.2
ii  lsb-base               4.1+Debian7
ii  udev                   175-7
ii  wpasupplicant          1.0-2

Versions of packages network-manager recommends:
ii  crda          1.1.2-1
ii  dnsmasq-base  2.62-3
ii  iptables      1.4.14-3
ii  modemmanager  0.5.2.0-2
ii  policykit-1   0.105-1
ii  ppp           2.4.5-5.1+b1

Versions of packages network-manager suggests:
ii  avahi-autoipd  0.6.31-1

-- no debconf information



Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#692414; Package network-manager. (Tue, 06 Nov 2012 13:21:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Biebl <biebl@debian.org>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Tue, 06 Nov 2012 13:21:08 GMT) Full text and rfc822 format available.

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

From: Michael Biebl <biebl@debian.org>
To: Cyril Brulebois <kibi@debian.org>, 692414@bugs.debian.org
Subject: Re: [Pkg-utopia-maintainers] Bug#692414: network-manager: /etc/init.d/network-manager stop leaves wpa_supplicant behind
Date: Tue, 06 Nov 2012 14:10:33 +0100
[Message part 1 (text/plain, inline)]
Heya,

On 05.11.2012 23:27, Cyril Brulebois wrote:
> 
> “/etc/init.d/network-manager stop” indeed drop all networking,
> but the wpa_supplicant instance it spawned is left behind. Not a
> practical issue when e.g. switching to wicd, but still not nice.
> | root      7820  0.0  0.0  31212  3156 ?        S    23:18   0:00 /sbin/wpa_supplicant -u -s -O /var/run/wpa_supplicant
> 
> The good news is that one gets reused (there's no second one
> started) when network-manager is started again.
> 
> See #692413 for the other way around.

The case for wicd (#692413) is not quite comparable.
wicd explicitly starts an own wpasupplicant instance with a (temporay)
config file and controls that instance. That instance is not usable by
e.g. NM so wicd needs to make sure to correctly terminate that service.

With NM it is different as it simply uses the wpa_supplicant D-Bus
interface and relies on D-Bus activation to start the service on-demand.
It controls wpa_supplicant via D-Bus and not a temporary config file.
So when NM is stopped, the wpa_supplicant service is still usable by
other services.

NM also makes use of other D-Bus (activated) services, like polkitd or
modem-manager. Stopping those in the sysv init script is not safe
as you don't know if those service were actually started by you or if
not another application has requested that D-Bus service.

Ideally, wicd would just use D-Bus interface of wpa_supplicant to
control the service.
This way it could simply use the already running wpa_supplicant instance
when NM is stopped and wicd started.

In contrast to that: NM can use dnsmasq to handle name resolution. For
that it explicitly starts an own instance of dnsmasq which it controls
via a temporary config file.
When NM is stopped it automatically terminates that service.

So in summary: I think the current behaviour of NM is not actually buggy
wrt D-Bus activated services.

Cheers,
Michael


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#692414; Package network-manager. (Tue, 06 Nov 2012 13:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Cyril Brulebois <kibi@debian.org>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Tue, 06 Nov 2012 13:30:03 GMT) Full text and rfc822 format available.

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

From: Cyril Brulebois <kibi@debian.org>
To: Michael Biebl <biebl@debian.org>
Cc: 692414@bugs.debian.org
Subject: Re: [Pkg-utopia-maintainers] Bug#692414: network-manager: /etc/init.d/network-manager stop leaves wpa_supplicant behind
Date: Tue, 6 Nov 2012 14:28:19 +0100
[Message part 1 (text/plain, inline)]
Heya,

Michael Biebl <biebl@debian.org> (06/11/2012):
> So in summary: I think the current behaviour of NM is not actually
> buggy wrt D-Bus activated services.

in which case, feel free to close this bug report; I didn't have any
specific knowledge in this area, but I wanted to make sure this
behaviour was known/reported (since that's what I did in the wicd case).

Mraw,
KiBi.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#692414; Package network-manager. (Tue, 06 Nov 2012 13:33:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Biebl <biebl@debian.org>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Tue, 06 Nov 2012 13:33:03 GMT) Full text and rfc822 format available.

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

From: Michael Biebl <biebl@debian.org>
To: Cyril Brulebois <kibi@debian.org>, 692414@bugs.debian.org
Subject: Re: [Pkg-utopia-maintainers] Bug#692414: network-manager: /etc/init.d/network-manager stop leaves wpa_supplicant behind
Date: Tue, 06 Nov 2012 14:31:23 +0100
[Message part 1 (text/plain, inline)]
On 06.11.2012 14:10, Michael Biebl wrote:
> So in summary: I think the current behaviour of NM is not actually buggy
> wrt D-Bus activated services.

A few further remarks:
When NM is stopped, it properly deconfigures the wireless interface in
wpa_supplicant.
So if you later on use wicd or ifupdown, you should be able to start
another wpa_supplicant instance. The D-Bus activated one should just do
nothing.

I tried this:
# /etc/init.d/network-manager stop

# ps aux | grep wpa_supplicant
root      1372  0.0  0.0  31224  3096 ?        Ss   Nov05   0:00
/sbin/wpa_supplicant -u -s -O /var/run/wpa_supplicant

# setup /e/n/i

# ifup wlan0

# ps aux | grep wpa_supplicant
root      1372  0.0  0.0  31224  3096 ?        Ss   Nov05   0:00
/sbin/wpa_supplicant -u -s -O /var/run/wpa_supplicant
root     21574  0.0  0.0  39632  1456 ?        Ss   14:26   0:00
/sbin/wpa_supplicant -s -B -P /var/run/wpa_supplicant.wlan0.pid -i wlan0
-W -D nl80211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf

Seems to work fine.




-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#692414; Package network-manager. (Tue, 06 Nov 2012 13:45:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Cyril Brulebois <kibi@debian.org>:
Extra info received and forwarded to list. Copy sent to Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Tue, 06 Nov 2012 13:45:05 GMT) Full text and rfc822 format available.

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

From: Cyril Brulebois <kibi@debian.org>
To: Michael Biebl <biebl@debian.org>
Cc: 692414@bugs.debian.org
Subject: Re: [Pkg-utopia-maintainers] Bug#692414: network-manager: /etc/init.d/network-manager stop leaves wpa_supplicant behind
Date: Tue, 6 Nov 2012 14:43:14 +0100
[Message part 1 (text/plain, inline)]
Michael Biebl <biebl@debian.org> (06/11/2012):
> When NM is stopped, it properly deconfigures the wireless interface in
> wpa_supplicant.
> So if you later on use wicd or ifupdown, you should be able to start
> another wpa_supplicant instance. The D-Bus activated one should just do
> nothing.

Indeed, I covered that part in the wicd bug report I pointed to:
migrating from N-M to wicd works fine.

Mraw,
KiBi.
[signature.asc (application/pgp-signature, inline)]

Reply sent to Michael Biebl <biebl@debian.org>:
You have taken responsibility. (Fri, 09 Nov 2012 22:57:07 GMT) Full text and rfc822 format available.

Notification sent to Cyril Brulebois <kibi@debian.org>:
Bug acknowledged by developer. (Fri, 09 Nov 2012 22:57:07 GMT) Full text and rfc822 format available.

Message #30 received at 692414-done@bugs.debian.org (full text, mbox):

From: Michael Biebl <biebl@debian.org>
To: Cyril Brulebois <kibi@debian.org>, 692414-done@bugs.debian.org
Subject: Re: [Pkg-utopia-maintainers] Bug#692414: Bug#692414: network-manager: /etc/init.d/network-manager stop leaves wpa_supplicant behind
Date: Fri, 09 Nov 2012 23:55:47 +0100
[Message part 1 (text/plain, inline)]
Hi,

On 06.11.2012 14:28, Cyril Brulebois wrote:
> 
> Michael Biebl <biebl@debian.org> (06/11/2012):
>> So in summary: I think the current behaviour of NM is not actually
>> buggy wrt D-Bus activated services.
> 
> in which case, feel free to close this bug report; I didn't have any

Ok, doing so.

Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

[signature.asc (application/pgp-signature, attachment)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 08 Dec 2012 07:25:39 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: Sat Apr 19 00:46: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.