Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#4122 - Enabling WiFi hangs the whole system (both RPi4 and NanoPi R1) #7069

Closed
openwrt-bot opened this issue Nov 4, 2021 · 4 comments
Closed
Labels

Comments

@openwrt-bot
Copy link

piotrjurkiewicz:

Enabling WiFi with wifi up blocks all Netlink communication with kernel, effectively hanging the whole system.

After issuing wifi up command, netifd calls mac80211.sh script, which in turn call iw phy phy0 set distance 0.

812 1 root S 1804 0% 0% /sbin/netifd
1650 812 root S 1972 0% 0% /bin/sh ./mac80211.sh mac80211 setup radio0 {"config":{"path":"platform/soc/fe300000.mmcnr/mmc_hos
1676 1650 root D 1068 0% 0% iw phy phy0 set distance 0

The iw phy phy0 set distance 0 command gets stuck on disk (kernel) write, the wchan is:

nl80211_parse_chandef

Any event or command happening afterwards (like DHCP association or ip link command) also get stuck on Netlink read/write, effectively hanging the whole system:

1695 1679 root D 1236 0% 0% ip link

I observe the problem on both my machines, RaspberryPi 4 and sunxi friendlyarm_nanopi-r1. The problem is independent from the kernel version used (5.4 or 5.10), because it also happens with sunxi target compiled with KERNEL_PATCHVER:=5.4. I already used 5.10 on RPi4 without the problem around 43f0e38, so it was introduced after that commit.

@openwrt-bot
Copy link
Author

bittorf:

I can confirm this with r18017 on Raspberry Pi Zero W and Kernel 5.10.77,
even 'cat /proc/net/wireless' hangs.

@openwrt-bot
Copy link
Author

wulfy23:

also hit this on r17900-e06aaba4e3 @ rpi4

note... the system is not hung... ( although it appears as such )... the terminal is just 'perma-stuck'

you can open a new terminal... you can't kill the processes...

@openwrt-bot
Copy link
Author

arinc90:

Even though the commit fixes the system hangup, SSIDs won't be advertised on my Asus RT-AC88U.

Can anyone try this on trunk?

@openwrt-bot
Copy link
Author

piotrjurkiewicz:

WiFi is still not working on rpi4.

Mon Nov 15 03:31:13 2021 daemon.notice netifd: radio0 (7329): command failed: No error information (-524)
Mon Nov 15 03:31:13 2021 daemon.notice netifd: radio0 (7329): command failed: I/O error (-5)
Mon Nov 15 03:31:14 2021 daemon.notice hostapd: Configuration file: /var/run/hostapd-phy0.conf (phy wlan0) --> new PHY
Mon Nov 15 03:31:14 2021 kern.info kernel: [ 1010.117874] br-lan: port 3(wlan0) entered blocking state
Mon Nov 15 03:31:14 2021 kern.info kernel: [ 1010.123223] br-lan: port 3(wlan0) entered disabled state
Mon Nov 15 03:31:14 2021 kern.info kernel: [ 1010.128649] device wlan0 entered promiscuous mode
Mon Nov 15 03:31:14 2021 daemon.err hostapd: Failed to initialize QoS Map
Mon Nov 15 03:31:14 2021 daemon.warn hostapd: wlan0: Could not connect to kernel driver
Mon Nov 15 03:31:14 2021 daemon.err hostapd: Interface initialization failed
Mon Nov 15 03:31:14 2021 daemon.notice hostapd: wlan0: interface state UNINITIALIZED->DISABLED
Mon Nov 15 03:31:14 2021 daemon.notice hostapd: wlan0: AP-DISABLED
Mon Nov 15 03:31:14 2021 daemon.err hostapd: wlan0: Unable to setup interface.
Mon Nov 15 03:31:14 2021 daemon.notice hostapd: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Mon Nov 15 03:31:14 2021 kern.info kernel: [ 1010.200779] device wlan0 left promiscuous mode
Mon Nov 15 03:31:14 2021 kern.info kernel: [ 1010.205308] br-lan: port 3(wlan0) entered disabled state
Mon Nov 15 03:31:15 2021 daemon.err hostapd: rmdir[ctrl_interface=/var/run/hostapd]: Permission denied
Mon Nov 15 03:31:15 2021 daemon.notice hostapd: wlan0: CTRL-EVENT-TERMINATING
Mon Nov 15 03:31:15 2021 daemon.err hostapd: hostapd_free_hapd_data: Interface wlan0 wasn't started
Mon Nov 15 03:31:15 2021 daemon.notice netifd: radio0 (7329): Command failed: Invalid argument
Mon Nov 15 03:31:15 2021 daemon.notice netifd: radio0 (7329): Device setup failed: HOSTAPD_START_FAILED
Mon Nov 15 03:31:15 2021 daemon.notice netifd: Wireless device 'radio0' set retry=0
Mon Nov 15 03:31:15 2021 daemon.crit netifd: Wireless device 'radio0' setup failed, retry=0
Mon Nov 15 03:31:15 2021 daemon.notice netifd: Wireless device 'radio0' is now down

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant