syzbot


INFO: rcu detected stall in sys_getsockopt

Status: upstream: reported on 2023/09/28 22:07
Reported-by: syzbot+a1d9a9c068982ed58f71@syzkaller.appspotmail.com
First crash: 146d, last: 41d
Similar bugs (12)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in sys_getsockopt (2) kernel 1 1506d 1506d 0/26 closed as invalid on 2020/01/08 05:23
linux-4.19 INFO: rcu detected stall in sys_getsockopt 1 519d 519d 0/1 auto-obsoleted due to no activity on 2023/01/19 05:52
linux-5.15 INFO: rcu detected stall in sys_getsockopt 1 72d 72d 0/3 upstream: reported on 2023/12/12 16:23
upstream INFO: rcu detected stall in sys_getsockopt (3) kernel 1 1506d 1506d 0/26 closed as invalid on 2020/01/08 05:33
upstream INFO: rcu detected stall in sys_getsockopt (4) kernel 3 1506d 1506d 0/26 closed as invalid on 2020/01/09 08:13
upstream INFO: rcu detected stall in sys_getsockopt (6) kvm 3 924d 992d 0/26 auto-closed as invalid on 2021/11/10 12:58
upstream INFO: rcu detected stall in sys_getsockopt (7) netfilter 2 781d 830d 0/26 closed as invalid on 2022/02/08 10:10
upstream INFO: rcu detected stall in sys_getsockopt (5) sctp 2 1323d 1366d 0/26 auto-closed as invalid on 2020/10/06 19:28
upstream INFO: rcu detected stall in sys_getsockopt (10) mm 9 184d 265d 0/26 auto-obsoleted due to no activity on 2023/11/20 15:28
upstream INFO: rcu detected stall in sys_getsockopt (9) kernel 6 387d 543d 0/26 auto-obsoleted due to no activity on 2023/05/01 05:21
upstream INFO: rcu detected stall in sys_getsockopt (8) net 2 671d 687d 0/26 auto-closed as invalid on 2022/07/21 00:25
upstream INFO: rcu detected stall in sys_getsockopt kernel 2 1541d 1541d 0/26 closed as invalid on 2019/12/04 14:04

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	Tasks blocked on level-0 rcu_node (CPUs 0-1): P3589/1:b..l
	(detected by 1, t=10506 jiffies, g=344429, q=52 ncpus=2)
task:syz-executor.2  state:R  running task     stack:19864 pid:3589  ppid:3573   flags:0x00004002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5245 [inline]
 __schedule+0x142d/0x4550 kernel/sched/core.c:6558
 preempt_schedule_irq+0xf7/0x1c0 kernel/sched/core.c:6870
 irqentry_exit+0x53/0x80 kernel/entry/common.c:433
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653
RIP: 0010:lock_acquire+0x26f/0x5a0 kernel/locking/lockdep.c:5666
Code: 2b 00 74 08 4c 89 f7 e8 af 7c 77 00 f6 44 24 61 02 0f 85 84 01 00 00 41 f7 c7 00 02 00 00 74 01 fb 48 c7 44 24 40 0e 36 e0 45 <4b> c7 44 25 00 00 00 00 00 43 c7 44 25 09 00 00 00 00 43 c7 44 25
RSP: 0018:ffffc90003dfef80 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff920007bfdfc RCX: 1ffff920007bfd9c
RDX: dffffc0000000000 RSI: ffffffff8aebf7c0 RDI: ffffffff8b3cfa80
RBP: ffffc90003dff0d0 R08: dffffc0000000000 R09: fffffbfff2092245
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff920007bfdf8
R13: dffffc0000000000 R14: ffffc90003dfefe0 R15: 0000000000000246
 rcu_lock_acquire include/linux/rcupdate.h:306 [inline]
 rcu_read_lock include/linux/rcupdate.h:747 [inline]
 is_bpf_text_address+0x3e/0x2a0 kernel/bpf/core.c:731
 kernel_text_address+0x9f/0xd0 kernel/extable.c:125
 __kernel_text_address+0x9/0x40 kernel/extable.c:79
 unwind_get_return_address+0x49/0x80 arch/x86/kernel/unwind_orc.c:323
 arch_stack_walk+0xf3/0x140 arch/x86/kernel/stacktrace.c:26
 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
 kmalloc_node include/linux/slab.h:575 [inline]
 kzalloc_node include/linux/slab.h:700 [inline]
 __get_vm_area_node+0x126/0x360 mm/vmalloc.c:2498
 __vmalloc_node_range+0x394/0x1460 mm/vmalloc.c:3183
 __vmalloc_node mm/vmalloc.c:3288 [inline]
 vzalloc+0x75/0x80 mm/vmalloc.c:3361
 alloc_counters+0xd0/0x7b0 net/ipv4/netfilter/ip_tables.c:801
 copy_entries_to_user net/ipv4/netfilter/ip_tables.c:823 [inline]
 get_entries net/ipv4/netfilter/ip_tables.c:1024 [inline]
 do_ipt_get_ctl+0xeb1/0x1890 net/ipv4/netfilter/ip_tables.c:1662
 nf_getsockopt+0x28e/0x2b0 net/netfilter/nf_sockopt.c:116
 ip_getsockopt+0x21a/0x2d0 net/ipv4/ip_sockglue.c:1824
 tcp_getsockopt+0x15c/0x1c0 net/ipv4/tcp.c:4432
 __sys_getsockopt+0x2b2/0x5d0 net/socket.c:2327
 __do_sys_getsockopt net/socket.c:2342 [inline]
 __se_sys_getsockopt net/socket.c:2339 [inline]
 __x64_sys_getsockopt+0xb1/0xc0 net/socket.c:2339
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f4371e7e8ca
RSP: 002b:00007ffe1d209308 EFLAGS: 00000216 ORIG_RAX: 0000000000000037
RAX: ffffffffffffffda RBX: 00007ffe1d209390 RCX: 00007f4371e7e8ca
RDX: 0000000000000041 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000000003 R08: 00007ffe1d20932c R09: 0079746972756365
R10: 00007ffe1d209390 R11: 0000000000000216 R12: 00007f4371f7d800
R13: 00007ffe1d20932c R14: 0000000000000000 R15: 00007f4371f7dec0
 </TASK>
rcu: rcu_preempt kthread timer wakeup didn't happen for 10505 jiffies! g344429 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402
rcu: 	Possible timer handling issue on cpu=0 timer-softirq=164449
rcu: rcu_preempt kthread starved for 10506 jiffies! g344429 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:26680 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:1935
 rcu_gp_fqs_loop+0x2d2/0x1120 kernel/rcu/tree.c:1674
 rcu_gp_kthread+0xa3/0x3a0 kernel/rcu/tree.c:1873
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </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: 32318 Comm: syz-executor.1 Not tainted 6.1.72-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
RIP: 0010:__lock_acquire+0xc9c/0x1f80 kernel/locking/lockdep.c:5019
Code: 00 00 48 c7 c0 60 91 c8 91 48 c1 e8 03 48 bf 00 00 00 00 00 fc ff df 0f b6 04 38 84 c0 0f 85 ea 0b 00 00 83 3d f4 39 5e 10 00 <75> 39 48 63 9c 24 80 00 00 00 48 89 d8 48 c1 e8 06 48 8d 3c c5 20
RSP: 0018:ffffc90000007a80 EFLAGS: 00000046
RAX: 0000000000000004 RBX: ffff88803b6b0ac4 RCX: ffffffff91c89103
RDX: 0000000000000000 RSI: 0000000000000000 RDI: dffffc0000000000
RBP: ffff88803b6b0b30 R08: dffffc0000000000 R09: fffffbfff2092246
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88803b6b0ad8
R13: ffff88803b6b0000 R14: ffff88803b6b0b50 R15: 1ffff110076d616a
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1ad63ad988 CR3: 000000003850b000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <IRQ>
 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:119 [inline]
 _raw_spin_lock_irq+0xcf/0x110 kernel/locking/spinlock.c:170
 __run_hrtimer kernel/time/hrtimer.c:1689 [inline]
 __hrtimer_run_queues+0x6d3/0xe50 kernel/time/hrtimer.c:1749
 hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1811
 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:lockdep_enabled kernel/locking/lockdep.c:119 [inline]
RIP: 0010:lock_acquire+0x12e/0x5a0 kernel/locking/lockdep.c:5638
Code: c0 a4 82 73 8e 48 c1 e8 03 42 0f b6 04 28 84 c0 0f 85 dd 02 00 00 83 3d 93 3d 09 0d 00 0f 84 3f 01 00 00 65 8b 05 a2 33 98 7e <85> c0 0f 85 88 01 00 00 65 48 8b 1d 12 2a 98 7e 48 81 c3 dc 0a 00
RSP: 0018:ffffc90005667260 EFLAGS: 00000202
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff816a44db
RDX: 0000000000000000 RSI: ffffffff8b3cfa60 RDI: ffffffff8b3cfa20
RBP: ffffc900056673b0 R08: dffffc0000000000 R09: fffffbfff1ce69be
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92000acce54
R13: dffffc0000000000 R14: 0000000000000000 R15: 00007fac3fe7cd29
 rcu_lock_acquire include/linux/rcupdate.h:306 [inline]
 rcu_read_lock include/linux/rcupdate.h:747 [inline]
 is_bpf_text_address+0x3e/0x2a0 kernel/bpf/core.c:731
 kernel_text_address+0x9f/0xd0 kernel/extable.c:125
 __kernel_text_address+0x9/0x40 kernel/extable.c:79
 unwind_get_return_address+0x49/0x80 arch/x86/kernel/unwind_orc.c:323
 arch_stack_walk+0xf3/0x140 arch/x86/kernel/stacktrace.c:26
 stack_trace_save+0x113/0x1c0 kernel/stacktrace.c:122
 save_stack+0xf6/0x1e0 mm/page_owner.c:127
 __reset_page_owner+0x52/0x1a0 mm/page_owner.c:148
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1440 [inline]
 free_pcp_prepare mm/page_alloc.c:1490 [inline]
 free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3358
 free_unref_page_list+0x663/0x900 mm/page_alloc.c:3499
 release_pages+0x2836/0x2b40 mm/swap.c:1055
 tlb_batch_pages_flush mm/mmu_gather.c:59 [inline]
 tlb_flush_mmu_free mm/mmu_gather.c:254 [inline]
 tlb_flush_mmu+0xfc/0x210 mm/mmu_gather.c:261
 tlb_finish_mmu+0xce/0x1f0 mm/mmu_gather.c:361
 exit_mmap+0x3c3/0x9f0 mm/mmap.c:3239
 __mmput+0x115/0x3c0 kernel/fork.c:1199
 exit_mm+0x226/0x300 kernel/exit.c:563
 do_exit+0x9f6/0x26a0 kernel/exit.c:856
 do_group_exit+0x202/0x2b0 kernel/exit.c:1019
 __do_sys_exit_group kernel/exit.c:1030 [inline]
 __se_sys_exit_group kernel/exit.c:1028 [inline]
 __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1028
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fac3fe7cd29
Code: Unable to access opcode bytes at 0x7fac3fe7ccff.
RSP: 002b:00007ffc4cdaa008 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 000000000000001e RCX: 00007fac3fe7cd29
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000001 R08: 0000000000000078 R09: 0000000000000000
R10: 0000001b31a20000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000001
 </TASK>

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/12 06:08 linux-6.1.y 7c58bfa711cb dda5a988 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: rcu detected stall in sys_getsockopt
2023/11/28 12:18 linux-6.1.y 69e434a1cb21 9fe51b7c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: rcu detected stall in sys_getsockopt
2023/09/28 22:07 linux-6.1.y d23900f974e0 d265efd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: rcu detected stall in sys_getsockopt
* Struck through repros no longer work on HEAD.