syzbot


INFO: rcu detected stall in tcp_setsockopt

Status: upstream: reported on 2024/06/27 09:05
Reported-by: syzbot+41a25e384d93f4bf73dd@syzkaller.appspotmail.com
First crash: 72d, last: 72d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in tcp_setsockopt netfilter syz error 4 22d 375d 0/27 upstream: reported syz repro on 2023/08/29 09:38
android-49 INFO: rcu detected stall in tcp_setsockopt 2 1967d 1973d 0/3 auto-closed as invalid on 2019/10/17 00:42
android-5-15 BUG: soft lockup in tcp_setsockopt 1 127d 127d 0/2 auto-obsoleted due to no activity on 2024/08/01 04:54

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	Tasks blocked on level-0 rcu_node (CPUs 0-1): P2963/1:b..l
	(detected by 1, t=10502 jiffies, g=20065, q=259)
task:udevd           state:R  running task     stack:22624 pid: 2963 ppid:     1 flags:0x00004002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5030 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6376
 preempt_schedule_common+0x83/0xd0 kernel/sched/core.c:6552
 preempt_schedule+0xd9/0xe0 kernel/sched/core.c:6577
 preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:34
 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline]
 _raw_spin_unlock_irqrestore+0x128/0x130 kernel/locking/spinlock.c:194
 spin_unlock_irqrestore include/linux/spinlock.h:418 [inline]
 __wake_up_common_lock kernel/sched/wait.c:140 [inline]
 __wake_up_sync_key+0x121/0x1c0 kernel/sched/wait.c:205
 sock_def_readable+0x135/0x240 net/core/sock.c:3092
 __netlink_sendskb net/netlink/af_netlink.c:1277 [inline]
 netlink_sendskb+0x8e/0x120 net/netlink/af_netlink.c:1283
 netlink_unicast+0x3a1/0x980 net/netlink/af_netlink.c:1371
 netlink_sendmsg+0xa30/0xd60 net/netlink/af_netlink.c:1924
 sock_sendmsg_nosec net/socket.c:704 [inline]
 __sock_sendmsg net/socket.c:716 [inline]
 ____sys_sendmsg+0x59e/0x8f0 net/socket.c:2431
 ___sys_sendmsg+0x252/0x2e0 net/socket.c:2485
 __sys_sendmsg net/socket.c:2514 [inline]
 __do_sys_sendmsg net/socket.c:2523 [inline]
 __se_sys_sendmsg+0x19a/0x260 net/socket.c:2521
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fe352bf8a4b
RSP: 002b:00007ffeccc9f6b8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 000055af5d537df0 RCX: 00007fe352bf8a4b
RDX: 0000000000000000 RSI: 00007ffeccc9f6c8 RDI: 0000000000000004
RBP: 000055af5d609830 R08: 0000000000000001 R09: d06d4a07f562ed3a
R10: 0000000000000010 R11: 0000000000000246 R12: 0000000000000000
R13: 00000000000000af R14: 0000000000000000 R15: 0000000000000000
 </TASK>
rcu: rcu_preempt kthread timer wakeup didn't happen for 10501 jiffies! g20065 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402
rcu: 	Possible timer handling issue on cpu=0 timer-softirq=7334
rcu: rcu_preempt kthread starved for 10502 jiffies! g20065 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->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:I stack:27064 pid:   15 ppid:     2 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5030 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6376
 schedule+0x11b/0x1f0 kernel/sched/core.c:6459
 schedule_timeout+0x1b9/0x300 kernel/time/timer.c:1914
 rcu_gp_fqs_loop+0x2bf/0x1080 kernel/rcu/tree.c:1972
 rcu_gp_kthread+0xa4/0x360 kernel/rcu/tree.c:2145
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:300
 </TASK>
rcu: Stack dump where RCU GP kthread last ran:
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 5429 Comm: syz-executor Not tainted 5.15.161-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
RIP: 0010:__lock_is_held kernel/locking/lockdep.c:5363 [inline]
RIP: 0010:lock_is_held_type+0x7d/0x180 kernel/locking/lockdep.c:5666
Code: 41 89 f6 49 89 ff 48 c7 04 24 00 00 00 00 9c 8f 04 24 4c 8b 24 24 fa 48 c7 c7 00 38 8b 8a e8 0a 12 00 00 65 ff 05 c3 38 e4 75 <41> 83 bd e8 0a 00 00 00 7e 47 4c 89 ed 48 81 c5 f0 0a 00 00 31 db
RSP: 0018:ffffc90000007c78 EFLAGS: 00000002
RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffff888017cdd940
RDX: ffff888017cdd940 RSI: ffffffff8a8b3800 RDI: ffffffff8ad8f740
RBP: 00000000ffffffff R08: ffffffff886c6a7e R09: 0000000000000003
R10: ffffffffffffffff R11: dffffc0000000001 R12: 0000000000000046
R13: ffff888017cdd940 R14: 00000000ffffffff R15: ffff88801e6afb00
FS:  0000555556add500(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f0e78680d38 CR3: 000000005c50b000 CR4: 00000000003506f0
Call Trace:
 <NMI>
 </NMI>
 <IRQ>
 lock_is_held include/linux/lockdep.h:287 [inline]
 advance_sched+0xd0/0x940 net/sched/sch_taprio.c:719
 __run_hrtimer kernel/time/hrtimer.c:1686 [inline]
 __hrtimer_run_queues+0x598/0xcf0 kernel/time/hrtimer.c:1750
 hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1812
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1085 [inline]
 __sysvec_apic_timer_interrupt+0x139/0x470 arch/x86/kernel/apic/apic.c:1102
 sysvec_apic_timer_interrupt+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1096
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:filter_irq_stacks+0x2a/0xa0 kernel/stacktrace.c:397
Code: 55 41 57 41 56 41 55 41 54 53 85 f6 74 72 49 89 fe 41 89 f4 45 31 ff 48 c7 c5 e0 01 40 8a 49 c7 c5 00 00 60 8a 48 89 fb eb 0c <49> ff c7 48 83 c3 08 4d 39 fc 74 4f 48 89 d8 48 c1 e8 03 48 b9 00
RSP: 0018:ffffc90003116c38 EFLAGS: 00000287
RAX: ffffffff882ca7ee RBX: ffffc90003116cd0 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000000000010 RDI: ffffc90003116c70
RBP: ffffffff8a4001e0 R08: dffffc0000000000 R09: fffffbfff1bc8d86
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000010
R13: ffffffff8a600000 R14: ffffc90003116c70 R15: 000000000000000c
 kasan_save_stack mm/kasan/common.c:39 [inline]
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:434 [inline]
 __kasan_slab_alloc+0x98/0xc0 mm/kasan/common.c:467
 kasan_slab_alloc include/linux/kasan.h:254 [inline]
 slab_post_alloc_hook+0x53/0x380 mm/slab.h:519
 slab_alloc_node mm/slub.c:3220 [inline]
 kmem_cache_alloc_node+0x121/0x2c0 mm/slub.c:3256
 alloc_vmap_area+0x1ba/0x19a0 mm/vmalloc.c:1531
 __get_vm_area_node+0x16e/0x2f0 mm/vmalloc.c:2423
 __vmalloc_node_range+0xe3/0x8c0 mm/vmalloc.c:3019
 __vmalloc_node mm/vmalloc.c:3079 [inline]
 vzalloc+0x75/0x80 mm/vmalloc.c:3149
 __do_replace+0xc4/0xae0 net/ipv6/netfilter/ip6_tables.c:1065
 do_replace net/ipv6/netfilter/ip6_tables.c:1160 [inline]
 do_ip6t_set_ctl+0xe9a/0x1220 net/ipv6/netfilter/ip6_tables.c:1646
 nf_setsockopt+0x28a/0x2b0 net/netfilter/nf_sockopt.c:101
 ipv6_setsockopt+0x2f9a/0x43a0 net/ipv6/ipv6_sockglue.c:1011
 tcp_setsockopt+0x23f/0x3680 net/ipv4/tcp.c:3707
 __sys_setsockopt+0x57e/0x990 net/socket.c:2198
 __do_sys_setsockopt net/socket.c:2209 [inline]
 __se_sys_setsockopt net/socket.c:2206 [inline]
 __x64_sys_setsockopt+0xb1/0xc0 net/socket.c:2206
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f0e7852891a
Code: ff ff ff c3 0f 1f 40 00 48 c7 c2 a8 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 a8 ff ff ff f7
RSP: 002b:00007ffca209c668 EFLAGS: 00000206 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00007ffca209c6f0 RCX: 00007f0e7852891a
RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000003
RBP: 0000000000000003 R08: 00000000000003b8 R09: 0079746972756365
R10: 00007f0e78680ce0 R11: 0000000000000206 R12: 00007f0e78680c80
R13: 00007ffca209c68c R14: 0000000000000000 R15: 00007f0e78682e40
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/27 09:04 linux-5.15.y 4878aadf2d15 6ef39602 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: rcu detected stall in tcp_setsockopt
* Struck through repros no longer work on HEAD.