After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 753971 - Huge log spam when a secondary wireless interface is added for the same hardware
Huge log spam when a secondary wireless interface is added for the same hardware
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: Wi-Fi
1.0.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-08-22 21:15 UTC by Peter Wu
Modified: 2015-11-30 14:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Peter Wu 2015-08-22 21:15:19 UTC
When a new interface is added, NetworkManager is getting crazy about it. Could be related to bug 751269. Adding the interface name to unmanaged-devices in NetworkManager.conf hides the issue, but then I cannot use NM to control it.

How to reproduce:

 1. Have an existing interface (say, wlan0) connected in station mode.
 2. Add a new interface (iw wlan0 add interface type managed). (Alternative mode: add an interface for monitor mode)

Expected result:
Network Manager sees a new interface and should not try to change its type if it is equal to "monitor" or "managed". Alternatively (or in addition), it should stop retrying after a number of failures.

Actual result:
NetworkManager keeps trying to modify the interfacel,  killing the journal.

Environment:
OS: Arch Linux x86_64
Hardware: Intel 7260AC
NetworkManager: 1.0.4-1 (Arch Linux package)
Linux kernel: 4.1.3-1-ARCH
wpa_supplicant: 1:2.3-1

Further information:
The new interface is created with a different hardware (MAC) address should that be relevant. According to the specifications[1], this card supports simultaneous Client and AP modes.

 [1]: http://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/dual-band-wireless-ac-7260-bluetooth-brief.pdf

Logs that demonstrates the insanity of NM:

Aug 22 22:48:21 al NetworkManager[5400]: <info>  (wlan1): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Aug 22 22:48:21 al systemd-journal[268]: Suppressed 512 messages from /system.slice/NetworkManager.service
Aug 22 22:48:21 al NetworkManager[5400]: <error> [1440276501.893093] [platform/nm-linux-platform.c:2782] do_change_link(): platform-linux: do-change-link: failure changing link 16: Object busy (25)
Aug 22 22:48:21 al NetworkManager[5400]: <error> [1440276501.898223] [supplicant-manager/nm-supplicant-interface.c:734] interface_add_cb(): (wlan1): error adding interface: GDBus.Error:fi.w1.wpa_supplicant1.UnknownError: wpa_supplicant couldn't grab this interface.
Aug 22 22:48:21 al NetworkManager[5400]: <info>  (wlan1): supplicant interface state: starting -> down
Aug 22 22:48:21 al NetworkManager[5400]: <error> [1440276501.900864] [supplicant-manager/nm-supplicant-interface.c:734] interface_add_cb(): (wlan1): error adding interface: GDBus.Error:fi.w1.wpa_supplicant1.UnknownError: wpa_supplicant couldn't grab this interface.
Aug 22 22:48:21 al NetworkManager[5400]: <info>  (wlan1): supplicant interface state: starting -> down
Aug 22 22:48:21 al NetworkManager[5400]: <error> [1440276501.903690] [supplicant-manager/nm-supplicant-interface.c:734] interface_add_cb(): (wlan1): error adding interface: GDBus.Error:fi.w1.wpa_supplicant1.UnknownError: wpa_supplicant couldn't grab this interface.
Aug 22 22:48:21 al NetworkManager[5400]: <info>  (wlan1): supplicant interface state: starting -> down
Aug 22 22:48:21 al NetworkManager[5400]: <error> [1440276501.906896] [supplicant-manager/nm-supplicant-interface.c:734] interface_add_cb(): (wlan1): error adding interface: GDBus.Error:fi.w1.wpa_supplicant1.UnknownError: wpa_supplicant couldn't grab this interface.
Aug 22 22:48:21 al NetworkManager[5400]: <info>  (wlan1): supplicant interface state: starting -> down
Aug 22 22:48:21 al NetworkManager[5400]: <error> [1440276501.909818] [supplicant-manager/nm-supplicant-interface.c:734] interface_add_cb(): (wlan1): error adding interface: GDBus.Error:fi.w1.wpa_supplicant1.UnknownError: wpa_supplicant couldn't grab this interface.
Aug 22 22:48:21 al NetworkManager[5400]: <info>  (wlan1): supplicant interface state: starting -> down
Aug 22 22:48:21 al NetworkManager[5400]: <error> [1440276501.912074] [supplicant-manager/nm-supplicant-interface.c:734] interface_add_cb(): (wlan1): error adding interface: GDBus.Error:fi.w1.wpa_supplicant1.UnknownError: wpa_supplicant couldn't grab this interface.
Aug 22 22:48:21 al NetworkManager[5400]: <info>  (wlan1): supplicant interface state: starting -> down
Aug 22 22:48:21 al NetworkManager[5400]: <error> [1440276501.914396] [supplicant-manager/nm-supplicant-interface.c:734] interface_add_cb(): (wlan1): error adding interface: GDBus.Error:fi.w1.wpa_supplicant1.UnknownError: wpa_supplicant couldn't grab this interface.
Aug 22 22:48:21 al NetworkManager[5400]: <info>  (wlan1): supplicant interface state: starting -> down
Aug 22 22:48:21 al systemd-journal[268]: Suppressed 6565 messages from /system.slice/wpa_supplicant.service
Aug 22 22:48:21 al wpa_supplicant[5243]: Could not set interface wlan1 flags (UP): Device or resource busy
Aug 22 22:48:21 al wpa_supplicant[5243]: nl80211: Could not set interface 'wlan1' UP
Aug 22 22:48:21 al wpa_supplicant[5243]: Could not set interface wlan1 flags (UP): Device or resource busy
Aug 22 22:48:21 al wpa_supplicant[5243]: WEXT: Could not set interface 'wlan1' UP
Comment 1 Lagu 2015-11-01 02:41:33 UTC
Hi, i can confirm this bug on my system, i use gentoo 64, with NM 1.0.6, in my case only happend when i add a interface in monitor mode and NM try to control it, for example, i can add a new mon0 interface in monitor mode i don't get any error, but if NM try to use that interface to connect to a network, or i try to connect with it i get the same error message in the post, i try adding a new interface in managed mode and i at least don't get any error.

here the bt:

  • #0 interface_add_cb
    at /var/tmp/portage/net-misc/networkmanager-1.0.6/work/NetworkManager-1.0.6/src/supplicant-manager/nm-supplicant-interface.c line 734
  • #1 g_simple_async_result_complete
    from /usr/lib64/libgio-2.0.so.0
  • #2 ??
    from /usr/lib64/libgio-2.0.so.0
  • #3 g_simple_async_result_complete
    from /usr/lib64/libgio-2.0.so.0
  • #4 ??
    from /usr/lib64/libgio-2.0.so.0
  • #5 g_simple_async_result_complete
    from /usr/lib64/libgio-2.0.so.0
  • #6 ??
    from /usr/lib64/libgio-2.0.so.0
  • #7 g_main_context_dispatch
    from /usr/lib64/libglib-2.0.so.0
  • #8 ??
    from /usr/lib64/libglib-2.0.so.0
  • #9 g_main_loop_run
    from /usr/lib64/libglib-2.0.so.0
  • #10 main
    at /var/tmp/portage/net-misc/networkmanager-1.0.6/work/NetworkManager-1.0.6/src/main.c line 513

Comment 2 Jiri Klimes 2015-11-25 15:04:12 UTC
I can reproduce the problem with
$ sudo iw wlan0 interface add AAA type managed

It seems to be caused by the fact that the driver does not support interface combinations
$ iw list | grep -A 5 combination
	interface combinations are not supported
	HT Capability overrides:
		 * MCS: ff ff ff ff ff ff ff ff ff ff
		 * maximum A-MSDU length
		 * supported channel width
		 * short GI for 40 MHz
wpa_supplicant returns "wpa_supplicant couldn't grab this interface", but NetworkManager keeps trying over and over.

Note that the interface can be removed later with
$ sudo iw dev AAA del

Pushed a fix to jk/supplicant-fix-bgo753971 branch.
Comment 3 Lagu 2015-11-25 15:40:14 UTC
note, in my case:

sudo iw list | grep -A 5 combination
	valid interface combinations:
		 * #{ managed } <= 2048, #{ AP, mesh point } <= 8, #{ P2P-client, P2P-GO } <= 1,
		   total <= 2048, #channels <= 1, STA/AP BI must match
		 * #{ WDS } <= 2048,
		   total <= 2048, #channels <= 1, STA/AP BI must match
	HT Capability overrides:

a little question, ¿its correct networkmanager try to use a monitor interface?
it feel can be better first check if the interface really support the interface combinations, bacuase if support it then this will be more difficult to develop.

Thx. :D // Have a happy day
Comment 4 Dan Williams 2015-11-25 16:18:54 UTC
LGTM
Comment 5 Jiri Klimes 2015-11-30 14:08:41 UTC
master: 7e93ceb wifi: only try adding supplicant interface 5 times on errors (bgo #753971)
nm-1-0: 8167625 wifi: only try adding supplicant interface 5 times on errors (bgo #753971)