Recent versions are broken
pterjan opened this issue · 3 comments
Using HEAD I get failures like:
Nov 15 18:48:43 pn50 systemd-udevd[712]: wlan0: Worker [5387] processing SEQNUM=4560 is taking a long time
Nov 15 18:48:43 pn50 systemd-udevd[5387]: wlan0: Spawned process 'net_action' [5399] is taking longer than 59s to complete
Nov 15 18:48:43 pn50 kernel: rcu: INFO: rcu_preempt self-detected stall on CPU
Nov 15 18:48:43 pn50 kernel: rcu: 12-....: (1 GPs behind) idle=8f8c/1/0x4000000000000000 softirq=250691/250693 fqs=13702
Nov 15 18:48:43 pn50 kernel: (t=60001 jiffies g=1100337 q=2288 ncpus=16)
Nov 15 18:48:43 pn50 kernel: NMI backtrace for cpu 12
Nov 15 18:48:43 pn50 kernel: CPU: 12 PID: 5434 Comm: iwconfig Tainted: G O 6.0.8-desktop-3.mga8 #1
Nov 15 18:48:43 pn50 kernel: Hardware name: ASUSTeK COMPUTER INC. MINIPC PN50/PN50, BIOS 0611 12/17/2020
Nov 15 18:48:43 pn50 kernel: Call Trace:
Nov 15 18:48:43 pn50 kernel: <IRQ>
Nov 15 18:48:43 pn50 kernel: dump_stack_lvl+0x45/0x5e
Nov 15 18:48:43 pn50 kernel: nmi_cpu_backtrace.cold+0x32/0x79
Nov 15 18:48:43 pn50 kernel: dump_stack_lvl+0x45/0x5e
Nov 15 18:48:43 pn50 kernel: nmi_cpu_backtrace.cold+0x32/0x79
Nov 15 18:48:43 pn50 kernel: ? lapic_can_unplug_cpu+0x80/0x80
Nov 15 18:48:43 pn50 kernel: nmi_trigger_cpumask_backtrace+0xd8/0xf0
Nov 15 18:48:43 pn50 kernel: rcu_dump_cpu_stacks+0xc3/0xfe
Nov 15 18:48:43 pn50 kernel: rcu_sched_clock_irq.cold+0xfa/0x497
Nov 15 18:48:43 pn50 kernel: ? update_load_avg+0x714/0x750
Nov 15 18:48:43 pn50 kernel: ? reweight_entity+0x14c/0x160
Nov 15 18:48:43 pn50 kernel: update_process_times+0x5b/0x90
Nov 15 18:48:43 pn50 kernel: tick_sched_handle+0x34/0x50
Nov 15 18:48:43 pn50 kernel: tick_sched_timer+0x65/0x80
Nov 15 18:48:43 pn50 kernel: ? tick_sched_do_timer+0xa0/0xa0
Nov 15 18:48:43 pn50 kernel: __hrtimer_run_queues+0x12a/0x2c0
Nov 15 18:48:43 pn50 kernel: hrtimer_interrupt+0xfc/0x210
Nov 15 18:48:43 pn50 kernel: __sysvec_apic_timer_interrupt+0x5f/0x110
Nov 15 18:48:43 pn50 kernel: sysvec_apic_timer_interrupt+0x6d/0x90
Nov 15 18:48:43 pn50 kernel: </IRQ>
Nov 15 18:48:43 pn50 kernel: <TASK>
Nov 15 18:48:43 pn50 kernel: asm_sysvec_apic_timer_interrupt+0x16/0x20
Nov 15 18:48:43 pn50 kernel: RIP: 0010:rtw_wx_set_essid+0x192/0x290 [8192eu]
Nov 15 18:48:43 pn50 kernel: Code: b5 c8 00 00 00 4c 89 e8 eb 0d 4c 39 6d 70 75 4d 48 8b 85 90 00 00 00 48 89 45 70 8b 54 24 04 48 89 de 4c 89 f7 e8 5e 89 ff ff <83> f8 01 75 db 8b 44 24 04 39 85 c4 00 00 00 75>
Nov 15 18:48:43 pn50 kernel: RSP: 0018:ffffa7de82b9bd28 EFLAGS: 00000286
Nov 15 18:48:43 pn50 kernel: RAX: 0000000000000000 RBX: ffffa7de82b9bd30 RCX: 0000000000000042
Nov 15 18:48:43 pn50 kernel: RDX: 00000000ffffffbe RSI: 0000000000000007 RDI: ffffa7de8011b0c8
Nov 15 18:48:43 pn50 kernel: RBP: ffffa7de8011b000 R08: ffffa7de82b9bd30 R09: ffffa7de82b9be4c
Nov 15 18:48:43 pn50 kernel: R10: ffffffffc1f13f80 R11: 00007ffcfa4649f0 R12: 0000000000000000
Nov 15 18:48:43 pn50 kernel: R13: ffffa7de8011b090 R14: ffffa7de8011b0c8 R15: ffffa7de8011b0a0
Nov 15 18:48:43 pn50 kernel: ? rtw_wx_set_rate+0x190/0x190 [8192eu]
Nov 15 18:48:43 pn50 kernel: ? rtw_wx_set_essid+0x192/0x290 [8192eu]
Nov 15 18:48:43 pn50 kernel: ioctl_standard_iw_point+0x2e5/0x3b0
Nov 15 18:48:43 pn50 kernel: ? rtw_wx_set_rate+0x190/0x190 [8192eu]
Nov 15 18:48:43 pn50 kernel: ? __inode_wait_for_writeback+0x7e/0xf0
Nov 15 18:48:43 pn50 kernel: ioctl_standard_call+0xa5/0xd0
Nov 15 18:48:43 pn50 kernel: wext_handle_ioctl+0x133/0x170
Nov 15 18:48:43 pn50 kernel: ? mntput_no_expire+0x4a/0x240
Nov 15 18:48:43 pn50 kernel: sock_ioctl+0x1cc/0x2f0
Nov 15 18:48:43 pn50 kernel: __x64_sys_ioctl+0x8b/0xc0
Nov 15 18:48:43 pn50 kernel: do_syscall_64+0x3b/0x90
Nov 15 18:48:43 pn50 kernel: entry_SYSCALL_64_after_hwframe+0x63/0xcd
Nov 15 18:48:43 pn50 kernel: RIP: 0033:0x7fb20dc05aa7
Nov 15 18:48:43 pn50 kernel: Code: 3c 1c 48 f7 d8 4c 39 e0 77 a9 e8 04 ff ff ff 85 c0 78 b7 4c 89 e0 5b 5d 41 5c c3 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 91 53 0d 00>
Nov 15 18:48:43 pn50 kernel: RSP: 002b:00007ffcfa4649a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000010
Nov 15 18:48:43 pn50 kernel: RAX: ffffffffffffffda RBX: 00007ffcfa464c20 RCX: 00007fb20dc05aa7
Nov 15 18:48:43 pn50 kernel: RDX: 00007ffcfa4649d0 RSI: 0000000000008b1a RDI: 0000000000000003
Nov 15 18:48:43 pn50 kernel: RBP: 0000000000000003 R08: 0000000000000007 R09: 003175307331706c
Nov 15 18:48:43 pn50 kernel: R10: fffffffffffff945 R11: 0000000000000202 R12: 00007ffcfa465aa1
Nov 15 18:48:43 pn50 kernel: R13: 00007ffcfa4649d0 R14: 00007ffcfa4649f0 R15: 0000000000000001
Nov 15 18:48:43 pn50 kernel: </TASK>
Using a snapshot from 20210403 + the commits to fix support for recent kernel all works fine.
I had a look at the many cleanup commits but didn't find anything obvious, I'll try to dig more.
git bisect (painful as I had to merge the patchs for supporting new kernels each time) points to commit 355a2df and reverting it seems to fix work.
Looking at the code I see at some bugs:
- while (!rtw_end_of_queue_search(head, pos)) {
+ while (!head == pos) {
This is incorrect and should be while (head != pos)
.
I'll try to fix those errors and test again.
Replacing !head == pos
with head != pos
in 3 places was not enough to make it work again. I'll investigate more later.
I found another one in a few places:
- if ((rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) == _TRUE) {
+ if (phead != pmlmepriv->pscanned) {
Fixing those ones make the driver usable again for me.