Flint 2 (GL-MT6000) on 4.9.1-op25 beta3 (OpenWrt 25.12.5, kernel 6.12.94) locked up on Nov 2: no LAN or WAN traffic for about 10 minutes until a power cycle. I caught the log with remote syslog.
The kernel reported an RCU stall three times, 3 minutes apart (t=6001, 24006 and 42011 jiffies), always on the same two CPUs:
- CPU 2:
port_forward.lua(PID 23496) is inside a write to/proc/port_forward, gets interrupted, and the softirq spins inqueued_read_lock_slowpathfrom a netfilter hook. - CPU 1: idle; a softirq spins on the same read lock from the same hook.
The hook frames aren't symbolized (out-of-tree module), but they look like the port_forward module. My guess: the procfs write handler takes the write lock without disabling bottom halves, and the netfilter hook takes the read lock in softirq, so CPU 2 deadlocks on itself.
CPU 2, first stall:
rcu: INFO: rcu_sched self-detected stall on CPU
CPU: 2 UID: 0 PID: 23496 Comm: port_forward.lu Tainted: G O 6.12.94 #0
Hardware name: GL.iNet GL-MT6000 (DT)
pc : queued_read_lock_slowpath+0xf4/0x1a0
Call trace:
queued_read_lock_slowpath+0xf4/0x1a0
0xffffffc0793eb96c
nf_hook_slow+0x4c/0x128
ip_rcv+0x84/0xc0
__netif_receive_skb_one_core+0x4c/0x60
__netif_receive_skb+0x1c/0x68
netif_receive_skb+0x2c/0x120
br_pass_frame_up+0xfc/0x1c0
br_handle_frame_finish+0x524/0x5d8
br_handle_frame+0x14c/0x488
__netif_receive_skb_core.constprop.0+0x240/0xed0
__netif_receive_skb_list_core+0x110/0x290
netif_receive_skb_list_internal+0x1c0/0x300
napi_complete_done+0x98/0x220
gro_cell_poll+0x88/0xc0
__napi_poll+0x3c/0x1d0
net_rx_action+0x368/0x3e0
handle_softirqs+0x124/0x300
__do_softirq+0x18/0x20
____do_softirq+0x14/0x28
call_on_irq_stack+0x30/0x70
do_softirq_own_stack+0x20/0x38
irq_exit_rcu+0x88/0xc0
el1_interrupt+0x34/0x50
el1h_64_irq_handler+0x14/0x20
el1h_64_irq+0x68/0x70
0xffffffc0793eb070
0xffffffc0793ebf70
proc_reg_write+0xb0/0x100
vfs_writev+0x1b4/0x330
do_writev+0x6c/0x100
__arm64_sys_writev+0x24/0x40
invoke_syscall.constprop.0+0x50/0xc0
do_el0_svc+0x44/0xc0
el0_svc+0x18/0x58
el0t_64_sync_handler+0xc0/0xe0
el0t_64_sync+0x150/0x158
CPU 1 shows the same top half (queued_read_lock_slowpath → 0xffffffc0793eb96c → nf_hook_slow → ip_rcv → bridge → process_backlog → softirq) on top of default_idle_call.
Setup: 4 port forwards created in the GL UI (UDP 5060, UDP 10000-10099, UDP 10100-10199, TCP 853). IPv6 on (DHCPv6). HW and SW flow offload off. DPI (netifyd) running, AdGuard Home off.
Nobody was using the admin panel at the time. I don't know what triggered the port_forward.lua run; it's called from /etc/hotplug.d/iface/99-port-forward.sh on every ifup/ifupdate. I've added logging of iface hotplug events and set kernel.panic_on_rcu_stall=1, so if it happens again it should reboot and leave the trace in pstore.
The 4.11.0-op25-beta1 release notes don't mention port forwarding, so I haven't upgraded yet. Is this fixed there? Full log available if useful.