Bug 617354 - Wireless disconnects
Wireless disconnects
Status: CLOSED DUPLICATE of bug 590874
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
13
All Linux
low Severity medium
: ---
: ---
Assigned To: Dan Williams
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-22 15:50 EDT by Steve Chapel
Modified: 2010-10-07 00:41 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-10-07 00:41:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
dmesg output (51.04 KB, text/plain)
2010-07-24 08:32 EDT, Steve Chapel
no flags Details
dmesg output (61.63 KB, text/plain)
2010-07-27 09:34 EDT, Steve Chapel
no flags Details
/var/log/messages with debug info (646.86 KB, application/x-bzip)
2010-08-09 09:10 EDT, Steve Chapel
no flags Details

  None (edit)
Description Steve Chapel 2010-07-22 15:50:31 EDT
Description of problem:

About once a day, my wireless becomes disconnected. With the same laptop and router and physical configuration, Fedora 11 did not exhibit this problem. I have a Lenovo ThinkPad SL500 and Netgear WGR614.

Additional info:

The following two additional lines appeared in dmesg output after the wireless disconnected:

mac80211-phy0: failed to remove key (0, 00:1e:2a:52:dc:d2) from hardware (-22)
wlan0: deauthenticating from 00:1e:2a:52:dc:d2 by local choice (reason=3)
Comment 1 Stanislaw Gruszka 2010-07-23 07:02:33 EDT
(In reply to comment #0)
> mac80211-phy0: failed to remove key (0, 00:1e:2a:52:dc:d2) from hardware (-22)
> wlan0: deauthenticating from 00:1e:2a:52:dc:d2 by local choice (reason=3)    

These messages are clearly not enaught to tell where the problem is. I will prepare kernel which print more verbose debug messages.
Comment 2 Stanislaw Gruszka 2010-07-23 08:54:00 EDT
Run this kernel and attach dmesg when network disconnects:
http://koji.fedoraproject.org/koji/taskinfo?taskID=2346530
Comment 3 Steve Chapel 2010-07-23 19:10:42 EDT
The output from dmesg after the wireless disconnected and I manually reconnected:

Monitor-Mwait will be used to enter C-2 state
Monitor-Mwait will be used to enter C-3 state
mac80211-phy0: failed to remove key (0, 00:1e:2a:52:dc:d2) from hardware (-22)
phy0: Removed STA 00:1e:2a:52:dc:d2
phy0: Destroyed STA 00:1e:2a:52:dc:d2
wlan0: deauthenticating from 00:1e:2a:52:dc:d2 by local choice (reason=3)
phy0: device now idle
phy0: device no longer idle - scanning
phy0: device now idle
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: Calling CRDA for country: US
cfg80211: Regulatory domain changed to country: US
    (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
    (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
    (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
phy0: device no longer idle - scanning
phy0: device now idle
phy0: device no longer idle - scanning
wlan0: deauthenticating from 00:1e:2a:52:dc:d2 by local choice (reason=3)
wlan0: authenticate with 00:1e:2a:52:dc:d2 (try 1)
wlan0: authenticated
phy0: device now idle
phy0: device no longer idle - working
wlan0: associate with 00:1e:2a:52:dc:d2 (try 1)
wlan0: RX AssocResp from 00:1e:2a:52:dc:d2 (capab=0x411 status=0 aid=1)
wlan0: associated
phy0: Allocated STA 00:1e:2a:52:dc:d2
phy0: Inserted STA 00:1e:2a:52:dc:d2

In the hours before the wireless disconnected, this output appears in dmesg:

wlan0: detected beacon loss from AP - sending probe request
wlan0: detected beacon loss from AP - sending probe request
wlan0: detected beacon loss from AP - sending probe request
wlan0: detected beacon loss from AP - sending probe request
wlan0: detected beacon loss from AP - sending probe request
wlan0: detected beacon loss from AP - sending probe request

To clarify, several hours elapsed between the last 'sending probe request' message and when the wireless disconnected.
Comment 4 Stanislaw Gruszka 2010-07-24 04:49:04 EDT
Please provide full dmesg, not only fragments (preferred as attachment of MIME Type: text/plain).
Comment 5 Steve Chapel 2010-07-24 08:32:45 EDT
Created attachment 434134 [details]
dmesg output
Comment 6 Stanislaw Gruszka 2010-07-24 09:22:28 EDT
I think you are using some wireless authentication method with dynamic key generation. For some unknown reason driver is unable to remove old key from hardware, and because of that wpa_supplicant disconnects. If suppose is correct, disabling hardware cryptography offload should prevent problem. Please check if swcrypto50=1 option helps:

$ echo options iwlagn swcrypto50=1 >> /etc/modprobe.d/options
$ rmmod iwlagn
$ modprobe iwlagn
Comment 7 Steve Chapel 2010-07-27 09:34:32 EDT
Created attachment 434689 [details]
dmesg output

After adding the swcrypto50=1 option, I had another disconnect and I had to manually reconnect. Attached is the latest dmesg output from before manually reconnecting.
Comment 8 Stanislaw Gruszka 2010-07-28 07:42:05 EDT
As far as I can see  kernel/driver does not disconnect by itself, disconnect request comes for outside (NetworkManager or wpa_supplicant).

Please do:

* Disable network daemons
> [root@dhcp-27-172 ~]# /etc/init.d/NetworkManager stop
> Stopping NetworkManager daemon:                            [  OK  ]
> [root@dhcp-27-172 ~]# /etc/init.d/wpa_supplicant stop
> Stopping wpa_supplicant:                                   [  OK  ]

* Change below line in /etc/sysconfig/wpa_supplicant file to have verbose debug in "messages" file
> OTHER_ARGS="-u -f /var/log/messages -dd -P /var/run/wpa_supplicant.pid"

* Change below line in /etc/init.d/NetworkManager file to increase verbosity
> daemon --pidfile $pidfile --check $servicename $processname --pid-file=$pidfile --log-level=DEBUG

* Change below line in /etc/rsyslog.conf file to log all kernel messages to "/var/log/messages"
> kern.*;*.info;mail.none;authpriv.none;cron.none                /var/log/messages

* Restart syslog deamon
> [root@dhcp-27-172 ~]# /etc/init.d/rsyslog restart

* Save "messages" file (just for case you will need it) and clean it  
> [root@dhcp-27-172 ~]# cp /var/log/messages /var/log/messages.old 
> [root@dhcp-27-172 log]# echo > /var/log/messages

* Run network daemons again
> [root@dhcp-27-172 ~]# /etc/init.d/wpa_supplicant start
> Starting wpa_supplicant: /etc/wpa_supplicant/wpa_supplicant[  OK  ] 
> [root@dhcp-27-172 ~]# /etc/init.d/NetworkManager start
> Setting network parameters...                              [  OK  ]
> Starting NetworkManager daemon:                            [  OK  ]

When network disconnects, attach /var/log/messages file. If file will be big you can compress it, or cut it and attach only the latest (valuable) messages.
Comment 9 Steve Chapel 2010-08-09 09:10:41 EDT
Created attachment 437589 [details]
/var/log/messages with debug info
Comment 10 Stanislaw Gruszka 2010-08-16 06:06:29 EDT
> Aug  9 08:02:23 laptop dhclient[10138]: DHCPREQUEST on wlan0 to 192.168.1.1 port 67
> Aug  9 08:02:23 laptop dhclient[10138]: DHCPNAK from 192.168.1.1
> Aug  9 08:02:23 laptop NetworkManager[10134]: <info> (wlan0): DHCPv4 state changed reboot -> expire
> Aug  9 08:02:23 laptop NetworkManager[10134]: <debug> [1281355343.70085] [nm-device.c:1373] dhcp_state_changed(): (wlan0): new DHCPv4 client state 8
> Aug  9 08:02:23 laptop NetworkManager[10134]: <info> (wlan0): device state change: 8 -> 9 (reason 6)
> Aug  9 08:02:23 laptop NetworkManager[10134]: <warn> Activation (wlan0) failed for access point (4452lakeside)
> Aug  9 08:02:23 laptop NetworkManager[10134]: <info> Marking connection 'Auto 4452lakeside' invalid because IP configuration expired.
> Aug  9 08:02:23 laptop NetworkManager[10134]: <warn> Activation (wlan0) failed.
> Aug  9 08:02:23 laptop NetworkManager[10134]: <debug> [1281355343.72382] [nm-device.c:3600] failed_to_disconnected(): (wlan0): running failed->disconnected transition
> Aug  9 08:02:23 laptop NetworkManager[10134]: <info> (wlan0): device state change: 9 -> 3 (reason 0)
> Aug  9 08:02:23 laptop NetworkManager[10134]: <info> (wlan0): deactivating device (reason: 0).
> Aug  9 08:02:23 laptop NetworkManager[10134]: <info> (wlan0): canceled DHCP transaction, DHCP client pid 10138
> Aug  9 08:02:23 laptop NetworkManager[10134]: <error> [1281355343.281808] [nm-system.c:1229] check_one_route(): (wlan0): error -34 returned from rtnl_route_del(): Netlink Error (errno = Numerical resul
> t out of range)
> Aug  9 08:02:23 laptop kernel: phy0: Removed STA 00:1e:2a:52:dc:d2
> Aug  9 08:02:23 laptop kernel: phy0: Destroyed STA 00:1e:2a:52:dc:d2
> Aug  9 08:02:23 laptop kernel: wlan0: deauthenticating from 00:1e:2a:52:dc:d2 by local choice (reason=3)
> Aug  9 08:02:23 laptop kernel: phy0: device now idle
> Aug  9 08:02:23 laptop kernel: phy0: device no longer idle - scanning

Looks DHCP lease (duration when IP address from DHCP server is valid) timed out. Then we get DHCPNAK from DHCP server. I think reason of NAK if that we send request with our old IP address, which for some reason DHCP serwer do not want reallocate to us again. Network manager in that case disconnect from AP completely. Whereas it should only reconfigure IP address for interface - DHCP client should send DHCPREQUEST with null CIADDR (Client IP Address) or start DHCP transaction from scratch by sending DHCPDISCOVER.

This is NetworkManager or dhcpclient problem, IMHO looks more like NM bug, reassigning to NM
Comment 11 Dan Williams 2010-10-07 00:41:25 EDT
This behavior was fixed on Jul 27 upstream and was included in the NM 0.8.1-4 update.

*** This bug has been marked as a duplicate of bug 590874 ***

Note You need to log in before you can comment on or make changes to this bug.