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: 212d, last: 54d
Similar bugs (14)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in sys_getsockopt (2) kernel 1 1572d 1572d 0/26 closed as invalid on 2020/01/08 05:23
linux-4.19 INFO: rcu detected stall in sys_getsockopt 1 585d 585d 0/1 auto-obsoleted due to no activity on 2023/01/19 05:52
upstream INFO: rcu detected stall in sys_getsockopt (11) netfilter 4 118d 131d 0/26 auto-obsoleted due to no activity on 2024/03/30 17:47
linux-5.15 INFO: rcu detected stall in sys_getsockopt 1 137d 137d 0/3 auto-obsoleted due to no activity on 2024/03/21 16:23
upstream INFO: rcu detected stall in sys_getsockopt (3) kernel 1 1572d 1572d 0/26 closed as invalid on 2020/01/08 05:33
upstream INFO: rcu detected stall in sys_getsockopt (4) kernel 3 1572d 1572d 0/26 closed as invalid on 2020/01/09 08:13
upstream INFO: rcu detected stall in sys_getsockopt (6) kvm 3 990d 1057d 0/26 auto-closed as invalid on 2021/11/10 12:58
upstream INFO: rcu detected stall in sys_getsockopt (7) netfilter 2 847d 896d 0/26 closed as invalid on 2022/02/08 10:10
upstream INFO: rcu detected stall in sys_getsockopt (5) sctp 2 1389d 1432d 0/26 auto-closed as invalid on 2020/10/06 19:28
upstream INFO: rcu detected stall in sys_getsockopt (10) mm 9 250d 331d 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 453d 609d 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 737d 753d 0/26 auto-closed as invalid on 2022/07/21 00:25
upstream INFO: rcu detected stall in sys_getsockopt kernel 2 1607d 1607d 0/26 closed as invalid on 2019/12/04 14:04
android-5-15 BUG: soft lockup in sys_getsockopt 3 1h12m 5d07h 0/2 premoderation: reported on 2024/04/23 07:54

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	1-...!: (1 GPs behind) idle=97b4/1/0x4000000000000000 softirq=63841/63842 fqs=1
	(detected by 0, t=10505 jiffies, g=88921, q=73 ncpus=2)
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 14190 Comm: syz-executor.1 Not tainted 6.1.80-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
RIP: 0010:native_save_fl arch/x86/include/asm/irqflags.h:22 [inline]
RIP: 0010:arch_local_save_flags arch/x86/include/asm/irqflags.h:70 [inline]
RIP: 0010:arch_local_irq_save arch/x86/include/asm/irqflags.h:106 [inline]
RIP: 0010:lock_release+0x157/0xa20 kernel/locking/lockdep.c:5678
Code: 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 3c 3b 00 <74> 08 4c 89 f7 e8 bf 80 77 00 4c 89 6c 24 48 48 c7 84 24 b0 00 00
RSP: 0018:ffffc900001e0b80 EFLAGS: 00000046
RAX: 0000000000000000 RBX: 1ffff9200003c186 RCX: ffffffff816a73d7
RDX: 0000000000000000 RSI: ffffffff8b3d1120 RDI: ffffffff8b3d10e0
RBP: ffffc900001e0cb0 R08: dffffc0000000000 R09: fffffbfff1ce6386
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff9200003c17c
R13: ffffffff8179ab90 R14: ffffc900001e0c30 R15: dffffc0000000000
FS:  00005555565fb480(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5e1cd79198 CR3: 0000000092fee000 CR4: 00000000003506e0
DR0: 000000000000513b DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <IRQ>
 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:149 [inline]
 _raw_spin_unlock_irqrestore+0x75/0x130 kernel/locking/spinlock.c:194
 __run_hrtimer kernel/time/hrtimer.c:1682 [inline]
 __hrtimer_run_queues+0x4b0/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:lock_acquire+0x26f/0x5a0 kernel/locking/lockdep.c:5666
Code: 2b 00 74 08 4c 89 f7 e8 af a5 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:ffffc90004a4f880 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff92000949f1c RCX: ffffffff816b06f2
RDX: dffffc0000000000 RSI: ffffffff8aebfec0 RDI: ffffffff8b3d1140
RBP: ffffc90004a4f9d0 R08: dffffc0000000000 R09: fffffbfff209205c
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92000949f18
R13: dffffc0000000000 R14: ffffc90004a4f8e0 R15: 0000000000000246
 lock_sock_nested+0x44/0x100 net/core/sock.c:3484
 do_ip_getsockopt+0x34b/0x2570 net/ipv4/ip_sockglue.c:1572
 ip_getsockopt+0xe9/0x2d0 net/ipv4/ip_sockglue.c:1809
 tcp_getsockopt+0x15c/0x1c0 net/ipv4/tcp.c:4443
 __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:0x7f5e1cc7f94a
Code: c4 c1 e0 1a 0d 00 00 04 00 89 01 e9 e0 fe ff ff e8 3b 05 00 00 66 2e 0f 1f 84 00 00 00 00 00 90 49 89 ca b8 37 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:00007ffc7c2553c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000037
RAX: ffffffffffffffda RBX: 00007f5e1cd79ea0 RCX: 00007f5e1cc7f94a
RDX: 0000000000000080 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000000003 R08: 00007ffc7c2553ec R09: 00007ffc7c2557f7
R10: 00007ffc7c2553f0 R11: 0000000000000246 R12: 00007ffc7c2553f0
R13: 00007ffc7c2553ec R14: 0000000000000002 R15: 0000000000000000
 </TASK>
rcu: rcu_preempt kthread starved for 10500 jiffies! g88921 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:1935
 rcu_gp_fqs_loop+0x2d2/0x1120 kernel/rcu/tree.c:1706
 rcu_gp_kthread+0xa3/0x3a0 kernel/rcu/tree.c:1905
 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:
CPU: 0 PID: 11872 Comm: kworker/u4:8 Not tainted 6.1.80-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/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:ffffc90012cef5a0 EFLAGS: 00000293
RAX: ffffffff817f3fbb RBX: 1ffff110173281b1 RCX: ffff88802b865940
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc90012cef980 R08: ffffffff817f3f84 R09: fffffbfff2092045
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: 00007f74614d56c6 CR3: 000000000ce8e000 CR4: 00000000003506f0
DR0: 000000000000513b DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
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:306
 </TASK>

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/04 17:46 linux-6.1.y a3eb3a74aa8c 3717835d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: rcu detected stall in sys_getsockopt
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.