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

Hostapd + 4.19.40 + Edimax EW-7811Un fails to accept client connections #2979

Open
moodeaudio opened this issue May 18, 2019 · 48 comments
Open

Comments

@moodeaudio
Copy link

Describe the bug
Kernel 4.19.40 + Pi-2B + Edimax EW-7811Un adapter results in hostapd failing to accept client connections. The error message on the client is "Incorrect password". Reverting to 4.14.98 kernel and no issues.

To reproduce

  1. Download and install moOde 5.2 image onto SDCard
    https://github.com/moode-player/moode/releases/download/r52prod-fix/moode-r52.zip
  2. Boot up a Pi-2B with Edimax EW-7811Un adapter and Ethernet cable plugged in
  3. SSH pi@moode (pwd = moodeaudio)
  4. Activate hostapd mode manually and then optionally restart hostapd in debug mode

sudo sed -i "/AP mode/,/$p/ d" /etc/dhcpcd.conf
sudo sed -i "$ a#AP mode\ninterface wlan0\nstatic ip_address=172.24.1.1/24\nnohook wpa_supplicant" /etc/dhcpcd.conf
sudo systemctl daemon-reload
sudo systemctl restart dhcpcd
sudo systemctl start hostapd
sudo systemctl start dnsmasq

  1. Verify a few things

a. ifconfig (verify that 172.24.1.1 address assigned to wlan0)
b. On a client device for example an iPhone verify that SSID Moode appears in the list of available WiFi networks

  1. Optionally restart hostapd in debug logging mode

sudo systemctl stop hostapd
sudo hostapd -d /etc/hostapd/hostapd.conf

Expected behaviour
iPhone client is able to successfully connect to AP SSID = Moode using password = moodeaudio. Sometimes 2 attempts are required.

Actual behaviour
iPhone client receives error message "Incorrect password". Any number of repeated attempts to connect to AP SSID using the correct password result in the same error message. This also appears to hang the network interfaces and the Pi must be power-down rebooted.

System

@paul-1
Copy link

paul-1 commented May 23, 2019

Do you have a console connection, I’m seeing a segfault. I didn’t have time to go any further.

@moodeaudio
Copy link
Author

Post the segfault.

@paul-1
Copy link

paul-1 commented May 23, 2019

Sorry meant a kernel panic.....im a bit tired, fighting a cold. I'll have to setup a serial console to be able to capture it....or take a picture. Will do it when I can, just didn't know if were seeing the same thing.

@moodeaudio
Copy link
Author

Thanks @paul-1. I don't have any way to do a serial connection to capture a crash but I was able to get what appears to be the last part of it using a 3B with a 7" Touch. It happens exactly when the client connects to the AP.

hostapd_8192cu_crash

@paul-1
Copy link

paul-1 commented May 23, 2019

You should be able add pause_on_oops=xx to cmdline.txt (Where xx is number of seconds to pause) That will keep the top of the oops from scrolling off the screen.

@moodeaudio
Copy link
Author

Ok, I'll try in a bit.

@moodeaudio
Copy link
Author

moodeaudio commented May 23, 2019

The pause_on_oops did not seem to work. The screen still scrolled. I ended up taking a movie and the first few lines of the oops were more or less clear. I'm not sure though if this is enough information to use for debugging.

Screen Shot 2019-05-23 at 3 35 27 PM

@pelwell
Copy link
Contributor

pelwell commented May 23, 2019

Try adding "framebuffer_height=2160” to config.txt - you may get the whole report on screen at once.

@moodeaudio
Copy link
Author

Gave it a try but there was still scrolling past the top. I'd guess maybe 2-3 pages.

@jan-h-1970
Copy link

Raspberry 2Bv1.2 with hostapd running
vcgencmd version
Mar 27 2019 15:45:53
Copyright (c) 2012 Broadcom
version 2e98b31d18547962e564bdf88e57b3df7085c29b (clean) (release) (start)
uname -a
Linux xxxxx 4.19.42-v7+ #1219 SMP Tue May 14 21:20:58 BST 2019 armv7l GNU/Linux
This Kernel version is ok:
Linux xxxxx 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux
lsusb (of the access point adapters)
ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
or
ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter

crash when client tries to connect to hostapd

[ 216.702035] ------------[ cut here ]------------
[ 216.717282] kernel BUG at mm/slub.c:3904!
[ 216.731696] Internal error: Oops - BUG: 0 [#1] SMP ARM
[ 216.747355] Modules linked in: bridge stp llc ipv6 8192cu sha256_generic sg cfg80211 rfkill cdc_ether r8152 uas bcm2835_v4l2(C) bcm2835_codec(C) v4l2_mem2mem v4l2_common videobuf2_vmalloc bcm2835_mmal_vchiq(C) videobuf2_dma_contig videobuf2_memops snd_bcm2835(C) videobuf2_v4l2 raspberrypi_hwmon videobuf2_common hwmon snd_pcm videodev media vc_sm_cma(C) snd_timer snd uio_pdrv_genirq fixed uio ip_tables x_tables
[ 216.807958] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G C 4.19.42-v7+ #1219
[ 216.828282] Hardware name: BCM2835
[ 216.843934] PC is at kfree+0x1a8/0x1e8
[ 216.860272] LR is at nl80211_send_station+0xaa4/0xca4 [cfg80211]
[ 216.878661] pc : [<80294314>] lr : [<7f280794>] psr: 40000113
[ 216.897420] sp : 80d01920 ip : 0024770a fp : 80d0194c
[ 216.915110] r10: b25e107c r9 : 00000000 r8 : 80d01a00
[ 216.932766] r7 : 80d01970 r6 : c0d3a000 r5 : 7f280794 r4 : b25e1014
[ 216.951784] r3 : bd859c28 r2 : 00000000 r1 : 00000000 r0 : c0d3a000
[ 216.970896] Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 216.990584] Control: 10c5383d Table: 3c3dc06a DAC: 00000055
[ 217.008853] Process swapper/0 (pid: 0, stack limit = 0xcb9efe30)
[ 217.027457] Stack: (0x80d01920 to 0x80d02000)
[ 217.044438] 1920: 0000005a 805137f8 b25e1014 80d04d48 ba8b1780 80d01970 80d01a00 00000000
[ 217.065340] 1940: 80d019ac 80d01950 7f280794 80294178 00000005 00000013 80d019ac b25e1034
[ 217.086182] 1960: 00000012 80d04d48 b25e1014 b25e1030 73657469 82080174 00d019a4 ca1bf7c7
[ 217.107043] 1980: 801ffc74 00000000 babca000 b27c6ad2 80d01a00 b97f99a0 00480020 b97f9800
[ 217.127989] 19a0: 80d019fc 80d019b0 7f280f10 7f27fcfc 00000000 b97f9800 babca000 b27c6ad2
[ 217.149025] 19c0: 80d01a00 80d019d0 7f363960 ba8b1780 b8be18a4 00000000 00000000 00000000
[ 217.170129] 19e0: c0d3b000 c0d3b918 00000076 c0e12474 80d01acc 80d01a00 7f396728 7f280e94
[ 217.191335] 1a00: 00000000 00000000 801019c0 c0e02360 c0d3a000 c0e02360 c0e12474 c0e02374
[ 217.212633] 1a20: 000000dd b8be18a4 80d01a44 80d01a38 7f38383c 7f3831d4 80d01a5c 80d01a48
[ 217.233975] 1a40: 7f36e9a4 7f383830 c0d3a000 c0e02360 80d01a74 80d01a60 7f34cf40 7f36e964
[ 217.255426] 1a60: c0d3a000 c0d3d3cc b27c6ae 0000005a 7f352a44 7f34ceec c0e02374 c0e12474
[ 217.276861] 1a80: 80d01a9c 00001a90 8082bfcc c0016674 00000018 50001aa0 010102f2 ca1bf7c7
[ 217.298285] 1aa0: 00000001 c0d3a000 b27c6ac8 00000000 c0d3b000 ca1bf7c7 c0d3a000 b27c6ac8
[ 217.319830] 1ac0: 80d01c8c 80d01ad0 7f356968 7f3966b8 bc801e40 80292c5c 80d01b2c 00000014
[ 217.341497] 1ae0: b27c6aff 80d01af0 0000005a c0e129c4 00000007 00000000 00000000 00000010
[ 217.363326] 1b00: 00000010 b27c6ae6 00000007 b27c6aef 00000008 00000000 00000000 00000000
[ 217.385091] 1b20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 217.406741] 1b40: 00000000 00000000 00000000 b27c6af9 00000004 00000000 00000000 b27c6aff
[ 217.428252] 1b60: 00000014 b27c6b31 00000007 00000000 00000000 00000000 00000000 00000000
[ 217.449777] 1b80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 217.471191] 1ba0: 00000000 b27c6b15 0000001a 00000000 00000000 00000000 00000000 02f25000
[ 217.492466] 1bc0: bc230100 80d04d48 00000000 968b8482 2418120c 6c604830 80d01c94 00000000
[ 217.513737] 1be0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 217.534960] 1c00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 217.556017] 1c20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 217.576942] 1c40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ca1bf7c7
[ 217.597791] 1c60: 00000496 b27c6acc c0e0e1c0 7f3a64f8 c0d3a000 b27c6acc b27c6b44 00000001
[ 217.618840] 1c80: 80d01cbc 80d01c90 7f34bcd8 7f3560c4 ffffffff fffff7c7 ffffffff ca1bf7c7
[ 217.639870] 1ca0: b27c6ac8 c0d3a000 c0e0e1c0 c0e12474 80d01cf4 80d01cc0 7f34ca0c 7f34bc40
[ 217.660993] 1cc0: 7f35dc14 fffff5a4 ffffffff ca1bf7c7 b27c6ac8 c0e0e1c0 c0e12474 c0d3a000
[ 217.682212] 1ce0: c0d3a000 00000076 80d01d14 80d01cf8 7f35de74 7f34c8b4 00000000 c0e0e1c0
[ 217.703517] 1d00: b27c6ac8 00000000 80d01d34 80d01d18 7f35dfac 7f35dd28 c0d3a000 c0e0e1c0
[ 217.724787] 1d20: c0e0e1c0 b27c6ac8 80d01d54 80d01d38 7f35ea2c 7f35dea4 00000064 00000100
[ 217.746111] 1d40: c0e0e1c0 ba8b16c0 80d01dac 80d01d58 7f38484c 7f35e9cc c0d3b690 c0d3a000
[ 217.767449] 1d60: c0d3b750 baa68900 c0d3d000 babca800 c0d3b694 b8bfc060 00000100 b8bfc048
[ 217.788890] 1d80: 80d01dac c0d3b72c c0d3b730 00000000 bcee7298 00000000 00000006 00000040
[ 217.810365] 1da0: 80d01dd4 80d01db0 80126c34 7f3845e0 80d03098 00000006 80d00028 00000100
[ 217.831859] 1dc0: bc810180 00000018 80d01de4 80d01dd8 80126d14 80126bdc 80d01e4c 80d01de8
[ 217.853453] 1de0: 80102388 80126cf8 80d01e0c 80d01df8 00000001 00200102 80d03d00 ffffdf77
[ 217.875128] 1e00: 00000009 80c92a00 80d8e998 80d04d70 80c8a308 80d03080 80d01de8 00000007
[ 217.896849] 1e20: 8017e7e8 80c929e8 00000000 00000000 00000001 bc810180 80d00000 80c63a38
[ 217.918626] 1e40: 80d01e5c 80d01e50 801268dc 80102204 80d01e84 80d01e60 8017ef24 801267ec
[ 217.940502] 1e60: 80d01ea0 00000000 a0000013 ffffffff 80d01ed4 00000001 80d01e9c 80d01e88
[ 217.962446] 1e80: 801021b4 8017eec0 8069fc9c 8082bde0 80d01f1c 80d01ea0 801019bc 80102160
[ 217.984435] 1ea0: bc284ccc 000000ff 00000002 0f0f0f0f 80e4397c bc284cc0 000000ff bc284ccc
[ 218.006493] 1ec0: 00000001 bd7ff9c0 80c63a38 80d01f1c 80d01f00 80d01ef0 8069fc9c 8082bde0
[ 218.028627] 1ee0: a0000013 ffffffff 80109a04 00000000 80d01f1c 80d01f00 8069fc9c 8082bde4
[ 218.050193] 1f00: 80e4397c 000000ff 00000004 bceef470 80d01f44 80d01f20 806a1644 8069fc78
[ 218.071163] 1f20: 00000000 80d04d70 80d00000 80d04db8 00000001 80d8e47e 80d01f54 80d01f48
[ 218.091779] 1f40: 80109a78 806a159c 80d01f7c 80d01f58 801524d0 80109a68 80c8a24c 000000c5
[ 218.112375] 1f60: 80d9cc40 80d04d40 ffffffff 80d9cc40 80d01f8c 80d01f80 8015280c 801523dc
[ 218.133085] 1f80: 80d01fa4 80d01f90 808253e4 801527f0 80c8a230 80d9cc9c 80d01ff4 80d01fa8
[ 218.153784] 1fa0: 80c00fb0 80825334 ffffffff ffffffff 00000000 80c00858 00000000 80c63a38
[ 218.174505] 1fc0: ca1fe4ed 00000000 00000000 80c00330 00000055 10c0387d 00000c42 2eff9d00
[ 218.195220] 1fe0: 410fd034 10c5387d 00000000 80d01ff8 00000000 80c00b38 00000000 00000000
[ 218.216434] [<80294314>] (kfree) from [<7f280794>] (nl80211_send_station+0xaa4/0xca4 [cfg80211])
[ 218.238628] [<7f280794>] (nl80211_send_station [cfg80211]) from [<7f280f10>] (cfg80211_new_sta+0x88/0x18c [cfg80211])
[ 218.262837] [<7f280f10>] (cfg80211_new_sta [cfg80211]) from [<7f396728>] (rtw_cfg80211_indicate_sta_assoc+0x7c/0xa0 [8192cu])
[ 218.287767] [<7f396728>] (rtw_cfg80211_indicate_sta_assoc [8192cu]) from [<7f356968>] (OnAssocReq+0x8b0/0xa04 [8192cu])
[ 218.312233] [<7f356968>] (OnAssocReq [8192cu]) from [<7f34bcd8>] (_mgt_dispatcher+0xa4/0xc8 [8192cu])
[ 218.335232] [<7f34bcd8>] (_mgt_dispatcher [8192cu]) from [<7f34ca0c>] (mgt_dispatcher+0x164/0x1e4 [8192cu])
[ 218.358878] [<7f34ca0c>] (mgt_dispatcher [8192cu]) from [<7f35de74>] (validate_recv_mgnt_frame+0x158/0x17c [8192cu])
[ 218.383399] [<7f35de74>] (validate_recv_mgnt_frame [8192cu]) from [<7f35dfac>] (validate_recv_frame+0x114/0x194 [8192cu])
[ 218.408505] [<7f35dfac>] (validate_recv_frame [8192cu]) from [<7f35ea2c>] (rtw_recv_entry+0x6c/0x144 [8192cu])
[ 218.432693] [<7f35ea2c>] (rtw_recv_entry [8192cu]) from [<7f38484c>] (rtl8192cu_recv_tasklet+0x278/0x308 [8192cu])
[ 218.457120] [<7f38484c>] (rtl8192cu_recv_tasklet [8192cu]) from [<80126c34>] (tasklet_action_common+0x64/0xec)
[ 218.481093] [<80126c34>] (tasklet_action_common) from [<80126d14>] (tasklet_action+0x28/0x30)
[ 218.503647] [<80126d14>] (tasklet_action) from [<80102388>] (__do_softirq+0x190/0x3f0)
[ 218.525562] [<80102388>] (__do_softirq) from [<801268dc>] (irq_exit+0xfc/0x120)
[ 218.546870] [<801268dc>] (irq_exit) from [<8017ef24>] (__handle_domain_irq+0x70/0xc4)
[ 218.568734] [<8017ef24>] (__handle_domain_irq) from [<801021b4>] (bcm2836_arm_irqchip_handle_irq+0x60/0xa4)
[ 218.592635] [<801021b4>] (bcm2836_arm_irqchip_handle_irq) from [<801019bc>] (__irq_svc+0x5c/0x7c)
[ 218.615694] Exception stack(0x80d01ea0 to 0x80d01ee8)
[ 218.634842] 1ea0: bc284ccc 000000ff 00000002 0f0f0f0f 80e4397c bc284cc0 000000ff bc284ccc
[ 218.657249] 1ec0: 00000001 bd7ff9c0 80c63a38 80d01f1c 80d01f00 80d01ef0 8069fc9c 8082bde0
[ 218.679651] 1ee0: a0000013 ffffffff
[ 218.697223] [<801019bc>] (__irq_svc) from [<8082bde0>] (_raw_read_lock+0x8/0x38)
[ 218.718972] [<8082bde0>] (_raw_read_lock) from [<806a1644>] (ledtrig_cpu+0xb4/0xf0)
[ 218.741130] [<806a1644>] (ledtrig_cpu) from [<80109a78>] (arch_cpu_idle_exit+0x1c/0x20)
[ 218.763797] [<80109a78>] (arch_cpu_idle_exit) from [<801524d0>] (do_idle+0x100/0x17c)
[ 218.786383] [<801524d0>] (do_idle) from [<8015280c>] (cpu_startup_entry+0x28/0x2c)
[ 218.808853] [<8015280c>] (cpu_startup_entry) from [<808253e4>] (rest_init+0xbc/0xc0)
[ 218.831655] [<808253e4>] (rest_init) from [<80c00fb0>] (start_kernel+0x484/0x4b4)
[ 218.854204] Code: 1a000003 e5932004 e3120001 1a000000 (e7f001f2)
[ 218.875362] ---[ end trace 9ec9408f0ced3505 ]---
[ 218.895146] Kernel panic - not syncing: Fatal exception in interrupt
[ 218.916867] CPU3: stopping
[ 218.935015] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G D C 4.19.42-v7+ #1219
[ 218.958605] Hardware name: BCM2835
[ 218.977442] [<80111eac>] (unwind_backtrace) from [<8010d430>] (show_stack+0x20/0x24)
[ 219.000793] [<8010d430>] (show_stack) from [<8080ec80>] (dump_stack+0xd4/0x118)
[ 219.023680] [<8080ec80>] (dump_stack) from [<801102c4>] (handle_IPI+0x388/0x3a8)
[ 219.046561] [<801102c4>] (handle_IPI) from [<801021f4>] (bcm2836_arm_irqchip_handle_irq+0xa0/0xa4)
[ 219.071166] [<801021f4>] (bcm2836_arm_irqchip_handle_irq) from [<801019bc>] (__irq_svc+0x5c/0x7c)
[ 219.095775] Exception stack(0xbc951f38 to 0xbc951f80)
[ 219.116565] 1f20: 80109a04 00000000
[ 219.140593] 1f40: 40000093 40000093 80d04d70 bc950000 80d04db8 00000008 80d8e47e 410fd034
[ 219.164670] 1f60: 00000000 bc951f94 80d0517c bc951f88 00000000 80109a08 40000013 ffffffff
[ 219.188773] [<801019bc>] (__irq_svc) from [<80109a08>] (arch_cpu_idle+0x34/0x4c)
[ 219.212118] [<80109a08>] (arch_cpu_idle) from [<8082bcd4>] (default_idle_call+0x34/0x48)
[ 219.236242] [<8082bcd4>] (default_idle_call) from [<801524bc>] (do_idle+0xec/0x17c)
[ 219.259947] [<801524bc>] (do_idle) from [<8015280c>] (cpu_startup_entry+0x28/0x2c)
[ 219.283583] [<8015280c>] (cpu_startup_entry) from [<8010fcc8>] (secondary_start_kernel+0x134/0x140)
[ 219.308782] [<8010fcc8>] (secondary_start_kernel) from [<0010268c>] (0x10268c)
[ 219.332192] CPU1: stopping
[ 219.351221] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G D C 4.19.42-v7+ #1219
[ 219.375703] Hardware name: BCM2835
[ 219.395388] [<80111eac>] (unwind_backtrace) from [<8010d430>] (show_stack+0x20/0x24)
[ 219.419726] [<8010d430>] (show_stack) from [<8080ec80>] (dump_stack+0xd4/0x118)
[ 219.443634] [<8080ec80>] (dump_stack) from [<801102c4>] (handle_IPI+0x388/0x3a8)
[ 219.467570] [<801102c4>] (handle_IPI) from [<801021f4>] (bcm2836_arm_irqchip_handle_irq+0xa0/0xa4)
[ 219.493191] [<801021f4>] (bcm2836_arm_irqchip_handle_irq) from [<801019bc>] (__irq_svc+0x5c/0x7c)
[ 219.518733] Exception stack(0xbc94df38 to 0xbc94df80)
[ 219.540444] df20: 80109a04 00000000
[ 219.565400] df40: 40000093 40000093 80d04d70 bc94c000 80d04db8 00000002 80d8e47e 410fd034
[ 219.590406] df60: 00000000 bc94df94 80d0517c bc94df88 00000000 80109a08 40000013 ffffffff
[ 219.615452] [<801019bc>] (__irq_svc) from [<80109a08>] (arch_cpu_idle+0x34/0x4c)
[ 219.639676] [<80109a08>] (arch_cpu_idle) from [<8082bcd4>] (default_idle_call+0x34/0x48)
[ 219.664501] [<8082bcd4>] (default_idle_call) from [<801524bc>] (do_idle+0xec/0x17c)
[ 219.688827] [<801524bc>] (do_idle) from [<8015280c>] (cpu_startup_entry+0x28/0x2c)
[ 219.712906] [<8015280c>] (cpu_startup_entry) from [<8010fcc8>] (secondary_start_kernel+0x134/0x140)
[ 219.738446] [<8010fcc8>] (secondary_start_kernel) from [<0010268c>] (0x10268c)
[ 219.762048] CPU2: stopping
[ 219.780624] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G D C 4.19.42-v7+ #1219
[ 219.804546] Hardware name: BCM2835
[ 219.823626] [<80111eac>] (unwind_backtrace) from [<8010d430>] (show_stack+0x20/0x24)
[ 219.847159] [<8010d430>] (show_stack) from [<8080ec80>] (dump_stack+0xd4/0x118)
[ 219.870140] [<8080ec80>] (dump_stack) from [<801102c4>] (handle_IPI+0x388/0x3a8)
[ 219.893043] [<801102c4>] (handle_IPI) from [<801021f4>] (bcm2836_arm_irqchip_handle_irq+0xa0/0xa4)
[ 219.917591] [<801021f4>] (bcm2836_arm_irqchip_handle_irq) from [<801019bc>] (__irq_svc+0x5c/0x7c)
[ 219.942067] Exception stack(0xbc94ff38 to 0xbc94ff80)
[ 219.962634] ff20: 80109a04 00000000
[ 219.986379] ff40: 40000093 40000093 80d04d70 bc94e000 80d04db8 00000004 80d8e47e 410fd034
[ 220.010045] ff60: 00000000 bc94ff94 80d0517c bc94ff88 00000000 80109a08 40000013 ffffffff
[ 220.033644] [<801019bc>] (__irq_svc) from [<80109a08>] (arch_cpu_idle+0x34/0x4c)
[ 220.056445] [<80109a08>] (arch_cpu_idle) from [<8082bcd4>] (default_idle_call+0x34/0x48)
[ 220.079967] [<8082bcd4>] (default_idle_call) from [<801524bc>] (do_idle+0xec/0x17c)
[ 220.103043] [<801524bc>] (do_idle) from [<8015280c>] (cpu_startup_entry+0x28/0x2c)
[ 220.126008] [<8015280c>] (cpu_startup_entry) from [<8010fcc8>] (secondary_start_kernel+0x134/0x140)
[ 220.150533] [<8010fcc8>] (secondary_start_kernel) from [<0010268c>] (0x10268c)
[ 220.173211] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
[ 220.196361] ------------[ cut here ]------------
[ 220.216361] WARNING: CPU: 0 PID: 0 at kernel/workqueue.c:857 wq_worker_waking_up+0x88/0x90
[ 220.240152] Modules linked in: bridge stp llc ipv6 8192cu sha256_generic sg cfg80211 rfkill cdc_ether r8152 uas bcm2835_v4l2(C) bcm2835_codec(C) v4l2_mem2mem v4l2_common videobuf2_vmalloc bcm2835_mmal_vchiq(C) videobuf2_dma_contig videobuf2_memops snd_bcm2835(C) videobuf2_v4l2 raspberrypi_hwmon videobuf2_common hwmon snd_pcm videodev media vc_sm_cma(C) snd_timer snd uio_pdrv_genirq fixed uio ip_tables x_tables
[ 220.310051] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D C 4.19.42-v7+ #1219
[ 220.334898] Hardware name: BCM2835
[ 220.355043] [<80111eac>] (unwind_backtrace) from [<8010d430>] (show_stack+0x20/0x24)
[ 220.379768] [<8010d430>] (show_stack) from [<8080ec80>] (dump_stack+0xd4/0x118)
[ 220.404049] [<8080ec80>] (dump_stack) from [<80120904>] (__warn+0x104/0x11c)
[ 220.427996] [<80120904>] (__warn) from [<80120a54>] (warn_slowpath_null+0x50/0x58)
[ 220.452466] [<80120a54>] (warn_slowpath_null) from [<8013d1c0>] (wq_worker_waking_up+0x88/0x90)
[ 220.478124] [<8013d1c0>] (wq_worker_waking_up) from [<8014ced8>] (ttwu_do_activate+0x6c/0x84)
[ 220.503715] [<8014ced8>] (ttwu_do_activate) from [<8014dbe0>] (try_to_wake_up+0x1f8/0x48c)
[ 220.529063] [<8014dbe0>] (try_to_wake_up) from [<8014df5c>] (default_wake_function+0x1c/0x20)
[ 220.554662] [<8014df5c>] (default_wake_function) from [<80167d80>] (__wake_up_common+0xa0/0x144)
[ 220.580509] [<80167d80>] (__wake_up_common) from [<80167e4c>] (__wake_up_locked+0x28/0x30)
[ 220.605848] [<80167e4c>] (__wake_up_locked) from [<80168f14>] (complete+0x48/0x58)
[ 220.630397] [<80168f14>] (complete) from [<806a1e48>] (response_callback+0x1c/0x20)
[ 220.655075] [<806a1e48>] (response_callback) from [<806d2484>] (mbox_chan_received_data+0x28/0x2c)
[ 220.681095] [<806d2484>] (mbox_chan_received_data) from [<806d3070>] (bcm2835_mbox_irq+0x60/0x94)
[ 220.707062] [<806d3070>] (bcm2835_mbox_irq) from [<8017f774>] (__handle_irq_event_percpu+0xc0/0x22c)
[ 220.733329] [<8017f774>] (__handle_irq_event_percpu) from [<8017f91c>] (handle_irq_event_percpu+0x3c/0x8c)
[ 220.760205] [<8017f91c>] (handle_irq_event_percpu) from [<8017f9c0>] (handle_irq_event+0x54/0x78)
[ 220.786274] [<8017f9c0>] (handle_irq_event) from [<80183f94>] (handle_level_irq+0xc0/0x14c)
[ 220.811776] [<80183f94>] (handle_level_irq) from [<8017e7e8>] (generic_handle_irq+0x34/0x44)
[ 220.837317] [<8017e7e8>] (generic_handle_irq) from [<805192a8>] (bcm2836_chained_handle_irq+0x38/0x50)
[ 220.863841] [<805192a8>] (bcm2836_chained_handle_irq) from [<8017e7e8>] (generic_handle_irq+0x34/0x44)
[ 220.890363] [<8017e7e8>] (generic_handle_irq) from [<8017ef20>] (__handle_domain_irq+0x6c/0xc4)
[ 220.916294] [<8017ef20>] (__handle_domain_irq) from [<801021b4>] (bcm2836_arm_irqchip_handle_irq+0x60/0xa4)
[ 220.943369] [<801021b4>] (bcm2836_arm_irqchip_handle_irq) from [<801019bc>] (__irq_svc+0x5c/0x7c)
[ 220.969677] Exception stack(0x80d016f0 to 0x80d01738)
[ 220.992089] 16e0: 80120c84 00000000 40000193 40000193
[ 221.017754] 1700: 80d9d138 80a656ec 0000000b 00000000 00000000 80d9d138 80d07f00 80d0177c
[ 221.043367] 1720: 80d0517c 80d01740 00000000 80120c88 40000113 ffffffff
[ 221.067334] [<801019bc>] (__irq_svc) from [<80120c88>] (panic+0x22c/0x288)
[ 221.091571] [<80120c88>] (panic) from [<8010d790>] (arm_notify_die+0x0/0x64)
[ 221.115989] [<8010d790>] (arm_notify_die) from [<8010d7bc>] (arm_notify_die+0x2c/0x64)
[ 221.141278] [<8010d7bc>] (arm_notify_die) from [<8010d94c>] (do_undefinstr+0x158/0x1cc)
[ 221.166541] [<8010d94c>] (do_undefinstr) from [<80101a68>] (__und_svc_finish+0x0/0x38)
[ 221.191675] Exception stack(0x80d01890 to 0x80d018d8)
[ 221.213893] 1880: c0d3a000 00000000 00000000 bd859c28
[ 221.239360] 18a0: b25e1014 7f280794 c0d3a000 80d01970 80d01a00 00000000 b25e107c 80d0194c
[ 221.264759] 18c0: 0024770a 80d01920 7f280794 80294314 40000113 ffffffff
[ 221.288554] [<80101a68>] (__und_svc_finish) from [<80294314>] (kfree+0x1a8/0x1e8)
[ 221.313660] [<80294314>] (kfree) from [<7f280794>] (nl80211_send_station+0xaa4/0xca4 [cfg80211])
[ 221.340386] [<7f280794>] (nl80211_send_station [cfg80211]) from [<7f280f10>] (cfg80211_new_sta+0x88/0x18c [cfg80211])
[ 221.369045] [<7f280f10>] (cfg80211_new_sta [cfg80211]) from [<7f396728>] (rtw_cfg80211_indicate_sta_assoc+0x7c/0xa0 [8192cu])
[ 221.398402] [<7f396728>] (rtw_cfg80211_indicate_sta_assoc [8192cu]) from [<7f356968>] (OnAssocReq+0x8b0/0xa04 [8192cu])
[ 221.427436] [<7f356968>] (OnAssocReq [8192cu]) from [<7f34bcd8>] (_mgt_dispatcher+0xa4/0xc8 [8192cu])
[ 221.454938] [<7f34bcd8>] (_mgt_dispatcher [8192cu]) from [<7f34ca0c>] (mgt_dispatcher+0x164/0x1e4 [8192cu])
[ 221.483020] [<7f34ca0c>] (mgt_dispatcher [8192cu]) from [<7f35de74>] (validate_recv_mgnt_frame+0x158/0x17c [8192cu])
[ 221.511934] [<7f35de74>] (validate_recv_mgnt_frame [8192cu]) from [<7f35dfac>] (validate_recv_frame+0x114/0x194 [8192cu])
[ 221.541454] [<7f35dfac>] (validate_recv_frame [8192cu]) from [<7f35ea2c>] (rtw_recv_entry+0x6c/0x144 [8192cu])
[ 221.570035] [<7f35ea2c>] (rtw_recv_entry [8192cu]) from [<7f38484c>] (rtl8192cu_recv_tasklet+0x278/0x308 [8192cu])
[ 221.598867] [<7f38484c>] (rtl8192cu_recv_tasklet [8192cu]) from [<80126c34>] (tasklet_action_common+0x64/0xec)
[ 221.627159] [<80126c34>] (tasklet_action_common) from [<80126d14>] (tasklet_action+0x28/0x30)
[ 221.653998] [<80126d14>] (tasklet_action) from [<80102388>] (__do_softirq+0x190/0x3f0)
[ 221.680175] [<80102388>] (__do_softirq) from [<801268dc>] (irq_exit+0xfc/0x120)
[ 221.705740] [<801268dc>] (irq_exit) from [<8017ef24>] (__handle_domain_irq+0x70/0xc4)
[ 221.731820] [<8017ef24>] (__handle_domain_irq) from [<801021b4>] (bcm2836_arm_irqchip_handle_irq+0x60/0xa4)
[ 221.759886] [<801021b4>] (bcm2836_arm_irqchip_handle_irq) from [<801019bc>] (__irq_svc+0x5c/0x7c)
[ 221.787089] Exception stack(0x80d01ea0 to 0x80d01ee8)
[ 221.810400] 1ea0: bc284ccc 000000ff 00000002 0f0f0f0f 80e4397c bc284cc0 000000ff bc284ccc
[ 221.836954] 1ec0: 00000001 bd7ff9c0 80c63a38 80d01f1c 80d01f00 80d01ef0 8069fc9c 8082bde0
[ 221.863029] 1ee0: a0000013 ffffffff
[ 221.883697] [<801019bc>] (__irq_svc) from [<8082bde0>] (_raw_read_lock+0x8/0x38)
[ 221.908113] [<8082bde0>] (_raw_read_lock) from [<806a1644>] (ledtrig_cpu+0xb4/0xf0)
[ 221.932816] [<806a1644>] (ledtrig_cpu) from [<80109a78>] (arch_cpu_idle_exit+0x1c/0x20)
[ 221.957872] [<80109a78>] (arch_cpu_idle_exit) from [<801524d0>] (do_idle+0x100/0x17c)
[ 221.982767] [<801524d0>] (do_idle) from [<8015280c>] (cpu_startup_entry+0x28/0x2c)
[ 222.007459] [<8015280c>] (cpu_startup_entry) from [<808253e4>] (rest_init+0xbc/0xc0)
[ 222.032338] [<808253e4>] (rest_init) from [<80c00fb0>] (start_kernel+0x484/0x4b4)
[ 222.056912] ---[ end trace 9ec9408f0ced3506 ]---

@jan-h-1970
Copy link

same to kernel: Linux xxxxx 4.19.46-v7+ #1230 SMP Tue May 28 16:18:48 BST 2019 armv7l GNU/Linux
modules lsmod: "cfg80211 614400 1 8192cu"

[ 72.158114] ------------[ cut here ]------------
[ 72.172957] kernel BUG at mm/slub.c:3904!
[ 72.187058] Internal error: Oops - BUG: 0 [#1] SMP ARM
[ 72.202361] Modules linked in: bridge stp llc ipv6 8192cu sg sha256_generic cfg80211 uas rfkill bcm2835_codec(C) bcm2835_v4l2(C) snd_bcm2835(C) v4l2_mem2mem bcm2835_mmal_vchiq(C) snd_pcm videobuf2_dma_contig v4l2_common videobuf2_vmalloc videobuf2_memops snd_timer videobuf2_v4l2 raspberrypi_hwmon videobuf2_common hwmon snd videodev media vc_sm_cma(C) uio_pdrv_genirq fixed uio ip_tables x_tables
[ 72.260856] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G C 4.19.46-v7+ #1230
[ 72.280879] Hardware name: BCM2835
[ 72.296208] PC is at kfree+0x1a8/0x1e8
[ 72.312186] LR is at nl80211_send_station+0xaa4/0xca4 [cfg80211]
[ 72.330112] pc : [<802949fc>] lr : [<7f243908>] psr: 40000113
[ 72.348361] sp : 80d01968 ip : 002475fc fp : 80d01994
[ 72.365536] r10: bbd5107c r9 : 00000000 r8 : 80d01a48
[ 72.382640] r7 : 80d019b8 r6 : c0d1c000 r5 : 7f243908 r4 : bbd51014
[ 72.401169] r3 : bd8597f0 r2 : 00000000 r1 : 00000000 r0 : c0d1c000
[ 72.419691] Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 72.439038] Control: 10c5383d Table: 36b6806a DAC: 00000055
[ 72.457119] Process swapper/0 (pid: 0, stack limit = 0x82dce9f4)
[ 72.475347] Stack: (0x80d01968 to 0x80d02000)
[ 72.491756] 1960: 0000005a 80513fe0 bbd51014 80d04d48 b7c6f240 80d019b8
[ 72.512193] 1980: 80d01a48 00000000 80d019f4 80d01998 7f243908 80294860 00000005 00000013
[ 72.532752] 19a0: 80d019f4 bbd51034 00000012 80d04d48 bbd51014 bbd51030 73657469 82080174
[ 72.553345] 19c0: 00d019ec ca1bf7c3 80200324 00000000 ba61d800 b6bec052 80d01a48 bc2679a0
[ 72.574038] 19e0: 00480020 bc267800 80d01a44 80d019f8 7f244084 7f242e70 00000000 bc267800
[ 72.594715] 1a00: ba61d800 b6bec052 80d01a48 80d01a18 7f326960 b7c6f240 b87078a4 00000000
[ 72.615371] 1a20: 00000000 00000000 c0d1d000 c0d1d918 00000076 c0d5dda4 80d01b14 80d01a48
[ 72.636114] 1a40: 7f359728 7f244008 00000000 00000000 c0d4da14 c0d4da00 c0d1c000 c0d4da00
[ 72.656959] 1a60: c0d5dda4 c0d4da14 000000dd b87078a4 80d01a8c 80d01a80 7f34683c 7f3461d4
[ 72.677866] 1a80: 80d01aa4 80d01a90 7f3319a4 7f346830 c0d1c000 c0d4da00 80d01abc 80d01aa8
[ 72.698894] 1aa0: 7f30ff40 7f331964 c0d1c000 c0d1f3cc b6bec064 0000005a 7f315a44 7f30feec
[ 72.720001] 1ac0: c0d4da14 c0d5dda4 80d01ae4 00001ad8 8082ca2c c00166b8 00000018 50001ae8
[ 72.741236] 1ae0: 010102f2 ca1bf7c3 00000001 c0d1c000 b6bec048 00000000 c0d1d000 ca1bf7c3
[ 72.762552] 1b00: c0d1c000 b6bec048 80d01cd4 80d01b18 7f319968 7f3596b8 80d01b6c 80293344
[ 72.783865] 1b20: 80d01b74 00000014 b6bec07f 80d01b38 0000005a c0d5e2f4 00000007 00000000
[ 72.805141] 1b40: 00000000 00000010 00000010 b6bec066 00000007 b6bec06f 00000008 00000000
[ 72.826446] 1b60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 72.847750] 1b80: 00000000 00000000 00000000 00000000 00000000 b6bec079 00000004 00000000
[ 72.869009] 1ba0: 00000000 b6bec07f 00000014 b6bec0b1 00000007 00000000 00000000 00000000
[ 72.890363] 1bc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 72.911658] 1be0: 00000000 00000000 00000000 b6bec095 0000001a 00000000 00000000 00000000
[ 72.932876] 1c00: 00000000 02f25000 bc240100 80d04d48 00000000 968b8482 2418120c 6c604830
[ 72.954045] 1c20: 80d01cdc 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 72.975196] 1c40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 72.996175] 1c60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 73.016987] 1c80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 73.037739] 1ca0: 00000000 ca1bf7c3 00000084 b6bec04c c0d546f8 7f3694f8 c0d1c000 b6bec04c
[ 73.058578] 1cc0: b6bec0c4 00000001 80d01d04 80d01cd8 7f30ecd8 7f3190c4 ffffffff fffff7c3
[ 73.079471] 1ce0: ffffffff ca1bf7c3 b6bec048 c0d1c000 c0d546f8 c0d5dda4 80d01d3c 80d01d08
[ 73.100493] 1d00: 7f30fa0c 7f30ec40 7f320c14 ffff25a4 ffffffff ca1bf7c3 b6bec048 c0d546f8
[ 73.121607] 1d20: c0d5dda4 c0d1c000 c0d1c000 00000076 80d01d5c 80d01d40 7f320e74 7f30f8b4
[ 73.142818] 1d40: 00000000 c0d546f8 b6bec048 00000000 80d01d7c 80d01d60 7f320fac 7f320d28
[ 73.164022] 1d60: c0d1c000 c0d546f8 c0d546f8 b6bec048 80d01d9c 80d01d80 7f321a2c 7f320ea4
[ 73.185237] 1d80: 00000064 00000100 c0d546f8 b7c6fc00 80d01df4 80d01da0 7f34784c 7f3219cc
[ 73.206480] 1da0: c0d1d690 c0d1c000 c0d1d750 ba41a3c0 c0d1f000 ba61e000 c0d1d694 b871c060
[ 73.227845] 1dc0: 00000100 b871c048 80d01df4 c0d1d72c c0d1d730 00000000 bcee7298 00000000
[ 73.249287] 1de0: 00000006 00000040 80d01e1c 80d01df8 80126c78 7f3475e0 80d03098 00000006
[ 73.270766] 1e00: 80d00030 00000100 bc810180 00000018 80d01e2c 80d01e20 80126d58 80126c20
[ 73.292289] 1e20: 80d01e94 80d01e30 80102388 80126d3c 80d01e54 80d01e40 00000001 00200102
[ 73.313875] 1e40: 80d03d00 ffffa701 00000009 80c92a00 80d8ec58 80d04d70 80c8a308 80d03080
[ 73.335462] 1e60: 80d01e30 00000007 8017e870 80c929e8 00000000 00000000 00000001 bc810180
[ 73.357165] 1e80: 80d00000 80c63a38 80d01ea4 80d01e98 80126920 80102204 80d01ecc 80d01ea8
[ 73.378919] 1ea0: 8017efac 80126830 80d01ee8 00000000 40000013 ffffffff 80d01f1c 80d8e73e
[ 73.400770] 1ec0: 80d01ee4 80d01ed0 801021b4 8017ef48 00000000 80109a08 80d01f44 80d01ee8
[ 73.422620] 1ee0: 801019bc 80102160 80109a04 00000000 40000093 40000093 80d04d70 80d00000
[ 73.444490] 1f00: 80d04db8 00000001 80d8e73e bd7ff9c0 80c63a38 80d01f44 80d0517c 80d01f38
[ 73.466406] 1f20: 00000000 80109a08 40000013 ffffffff 80109a04 00000000 80d01f54 80d01f48
[ 73.487791] 1f40: 8082c734 801099e0 80d01f7c 80d01f58 80152500 8082c70c 80c8a24c 000000c5
[ 73.508631] 1f60: 80d9cf40 80d04d40 ffffffff 80d9cf40 80d01f8c 80d01f80 80152850 80152420
[ 73.529153] 1f80: 80d01fa4 80d01f90 80825e44 80152834 80c8a230 80d9cf9c 80d01ff4 80d01fa8
[ 73.549669] 1fa0: 80c00fb0 80825d94 ffffffff ffffffff 00000000 80c00858 00000000 80c63a38
[ 73.570297] 1fc0: ca1fe4ed 00000000 00000000 80c00330 00000055 10c0387d 00000c42 2eff9c00
[ 73.590944] 1fe0: 410fd034 10c5387d 00000000 80d01ff8 00000000 80c00b38 00000000 00000000
[ 73.611962] [<802949fc>] (kfree) from [<7f243908>] (nl80211_send_station+0xaa4/0xca4 [cfg80211])
[ 73.633949] [<7f243908>] (nl80211_send_station [cfg80211]) from [<7f244084>] (cfg80211_new_sta+0x88/0x18c [cfg80211])
[ 73.657979] [<7f244084>] (cfg80211_new_sta [cfg80211]) from [<7f359728>] (rtw_cfg80211_indicate_sta_assoc+0x7c/0xa0 [8192cu])
[ 73.682790] [<7f359728>] (rtw_cfg80211_indicate_sta_assoc [8192cu]) from [<7f319968>] (OnAssocReq+0x8b0/0xa04 [8192cu])
[ 73.707248] [<7f319968>] (OnAssocReq [8192cu]) from [<7f30ecd8>] (_mgt_dispatcher+0xa4/0xc8 [8192cu])
[ 73.730167] [<7f30ecd8>] (_mgt_dispatcher [8192cu]) from [<7f30fa0c>] (mgt_dispatcher+0x164/0x1e4 [8192cu])
[ 73.753709] [<7f30fa0c>] (mgt_dispatcher [8192cu]) from [<7f320e74>] (validate_recv_mgnt_frame+0x158/0x17c [8192cu])
[ 73.778201] [<7f320e74>] (validate_recv_mgnt_frame [8192cu]) from [<7f320fac>] (validate_recv_frame+0x114/0x194 [8192cu])
[ 73.803314] [<7f320fac>] (validate_recv_frame [8192cu]) from [<7f321a2c>] (rtw_recv_entry+0x6c/0x144 [8192cu])
[ 73.827456] [<7f321a2c>] (rtw_recv_entry [8192cu]) from [<7f34784c>] (rtl8192cu_recv_tasklet+0x278/0x308 [8192cu])
[ 73.851853] [<7f34784c>] (rtl8192cu_recv_tasklet [8192cu]) from [<80126c78>] (tasklet_action_common+0x64/0xec)
[ 73.875756] [<80126c78>] (tasklet_action_common) from [<80126d58>] (tasklet_action+0x28/0x30)
[ 73.898237] [<80126d58>] (tasklet_action) from [<80102388>] (__do_softirq+0x190/0x3f0)
[ 73.920055] [<80102388>] (__do_softirq) from [<80126920>] (irq_exit+0xfc/0x120)
[ 73.941293] [<80126920>] (irq_exit) from [<8017efac>] (__handle_domain_irq+0x70/0xc4)
[ 73.963098] [<8017efac>] (__handle_domain_irq) from [<801021b4>] (bcm2836_arm_irqchip_handle_irq+0x60/0xa4)
[ 73.986935] [<801021b4>] (bcm2836_arm_irqchip_handle_irq) from [<801019bc>] (__irq_svc+0x5c/0x7c)
[ 74.009992] Exception stack(0x80d01ee8 to 0x80d01f30)
[ 74.029157] 1ee0: 80109a04 00000000 40000093 40000093 80d04d70 80d00000
[ 74.051599] 1f00: 80d04db8 00000001 80d8e73e bd7ff9c0 80c63a38 80d01f44 80d0517c 80d01f38
[ 74.073996] 1f20: 00000000 80109a08 40000013 ffffffff
[ 74.093171] [<801019bc>] (__irq_svc) from [<80109a08>] (arch_cpu_idle+0x34/0x4c)
[ 74.114787] [<80109a08>] (arch_cpu_idle) from [<8082c734>] (default_idle_call+0x34/0x48)
[ 74.137152] [<8082c734>] (default_idle_call) from [<80152500>] (do_idle+0xec/0x17c)
[ 74.159142] [<80152500>] (do_idle) from [<80152850>] (cpu_startup_entry+0x28/0x2c)
[ 74.181152] [<80152850>] (cpu_startup_entry) from [<80825e44>] (rest_init+0xbc/0xc0)
[ 74.203493] [<80825e44>] (rest_init) from [<80c00fb0>] (start_kernel+0x484/0x4b4)
[ 74.225661] Code: 1a000003 e5932004 e3120001 1a000000 (e7f001f2)
[ 74.246539] ---[ end trace 5ccbbc48e3a2f843 ]---
[ 74.265976] Kernel panic - not syncing: Fatal exception in interrupt
[ 74.287266] CPU2: stopping
[ 74.304805] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G D C 4.19.46-v7+ #1230
[ 74.327951] Hardware name: BCM2835
[ 74.346549] [<80111eac>] (unwind_backtrace) from [<8010d430>] (show_stack+0x20/0x24)
[ 74.369842] [<8010d430>] (show_stack) from [<8080f6e0>] (dump_stack+0xd4/0x118)
[ 74.392755] [<8080f6e0>] (dump_stack) from [<801102c4>] (handle_IPI+0x388/0x3a8)
[ 74.415656] [<801102c4>] (handle_IPI) from [<801021f4>] (bcm2836_arm_irqchip_handle_irq+0xa0/0xa4)
[ 74.440161] [<801021f4>] (bcm2836_arm_irqchip_handle_irq) from [<801019bc>] (__irq_svc+0x5c/0x7c)
[ 74.464598] Exception stack(0xbc94ff38 to 0xbc94ff80)
[ 74.485102] ff20: 80109a04 00000000
[ 74.508917] ff40: 40000093 40000093 80d04d70 bc94e000 80d04db8 00000004 80d8e73e 410fd034
[ 74.532860] ff60: 00000000 bc94ff94 80d0517c bc94ff88 00000000 80109a08 40000013 ffffffff
[ 74.556856] [<801019bc>] (__irq_svc) from [<80109a08>] (arch_cpu_idle+0x34/0x4c)
[ 74.580104] [<80109a08>] (arch_cpu_idle) from [<8082c734>] (default_idle_call+0x34/0x48)
[ 74.604117] [<8082c734>] (default_idle_call) from [<80152500>] (do_idle+0xec/0x17c)
[ 74.627739] [<80152500>] (do_idle) from [<80152850>] (cpu_startup_entry+0x28/0x2c)
[ 74.651266] [<80152850>] (cpu_startup_entry) from [<8010fcc8>] (secondary_start_kernel+0x134/0x140)
[ 74.676411] [<8010fcc8>] (secondary_start_kernel) from [<0010268c>] (0x10268c)
[ 74.699725] CPU3: stopping
[ 74.718394] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G D C 4.19.46-v7+ #1230
[ 74.742568] Hardware name: BCM2835
[ 74.762011] [<80111eac>] (unwind_backtrace) from [<8010d430>] (show_stack+0x20/0x24)
[ 74.786012] [<8010d430>] (show_stack) from [<8080f6e0>] (dump_stack+0xd4/0x118)
[ 74.809630] [<8080f6e0>] (dump_stack) from [<801102c4>] (handle_IPI+0x388/0x3a8)
[ 74.833281] [<801102c4>] (handle_IPI) from [<801021f4>] (bcm2836_arm_irqchip_handle_irq+0xa0/0xa4)
[ 74.858591] [<801021f4>] (bcm2836_arm_irqchip_handle_irq) from [<801019bc>] (__irq_svc+0x5c/0x7c)
[ 74.883853] Exception stack(0xbc951f38 to 0xbc951f80)
[ 74.905245] 1f20: 80109a04 00000000
[ 74.929900] 1f40: 40000093 40000093 80d04d70 bc950000 80d04db8 00000008 80d8e73e 410fd034
[ 74.954590] 1f60: 00000000 bc951f94 80d0517c bc951f88 00000000 80109a08 40000013 ffffffff
[ 74.979268] [<801019bc>] (__irq_svc) from [<80109a08>] (arch_cpu_idle+0x34/0x4c)
[ 75.003251] [<80109a08>] (arch_cpu_idle) from [<8082c734>] (default_idle_call+0x34/0x48)
[ 75.027910] [<8082c734>] (default_idle_call) from [<80152500>] (do_idle+0xec/0x17c)
[ 75.052019] [<80152500>] (do_idle) from [<80152850>] (cpu_startup_entry+0x28/0x2c)
[ 75.075963] [<80152850>] (cpu_startup_entry) from [<8010fcc8>] (secondary_start_kernel+0x134/0x140)
[ 75.101335] [<8010fcc8>] (secondary_start_kernel) from [<0010268c>] (0x10268c)
[ 75.124728] CPU1: stopping
[ 75.143660] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G D C 4.19.46-v7+ #1230
[ 75.167952] Hardware name: BCM2835
[ 75.187350] [<80111eac>] (unwind_backtrace) from [<8010d430>] (show_stack+0x20/0x24)
[ 75.211217] [<8010d430>] (show_stack) from [<8080f6e0>] (dump_stack+0xd4/0x118)
[ 75.234509] [<8080f6e0>] (dump_stack) from [<801102c4>] (handle_IPI+0x388/0x3a8)
[ 75.257756] [<801102c4>] (handle_IPI) from [<801021f4>] (bcm2836_arm_irqchip_handle_irq+0xa0/0xa4)
[ 75.282535] [<801021f4>] (bcm2836_arm_irqchip_handle_irq) from [<801019bc>] (__irq_svc+0x5c/0x7c)
[ 75.307276] Exception stack(0xbc94df38 to 0xbc94df80)
[ 75.328112] df20: 80109a04 00000000
[ 75.352153] df40: 40000093 40000093 80d04d70 bc94c000 80d04db8 00000002 80d8e73e 410fd034
[ 75.376156] df60: 00000000 bc94df94 80d0517c bc94df88 00000000 80109a08 40000013 ffffffff
[ 75.400064] [<801019bc>] (__irq_svc) from [<80109a08>] (arch_cpu_idle+0x34/0x4c)
[ 75.423127] [<80109a08>] (arch_cpu_idle) from [<8082c734>] (default_idle_call+0x34/0x48)
[ 75.446892] [<8082c734>] (default_idle_call) from [<80152500>] (do_idle+0xec/0x17c)
[ 75.470232] [<80152500>] (do_idle) from [<80152850>] (cpu_startup_entry+0x28/0x2c)
[ 75.493464] [<80152850>] (cpu_startup_entry) from [<8010fcc8>] (secondary_start_kernel+0x134/0x140)
[ 75.518251] [<8010fcc8>] (secondary_start_kernel) from [<0010268c>] (0x10268c)
[ 75.541172] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
[ 75.564337] ------------[ cut here ]------------
[ 75.584342] WARNING: CPU: 0 PID: 0 at kernel/workqueue.c:857 wq_worker_waking_up+0x88/0x90
[ 75.608145] Modules linked in: bridge stp llc ipv6 8192cu sg sha256_generic cfg80211 uas rfkill bcm2835_codec(C) bcm2835_v4l2(C) snd_bcm2835(C) v4l2_mem2mem bcm2835_mmal_vchiq(C) snd_pcm videobuf2_dma_contig v4l2_common videobuf2_vmalloc videobuf2_memops snd_timer videobuf2_v4l2 raspberrypi_hwmon videobuf2_common hwmon snd videodev media vc_sm_cma(C) uio_pdrv_genirq fixed uio ip_tables x_tables
[ 75.676601] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D C 4.19.46-v7+ #1230
[ 75.701441] Hardware name: BCM2835
[ 75.721564] [<80111eac>] (unwind_backtrace) from [<8010d430>] (show_stack+0x20/0x24)
[ 75.746235] [<8010d430>] (show_stack) from [<8080f6e0>] (dump_stack+0xd4/0x118)
[ 75.770459] [<8080f6e0>] (dump_stack) from [<80120948>] (__warn+0x104/0x11c)
[ 75.794367] [<80120948>] (__warn) from [<80120a98>] (warn_slowpath_null+0x50/0x58)
[ 75.818791] [<80120a98>] (warn_slowpath_null) from [<8013d204>] (wq_worker_waking_up+0x88/0x90)
[ 75.844414] [<8013d204>] (wq_worker_waking_up) from [<8014cf1c>] (ttwu_do_activate+0x6c/0x84)
[ 75.869976] [<8014cf1c>] (ttwu_do_activate) from [<8014dc24>] (try_to_wake_up+0x1f8/0x48c)
[ 75.895288] [<8014dc24>] (try_to_wake_up) from [<8014dfa0>] (default_wake_function+0x1c/0x20)
[ 75.920859] [<8014dfa0>] (default_wake_function) from [<80167dc4>] (__wake_up_common+0xa0/0x144)
[ 75.946673] [<80167dc4>] (__wake_up_common) from [<80167e90>] (__wake_up_locked+0x28/0x30)
[ 75.971982] [<80167e90>] (__wake_up_locked) from [<80168f58>] (complete+0x48/0x58)
[ 75.996489] [<80168f58>] (complete) from [<806a2760>] (response_callback+0x1c/0x20)
[ 76.021109] [<806a2760>] (response_callback) from [<806d2ea8>] (mbox_chan_received_data+0x28/0x2c)
[ 76.047087] [<806d2ea8>] (mbox_chan_received_data) from [<806d3a94>] (bcm2835_mbox_irq+0x60/0x94)
[ 76.073016] [<806d3a94>] (bcm2835_mbox_irq) from [<8017f7fc>] (__handle_irq_event_percpu+0xc0/0x22c)
[ 76.099233] [<8017f7fc>] (__handle_irq_event_percpu) from [<8017f9a4>] (handle_irq_event_percpu+0x3c/0x8c)
[ 76.126072] [<8017f9a4>] (handle_irq_event_percpu) from [<8017fa48>] (handle_irq_event+0x54/0x78)
[ 76.152135] [<8017fa48>] (handle_irq_event) from [<8018401c>] (handle_level_irq+0xc0/0x14c)
[ 76.177590] [<8018401c>] (handle_level_irq) from [<8017e870>] (generic_handle_irq+0x34/0x44)
[ 76.203104] [<8017e870>] (generic_handle_irq) from [<80519a90>] (bcm2836_chained_handle_irq+0x38/0x50)
[ 76.229587] [<80519a90>] (bcm2836_chained_handle_irq) from [<8017e870>] (generic_handle_irq+0x34/0x44)
[ 76.256082] [<8017e870>] (generic_handle_irq) from [<8017efa8>] (__handle_domain_irq+0x6c/0xc4)
[ 76.281981] [<8017efa8>] (__handle_domain_irq) from [<801021b4>] (bcm2836_arm_irqchip_handle_irq+0x60/0xa4)
[ 76.309028] [<801021b4>] (bcm2836_arm_irqchip_handle_irq) from [<801019bc>] (__irq_svc+0x5c/0x7c)
[ 76.335309] Exception stack(0x80d01738 to 0x80d01780)
[ 76.357689] 1720: 80120cc 00000000
[ 76.383272] 1740: 40000193 40000193 80d9d438 80a6594c 0000000b 00000000 00000000 80d9d438
[ 76.408792] 1760: 80d07f00 80d017c4 80d0517c 80d01788 00000000 80120ccc 40000113 ffffffff
[ 76.434303] [<801019bc>] (__irq_svc) from [<80120ccc>] (panic+0x22c/0x288)
[ 76.458489] [<80120ccc>] (panic) from [<8010d790>] (arm_notify_die+0x0/0x64)
[ 76.482853] [<8010d790>] (arm_notify_die) from [<8010d7bc>] (arm_notify_die+0x2c/0x64)
[ 76.508085] [<8010d7bc>] (arm_notify_die) from [<8010d94c>] (do_undefinstr+0x158/0x1cc)
[ 76.533284] [<8010d94c>] (do_undefinstr) from [<80101a68>] (__und_svc_finish+0x0/0x38)
[ 76.558360] Exception stack(0x80d018d8 to 0x80d01920)
[ 76.580515] 18c0: c0d1c000 00000000
[ 76.605865] 18e0: 00000000 bd8597f0 bbd51014 7f243908 c0d1c000 80d019b8 80d01a48 00000000
[ 76.631157] 1900: bbd5107c 80d01994 002475fc 80d01968 7f243908 802949fc 40000113 ffffffff
[ 76.656479] [<80101a68>] (__und_svc_finish) from [<802949fc>] (kfree+0x1a8/0x1e8)
[ 76.681503] [<802949fc>] (kfree) from [<7f243908>] (nl80211_send_station+0xaa4/0xca4 [cfg80211])
[ 76.708142] [<7f243908>] (nl80211_send_station [cfg80211]) from [<7f244084>] (cfg80211_new_sta+0x88/0x18c [cfg80211])
[ 76.736734] [<7f244084>] (cfg80211_new_sta [cfg80211]) from [<7f359728>] (rtw_cfg80211_indicate_sta_assoc+0x7c/0xa0 [8192cu])
[ 76.766001] [<7f359728>] (rtw_cfg80211_indicate_sta_assoc [8192cu]) from [<7f319968>] (OnAssocReq+0x8b0/0xa04 [8192cu])
[ 76.794929] [<7f319968>] (OnAssocReq [8192cu]) from [<7f30ecd8>] (_mgt_dispatcher+0xa4/0xc8 [8192cu])
[ 76.822337] [<7f30ecd8>] (_mgt_dispatcher [8192cu]) from [<7f30fa0c>] (mgt_dispatcher+0x164/0x1e4 [8192cu])
[ 76.850324] [<7f30fa0c>] (mgt_dispatcher [8192cu]) from [<7f320e74>] (validate_recv_mgnt_frame+0x158/0x17c [8192cu])
[ 76.879160] [<7f320e74>] (validate_recv_mgnt_frame [8192cu]) from [<7f320fac>] (validate_recv_frame+0x114/0x194 [8192cu])
[ 76.908569] [<7f320fac>] (validate_recv_frame [8192cu]) from [<7f321a2c>] (rtw_recv_entry+0x6c/0x144 [8192cu])
[ 76.937045] [<7f321a2c>] (rtw_recv_entry [8192cu]) from [<7f34784c>] (rtl8192cu_recv_tasklet+0x278/0x308 [8192cu])
[ 76.965799] [<7f34784c>] (rtl8192cu_recv_tasklet [8192cu]) from [<80126c78>] (tasklet_action_common+0x64/0xec)
[ 76.994019] [<80126c78>] (tasklet_action_common) from [<80126d58>] (tasklet_action+0x28/0x30)
[ 77.020780] [<80126d58>] (tasklet_action) from [<80102388>] (__do_softirq+0x190/0x3f0)
[ 77.046888] [<80102388>] (__do_softirq) from [<80126920>] (irq_exit+0xfc/0x120)
[ 77.072371] [<80126920>] (irq_exit) from [<8017efac>] (__handle_domain_irq+0x70/0xc4)
[ 77.098374] [<8017efac>] (__handle_domain_irq) from [<801021b4>] (bcm2836_arm_irqchip_handle_irq+0x60/0xa4)
[ 77.126366] [<801021b4>] (bcm2836_arm_irqchip_handle_irq) from [<801019bc>] (__irq_svc+0x5c/0x7c)
[ 77.153486] Exception stack(0x80d01ee8 to 0x80d01f30)
[ 77.176709] 1ee0: 80109a04 00000000 40000093 40000093 80d04d70 80d00000
[ 77.203171] 1f00: 80d04db8 00000001 80d8e73e bd7ff9c0 80c63a38 80d01f44 80d0517c 80d01f38
[ 77.229123] 1f20: 00000000 80109a08 40000013 ffffffff
[ 77.251325] [<801019bc>] (__irq_svc) from [<80109a08>] (arch_cpu_idle+0x34/0x4c)
[ 77.275695] [<80109a08>] (arch_cpu_idle) from [<8082c734>] (default_idle_call+0x34/0x48)
[ 77.300805] [<8082c734>] (default_idle_call) from [<80152500>] (do_idle+0xec/0x17c)
[ 77.325451] [<80152500>] (do_idle) from [<80152850>] (cpu_startup_entry+0x28/0x2c)
[ 77.349999] [<80152850>] (cpu_startup_entry) from [<80825e44>] (rest_init+0xbc/0xc0)
[ 77.374806] [<80825e44>] (rest_init) from [<80c00fb0>] (start_kernel+0x484/0x4b4)
[ 77.399322] ---[ end trace 5ccbbc48e3a2f844 ]---

@jan-h-1970
Copy link

Seems to me 8192cu module never worked as an access point with a 4.19.xx kernel.
I checked these kernel versions, each of them with a kernel panic:
4.19.46-v7+ #1230
4.19.42-v7+ #1219
4.19.42-v7+ #1218
4.19.37-v7+ #1214
4.19.32-v7+ #1210
4.19.29-v7+ #1207
4.19.25-v7+ #1204

@klimchuk
Copy link

klimchuk commented Jul 2, 2019

I believe issue is more related to driver rather than operating system
pvaret/rtl8192cu-fixes#149

@macmpi
Copy link

macmpi commented Jul 7, 2019

Yes, most probably a driver/hostapd combination issue than kernel.

8192cu had problematic driver version(s) and may need customized version of hostapd if it does not support cfg80211: have not checked eventual regression lastly, but Foundation release supplied kernel driver should be fine since 4.4.13.

Also, "regular" hostapd needed some tweaks for 4.19: Foundation's Buster release fixed it.
If you use a custom hostapd due to your driver, or sub-par hostapd version, you may need to fix hostapd accordingly.

@moodeaudio
Copy link
Author

@klimchuk - I would tend to agree that the issue is in the driver given that kernel panic occurs in 4.19 and no issues in 4.14. Same version of Raspbian, hostapd and hostapd config.

@macmpi - I've not experienced any issues with hostapd, 8192cu and cfg80211 over the years. It's only since the 4.19 branch that connection attempts to the AP cause kernel crash.

@macmpi
Copy link

macmpi commented Jul 8, 2019

@moodeaudio - Looking @ first post, it occurs you are running Raspbian Stretch Lite: so it's very likely hostpad version running is not suitable for 4.19.x, unless you managed to install Buster's version, or built your own based on same sources, which you never said.

So, I advise you try on stock Buster distribution first. If it works and you still need to use Stretch, then try to get hostapd sources from Buster version, and recompile for your distribution.

@moodeaudio
Copy link
Author

Yes, our project has built hostapd from sources since v2.4 as I recall. I've included the build recipe and hostapd.conf. The 2.7 binary that was compiled on Stretch works fine in Buster but we also experience same kernel crash on connection attempt when using Edimax adapter. This is with 4.19.56 kernel.

@jan-h-1970 posted two complete crash dumps so I think it's just a matter of someone with enough experience analyzing them, isolating the issue and hopefully determining root cause.

If there is anything that should be adjusted in the build recipe or config I'll be happy to test.

BUILD

# get missing lib package
sudo apt-get install libnl-3-dev

# unrelated to the above, create a link to an existing lib
cd /lib/arm-linux-gnueabihf/
sudo ln -s libnl-genl-3.so.200.22.0 libnl-genl-3.so

# download sources
cd ~
curl https://w1.fi/releases/hostapd-2.7.tar.gz -o hostapd-2.7.tar.gz
tar xf hostapd-2.7.tar.gz
cd hostapd-2.7/hostapd

# configure build
cp defconfig .config
sed -i 's/^#CONFIG_DRIVER_NL80211=y/CONFIG_DRIVER_NL80211=y/g' .config

# enable 802.11n and 802.11ac
sed -i 's/^#CONFIG_IEEE80211N=y/CONFIG_IEEE80211N=y/g' .config
sed -i 's/^#CONFIG_IEEE80211AC=y/CONFIG_IEEE80211AC=y/g' .config

# enable automatic channel selection
sed -i 's/^#CONFIG_ACS=y/CONFIG_ACS=y/g' .config

# compile
make

# install 2.7 binaries
sudo cp hostapd /usr/sbin/
sudo cp hostapd_cli /usr/sbin/

CONFIG

#########################################
# This file is automatically generated by
# the player Network configuration page. 
#########################################

# Interface and driver
interface=wlan0
driver=nl80211

# Wireless settings
ssid=Moode
hw_mode=g
channel=6

# Security settings
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_passphrase=moodeaudio
rsn_pairwise=CCMP

@macmpi
Copy link

macmpi commented Jul 8, 2019

So, I advise you try on stock Buster distribution first. If it works and you still need to use Stretch, then try to get hostapd sources from Buster version, and recompile for your distribution.

I meant: can you please get Raspbian Lite Buster image, and try with your hostapd.conf file, if you can replicate the problem.
Then, either it works and you need to work-out the missing bits in your distrib, or it's broken, then one has a std setup for people help diagnose further.

FWIW, Buster version is not plain 2.7: you may want to get hostapd (2:2.7+git20190128+0c1e29f-6) sources, assuming that's the one that Raspbian ships. (or try 2.8 if that one does not work)

@moodeaudio
Copy link
Author

moodeaudio commented Jul 8, 2019

Do you know what wold be different in Buster hostapd?

I just tested the Buster hostapd package and it exhibits the exact same symptoms when trying to connect to AP using Edimax adapter, the Pi hangs (kernel crashes). No issues with Pi integrated adapter.

Here is the version installed by the package.

pi@rp2:~ $ hostapd -v
hostapd v2.8-devel
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2019, Jouni Malinen <j@w1.fi> and contributors

@macmpi
Copy link

macmpi commented Jul 8, 2019

And from baseline Raspbian Lite Buster image ?

@moodeaudio
Copy link
Author

pi@rp2:~ $ cat /etc/rpi-issue
Raspberry Pi reference 2019-06-20
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 150e25c4f8123a4c9c63e8dca1b4737fa6c1135c, stage2

pi@rp2:~ $ vcgencmd version
Jun 26 2019 17:47:16
Copyright (c) 2012 Broadcom
version a59fb7a74180be0111dbc5c18a37ec6df86f14a3 (clean) (release) (start)

pi@rp2:~ $ uname -a
Linux rp2 4.19.56+ #1242 Wed Jun 26 17:24:44 BST 2019 armv6l GNU/Linux

@macmpi
Copy link

macmpi commented Jul 8, 2019

What if AP security is disabled (WPA2)?

@macmpi
Copy link

macmpi commented Jul 8, 2019

Sorry for asking the obvious, but I assume you blacklisted rtl8192cu, right ? (so that 8192cu is used instead)
It does not seem to be blacklisted by default...

@npreiser
Copy link

npreiser commented Jul 8, 2019

I see the same issue as @moodeaudio , I also tried disabling the security, and the same kernel fault occurs..
I confirmed that the rtl8192cu is blacklisted.

@moodeaudio
Copy link
Author

Where to look for blacklisting?

@popcornmix
Copy link
Collaborator

See /etc/modprobe.d/blacklist-rtl8192cu.conf for example of blacklisting a module.

@npreiser
Copy link

npreiser commented Jul 8, 2019

what I am seeing is this:, which I assume means that the 8192 is blacklisted??,

pi@raspberrypi:~ $ cd /etc/modprobe.d/
pi@raspberrypi:/etc/modprobe.d $ ls
blacklist-rtl8192cu.conf blacklist-rtl8xxxu.conf ipv6.conf
pi@raspberrypi:/etc/modprobe.d $

@moodeaudio
Copy link
Author

Thx, confirmed the file is present

pi@rp3:~ $ cat /etc/modprobe.d/blacklist-rtl8192cu.conf
blacklist rtl8192cu

@npreiser
Copy link

npreiser commented Jul 8, 2019

As a side note, my hw guy here had an alternative LM811 wifi module, which I just compiled the driver for, and it works just fine with the 6/20 raspbian lie. . .https://github.com/lwfinger/rtl8723bu ... uses the rtl8723bu... we are most likley going to move forward with that..

@jan-h-1970
Copy link

jan-h-1970 commented Jul 10, 2019

I can confirm the kernel crash comes still with raspbian buster lite (2019-06-20), it's independent of HW, I tested 2Bv1.2, 3B, 3B+.
Module rtl8192cu is blacklisted by default file /etc/modprobe.d/blacklist-rtl8192cu.conf:

blacklist rtl8192cu
# dpkg -l hostapd
ii  hostapd        2:2.7+git20190128+0c1e29f-6 armhf        IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator
# hostapd -v
hostapd v2.8-devel
# cat /etc/rpi-issue
Raspberry Pi reference 2019-06-20
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 150e25c4f8123a4c9c63e8dca1b4737fa6c1135c, stage2
# vcgencmd version
Jun 20 2019 16:12:41
Copyright (c) 2012 Broadcom
version a59fb7a74180be0111dbc5c18a37ec6df86f14a3 (clean) (release) (start)
# uname -a
Linux rpi 4.19.50-v7+ #896 SMP Thu Jun 20 16:11:44 BST 2019 armv7l GNU/Linux

same with the latest kernel:

# cat /etc/rpi-issue
Raspberry Pi reference 2019-06-20
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 150e25c4f8123a4c9c63e8dca1b4737fa6c1135c, stage2
# vcgencmd version
Jul  9 2019 14:40:53
Copyright (c) 2012 Broadcom
version 6c3fe3f096a93de3b34252ad98cdccadeb534be2 (clean) (release) (start)
# uname -a
Linux rpi 4.19.57-v7+ #1244 SMP Thu Jul 4 18:45:25 BST 2019 armv7l GNU/Linux

error is the same at all ... kernel BUG at mm/slub.c:3904! ...
Latest 4.14 kernel still works with buster/hostapd (Linux rpi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux).

I can send another kernel crash dump output if it's helpful.
I've no idea whether it is a kernel, a 8192cu/cfg80211 module, or a hostapd problem.

@sphakka
Copy link

sphakka commented Aug 22, 2019

Still broken with:

# uname -a
Linux localhost 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux

@badbat75
Copy link

badbat75 commented Sep 16, 2019

Still broken in 4.19.69 and 4.19.71 .

@DannyMTK
Copy link

I had the same problem ... deleting the blacklisting-file /etc/modprobe.d/blacklist-rtl8192cu.conf did the job for my installation ... now the hostapd runs perfectly ...

@moodeaudio
Copy link
Author

Your fix also works for me.

I did notice though that the driver no longer supports scanning while running with hostapd. Scan works fine however when the adapter is connected to WiFi Router. Very odd.

pi@rp7:~ $ sudo iwlist wlan0 scan
wlan0     Interface doesn't support scanning : Operation not supported

@itsme009
Copy link

Hi,
Similar problem for me:
The attempt to create an AP with the Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS] results in some kind of crash. I have not found any records whats going on but after the first attempt to connect to the AP I can not access the raspi anymore and more worse it seems that my whole network is getting some problems that I can resolve by unplug the power connection from my raspi.
The only possibility that I have found yet to create a AP is to remove the two blacklist files from /etc/modprobe.d/.
Just a remark: The idea is to use two Edimax WLAN access point for my home network and a guest network, the build in device is used to connect to the internet using a WIFI-hotspot.
Best regards
Uli

@jm-cjp
Copy link

jm-cjp commented Oct 7, 2019

Using a model B+ Rev 1.2 with Realtek RTL8188CUS and deleting /etc/modprobe.d/blacklist-rtl8192cu.conf worked wonderfully for me. Appreciate the info and work above.

@sergiodobrasil
Copy link

Hi,
@DannyMTK you make my day !
same issue with the driver 8192cu and the some workaround
remove blacklist-rtl8* files from /etc/modprobe.d/
fixed the kernel panic !

i will share my setup in order to help to solve the issue in case of...

Rapsberry = RP1
usb wifi adaptater : TP-Link TL-WN822n V3

uname -a
Linux WIFICave 4.19.75+ #1270 Tue Sep 24 18:38:54 BST 2019 armv6l GNU/Linux

lsb_release -a
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster

lsusb
Bus 001 Device 005: ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter

modprobe -c | grep -i p8178
alias usb:v07B8p8178ddcdscdpiciscipin rtl8192cu
alias usb:v07B8p8178ddcdscdpiciscipin 8192cu
alias usb:v0BDAp8178ddcdscdpiciscipin rtl8192cu
alias usb:v0BDAp8178ddcdscdpiciscipin 8192cu

apt-cache policy firmware-realtek
firmware-realtek:
Installé : 1:20190114-1+rpt2
Candidat : 1:20190114-1+rpt2

lsmod | grep 8192
rtl8192cu 90112 0
rtl_usb 20480 1 rtl8192cu
rtl8192c_common 65536 1 rtl8192cu
rtlwifi 114688 3 rtl_usb,rtl8192c_common,rtl8192cu
mac80211 692224 3 rtl_usb,rtlwifi,rtl8192cu

apt-cache policy dnsmasq
dnsmasq:
Installé : 2.80-1+rpt1
Candidat : 2.80-1+rpt1

apt-cache policy hostapd
hostapd:
Installé : 2:2.7+git20190128+0c1e29f-6+deb10u1
Candidat : 2:2.7+git20190128+0c1e29f-6+deb10u1

sudo iwlist wlan0 scan
wlan0 Interface doesn't support scanning : Operation not supported

watch -d -n 3 "iw dev wlan0 station dump; iwconfig wlan0; cat /proc/net/wireless"

Station 14:9f:3c:e3:98:23 (on wlan0)
inactive time: 110 ms
rx bytes: 671319
rx packets: 3418
tx bytes: 6824529
tx packets: 5907
tx retries: 0
tx failed: 0
rx drop misc: 10
signal: -26 dBm
signal avg: -25 dBm
tx bitrate: 54.0 MBit/s
rx bitrate: 48.0 MBit/s
authorized: yes
authenticated: yes
associated: yes
preamble: short
WMM/WME: no
MFP: no
TDLS peer: no
DTIM period: 2
beacon interval:100
short slot time:yes
connected time: 229 seconds
wlan0 IEEE 802.11 Mode:Master Tx-Power=20 dBm
Retry short limit:7 RTS thr=2347 B Fragment thr:off
Power Management:off

Sergio

@julius59
Copy link

julius59 commented Nov 3, 2019

Exact same issue and solution here (Raspberry 1 Model B + TP-Link TL-WN823N V2)

Thanks @DannyMTK !

@brad
Copy link

brad commented Dec 10, 2019

I'm still unable to connect to the AP, even after fiddling with the blacklist. Just me? Kernel 4.19.75 Where is the log where people are seeing the kernel panic? Is it the logs seen when running hostapd in debugging mode?

@hamishmb
Copy link

Hi there,

I've recently been trying to use this to make an up to date tutorial for setting these adaptors up on Raspbian (https://www.hamishmb.com/blog/how-to-make-a-raspi-ap-with-a-rtl8xxx-wifi-adaptor/) but I get a kernel panic as soon as anything connects to the AP. Is this a resolved/known issue or anything?

I might well be doing something wrong so if you have any advice please let me know :)

@faf0
Copy link

faf0 commented Apr 18, 2020

@hamishmb Have you tried setting driver=nl80211 instead of driver=rtl871xdrv in hostapd.conf? Using driver=nl80211 worked for me out of the box without patching drivers or hostapd.

@hamishmb
Copy link

Interesting, what chipset and kernel version was this with?

@macmpi
Copy link

macmpi commented Apr 21, 2020

since 4.4.13 for 8192cu as per this and referred details.

@hamishmb
Copy link

hamishmb commented Apr 22, 2020

Causes a kernel panic for me when I try to connect, much like with the modified hostapd :/

NOTE: I'm using RTL8188CUS if that makes any difference.

@LewisLebentz
Copy link

@hamishmb did you ever get this working? Came across your blog while trying to get mine setup. Tried multiple different patches of hostapd, followed numerous different tutorials but can't get anything working on the Edimax-7811UN.

I am currently using the latest version of Raspbian. Tempted to try downgrading to a 5yr old one just to see if it makes a difference.

@hamishmb
Copy link

Nope, never managed to get it working or complete that post, unfortunately.

I did once having it working on Raspbian Wheezy I think, so I guess it must not work with newer kernels of something. Unfortunately I'm not sure exactly what I did back then.

I'm not even sure if the repos are still up for older versions to be honest, maybe there's something like old-releases.ubuntu.com but for Raspbian.

@ktp420
Copy link

ktp420 commented Dec 15, 2020

FYI, I just fixed the kernel panic on connection, which seems to have started with kernel >=4.18. If anyone is interested in testing it you can build the module for here:

https://github.com/ktp420/rtl8192cu-fixes/tree/fix_ap_crash

@hamishmb
Copy link

hamishmb commented Dec 22, 2020

I'd love to try it, but sods law happened: I let someone borrow the relevant WiFi dongle and they broke it.

My replacement doesn't use a Realtek chipset (it uses a Ralink RT5370 IIRC), but I'll have a shot at fixing the old one soon probably. If I get it working, I'll definitely try this out.

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

No branches or pull requests