nRF70: deadlock on memory allocation & mutex #88781
Labels
area: Wi-Fi
Wi-Fi
bug
The issue is a bug, or the PR is fixing a bug
platform: nRF
Nordic nRFx
priority: low
Low impact/importance bug
Describe the bug
The
nrf_wifi
driver can block forever on memory allocationFirst instance, blocking forever in


tx_q
(with thevif_lock
mutex held innrf_wifi_if_send
):Second instance, blocking forever in
nrf70_bh_wq
:Other threads (
nrf70_intr_wq
andshell_uart
end up blocked forever as well due to the mutex never being released.To Reproduce
Run the
zperf
sample application on a nRF7002dk:west build -b nrf7002dk/nrf5340/cpuapp -S wifi-ipv4 zephyr/samples/net/zperf/ -p
west flash --erase
.\Downloads\iperf-2.2.1-win64.exe --server --interval 1 --udp
wifi connect -s $SSID -p $PSK -k 1
zperf udp upload $PC_IP 5001 2 1K 100M
Expected behavior
Driver should not deadlock,
zperf
sample should always complete.Impact
nRF70 driver is not suitable for real-world applications if it can randomly deadlock.
Logs and console output
Shell output while running testing:
Environment (please complete the following information):
Additional Context
Memory allocation shims block forever:
zephyr/modules/nrf_wifi/os/shim.c
Lines 42 to 54 in f922014
The IRQ event processor also performs ALL operations under the "IRQ spinlock", which is actually just the same mutex used everywhere, meaning that any memory allocation in the IRQ path can also deadlock the driver:
https://github.com/zephyrproject-rtos/nrf_wifi/blob/e2c9a783448d919d191591be04ae9f3dd0643027/hw_if/hal/src/system/hal_api.c#L57
The text was updated successfully, but these errors were encountered: