[arch-general] [wpa_actiond 1.4] slow disconnects

Leonid Isaev lisaev at umail.iu.edu
Fri Mar 8 14:11:52 EST 2013


On Wed, 06 Mar 2013 19:19:16 +0100
Thomas Bächler <thomas at archlinux.org> wrote:

> Am 05.03.2013 16:44, schrieb Pali Rohár:
> > Hello,
> > 
> > On Tuesday 05 March 2013 10:23:24 Thomas Bächler wrote:
> >> Am 04.03.2013 21:26, schrieb Leonid Isaev:
> >>> Hi,
> >>>
> >>> With testing/wpa_actiond-1.4 I am having a minor problem
> >>> when shutting down net-auto-wireless.service: 'systemctl
> >>> stop net-auto-wireless.service' pauses for ~10sec before
> >>> finally disconnecting. Of course, this also occurs on
> >>> normal system poweroff (which is usually ~5sec). The wifi
> >>> network is WPA "enterprise" (important entries in
> >>> wpa_supplicant.conf: key_mgmt=WPA-EAP; eap=PEAP;
> >>> phase1="peaplabel=0"; phase2="auth=MSCHAPV2"), and piece of
> >>
> >>> daemon.log after the above delay has elapsed:
> >> I've seen this too, but I didn't determine yet that is was
> >> wpa_actiond's fault. There are several issues here:
> >>
> >> 1) I am unsure what exactly terminates wpa_actiond.
> > 
> > Before my patches wpa_actiond could be terminated only by 
> > KILL/TERM signals or correct "terminate" event from 
> > wpa_supplicant. wpa_supplicant sending terminate event only if 
> > wpa_supplcant is stopped regulary (when wpa_supplicant is killed 
> > by KILL no terminate event is sent!). With my patches wpa_actiond 
> > is also terminated when wpa_supplicant is KILLed.
> > 
> >> 2) net-auto-wireless.service is Type=forking, but has no
> >> proper MainPID detected, so systemd doesn't know what exactly
> >> to kill.
> >>
> >> This change however seems to be related to Pali's changed, so
> >> I'm CC'ing him to see if he knows what this might be about.
> > 
> > You can always stop wpa_actiond with KILL or TERM signals. I did 
> > not removed any code which handling stopping wpa_actiond. I only 
> > added another check if wpa_actiond should exit.
> > 
> > So my patches should not change behaviour of stopping 
> > wpa_actiond. Problem is maybe in blackbox which starting and 
> > stoppping wpa_actiond. I'm not using that systemd and this is 
> > another reason against it. Not easy to understand and debug this 
> > problem.
> > 
> > I tested my patches on my system without systemd and wpa_actiond 
> > working without problem. Really I cannot help you with blackbox 
> > which I not using...
> 
> This may even be related to the way netcfg stops wpa_actiond (it doesn't
> - it only stops wpa_supplicant). One can probably debug this easily by
> making wpa_actiond more verbose.
> 
> 

Turns out you were right. What probably happens is that wpa_supplicant dies,
ctrl sockets in /run/wpa_supplicant disappear and wpa_actiond dies after some
timeout (our network has a grid of APs with varying signal
strength/capabilities, so delays slightly depended on the AP). If wpa_ctrl
part in wpa_actiond is copied from wpa_supplicant/hostapd, this must be a new
thing in 2.0.

For me, sending a -term signal to wpa_actiond in netctl-auto stop (kill -term
$(<$PIDFILE)) makes stops/restarts almost instantaneous. In any case, one
should probably stop wpa_actiond before wpa_supplicant regardless of any
possible issues.

I'll send an email regarding netctl to arch-projects, but this should also be
fixed in netcfg...

Thanks,
-- 
Leonid Isaev
GnuPG key: 0x164B5A6D
Fingerprint: C0DF 20D0 C075 C3F1 E1BE  775A A7AE F6CB 164B 5A6D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/arch-general/attachments/20130308/9693172e/attachment.asc>


More information about the arch-general mailing list