syzbot


INFO: rcu detected stall in nf_setsockopt

Status: upstream: reported on 2024/05/14 06:03
Reported-by: syzbot+6fc0fea6694b17a7c03d@syzkaller.appspotmail.com
First crash: 41d, last: 41d

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	1-...!: (1 GPs behind) idle=eab4/1/0x4000000000000000 softirq=104994/104995 fqs=4
	(detected by 0, t=10502 jiffies, g=171781, q=50 ncpus=2)
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 23964 Comm: syz-executor.3 Not tainted 6.1.90-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
RIP: 0010:lock_release+0x13e/0xa20
Code: 8b 35 c6 e6 97 7e 49 8d 9e dc 0a 00 00 48 89 d8 48 c1 e8 03 42 0f b6 04 38 84 c0 0f 85 da 05 00 00 83 3b 00 0f 85 f0 04 00 00 <4c> 89 74 24 10 4c 8d b4 24 b0 00 00 00 4c 89 f3 48 c1 eb 03 42 80
RSP: 0018:ffffc900001e0b60 EFLAGS: 00000046
RAX: 0000000000000000 RBX: ffff888065b8641c RCX: ffffffff816a8827
RDX: 0000000000000000 RSI: ffffffff8b3d43c0 RDI: ffffffff8b3d4380
RBP: ffffc900001e0ca0 R08: dffffc0000000000 R09: fffffbfff1ce7046
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff9200003c178
R13: ffffffff88b4aceb R14: ffff888065b85940 R15: dffffc0000000000
FS:  0000555555dec480(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020003c80 CR3: 000000007bfa5000 CR4: 00000000003506e0
Call Trace:
 <NMI>
 </NMI>
 <IRQ>
 __raw_spin_unlock include/linux/spinlock_api_smp.h:141 [inline]
 _raw_spin_unlock+0x12/0x40 kernel/locking/spinlock.c:186
 spin_unlock include/linux/spinlock.h:391 [inline]
 advance_sched+0x68b/0x970 net/sched/sch_taprio.c:749
 __run_hrtimer kernel/time/hrtimer.c:1686 [inline]
 __hrtimer_run_queues+0x5e5/0xe50 kernel/time/hrtimer.c:1750
 hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1812
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1095 [inline]
 __sysvec_apic_timer_interrupt+0x156/0x580 arch/x86/kernel/apic/apic.c:1112
 sysvec_apic_timer_interrupt+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1106
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653
RIP: 0010:unwind_next_frame+0x571/0x2220 arch/x86/kernel/unwind_orc.c:461
Code: ef 49 c1 ef 03 41 0f b6 04 3f 84 c0 0f 85 92 16 00 00 48 89 d8 48 c1 e8 03 0f b6 04 38 84 c0 0f 85 a5 16 00 00 41 0f b7 45 00 <89> c3 83 e3 0f 0f 84 94 00 00 00 8d 43 fe 83 f8 07 0f 87 98 00 00
RSP: 0018:ffffc90005dc7440 EFLAGS: 00000246
RAX: 0000000000000015 RBX: ffffffff8ef6f29f RCX: ffffffff8e88f118
RDX: ffffffff8ef6f264 RSI: ffffffff81c785d3 RDI: dffffc0000000000
RBP: ffffffff8ef6f29a R08: 000000000000000a R09: ffffc90005dc7610
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000009
R13: ffffffff8ef6f29e R14: ffffffff8e88f0f0 R15: 1ffffffff1dede53
 arch_stack_walk+0x10d/0x140 arch/x86/kernel/stacktrace.c:25
 stack_trace_save+0x113/0x1c0 kernel/stacktrace.c:122
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
 ____kasan_kmalloc mm/kasan/common.c:374 [inline]
 __kasan_kmalloc+0x97/0xb0 mm/kasan/common.c:383
 kasan_kmalloc include/linux/kasan.h:211 [inline]
 __do_kmalloc_node mm/slab_common.c:955 [inline]
 __kmalloc_node+0xb3/0x230 mm/slab_common.c:962
 kmalloc_node include/linux/slab.h:582 [inline]
 kvmalloc_node+0x6e/0x180 mm/util.c:581
 xt_jumpstack_alloc net/netfilter/x_tables.c:1354 [inline]
 xt_replace_table+0x177/0x790 net/netfilter/x_tables.c:1393
 __do_replace+0x1a4/0xa60 net/ipv4/netfilter/ip_tables.c:1066
 do_replace net/ipv4/netfilter/ip_tables.c:1143 [inline]
 do_ipt_set_ctl+0xee3/0x1230 net/ipv4/netfilter/ip_tables.c:1637
 nf_setsockopt+0x28a/0x2b0 net/netfilter/nf_sockopt.c:101
 __sys_setsockopt+0x57e/0xa00 net/socket.c:2283
 __do_sys_setsockopt net/socket.c:2294 [inline]
 __se_sys_setsockopt net/socket.c:2291 [inline]
 __x64_sys_setsockopt+0xb1/0xc0 net/socket.c:2291
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f879f07faba
Code: ff ff ff c3 0f 1f 40 00 48 c7 c2 b0 ff ff ff f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 49 89 ca b8 36 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 06 c3 0f 1f 44 00 00 48 c7 c2 b0 ff ff ff f7
RSP: 002b:00007ffeada16bf8 EFLAGS: 00000202 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00007ffeada16c80 RCX: 00007f879f07faba
RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000000003 R08: 0000000000000240 R09: 00007ffeada17037
R10: 00007f879f17e1a0 R11: 0000000000000202 R12: 00007f879f17e140
R13: 00007ffeada16c1c R14: 0000000000000000 R15: 00007f879f17eec0
 </TASK>
rcu: rcu_preempt kthread starved for 10494 jiffies! g171781 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x0 ->cpu=0
rcu: 	Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior.
rcu: RCU grace-period kthread stack dump:
task:rcu_preempt     state:R  running task     stack:25816 pid:16    ppid:2      flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5245 [inline]
 __schedule+0x142d/0x4550 kernel/sched/core.c:6558
 schedule+0xbf/0x180 kernel/sched/core.c:6634
 schedule_timeout+0x1b9/0x300 kernel/time/timer.c:1965
 rcu_gp_fqs_loop+0x2d2/0x1150 kernel/rcu/tree.c:1706
 rcu_gp_kthread+0xa3/0x3b0 kernel/rcu/tree.c:1905
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>
rcu: Stack dump where RCU GP kthread last ran:
CPU: 0 PID: 18837 Comm: kworker/u4:15 Not tainted 6.1.90-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:csd_lock_wait kernel/smp.c:424 [inline]
RIP: 0010:smp_call_function_many_cond+0x1fb0/0x3460 kernel/smp.c:998
Code: 2f 44 89 ee 83 e6 01 31 ff e8 ec 42 0b 00 41 83 e5 01 49 bd 00 00 00 00 00 fc ff df 75 0a e8 77 3f 0b 00 e9 1b ff ff ff f3 90 <42> 0f b6 04 2b 84 c0 75 14 41 f7 07 01 00 00 00 0f 84 fe fe ff ff
RSP: 0018:ffffc9000b46f5a0 EFLAGS: 00000293
RAX: ffffffff817f4dfb RBX: 1ffff110173281b1 RCX: ffff888061e01dc0
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc9000b46f980 R08: ffffffff817f4dc4 R09: fffffbfff2093645
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000800000000
R13: dffffc0000000000 R14: 0000000000000001 R15: ffff8880b9940d88
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000200004c0 CR3: 000000000ce8e000 CR4: 00000000003506f0
Call Trace:
 <IRQ>
 </IRQ>
 <TASK>
 on_each_cpu_cond_mask+0x3b/0x80 kernel/smp.c:1166
 on_each_cpu include/linux/smp.h:71 [inline]
 text_poke_sync arch/x86/kernel/alternative.c:1334 [inline]
 text_poke_bp_batch+0x2bb/0x940 arch/x86/kernel/alternative.c:1534
 text_poke_flush arch/x86/kernel/alternative.c:1725 [inline]
 text_poke_finish+0x16/0x30 arch/x86/kernel/alternative.c:1732
 arch_jump_label_transform_apply+0x13/0x20 arch/x86/kernel/jump_label.c:146
 static_key_enable_cpuslocked+0x12e/0x250 kernel/jump_label.c:177
 static_key_enable+0x16/0x20 kernel/jump_label.c:190
 toggle_allocation_gate+0xbf/0x480 mm/kfence/core.c:804
 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292
 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/14 06:02 linux-6.1.y 909ba1f1b414 fdb4c10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: rcu detected stall in nf_setsockopt
* Struck through repros no longer work on HEAD.