syzbot


INFO: rcu detected stall in sys_getsockopt (8)

Status: auto-closed as invalid on 2022/07/21 00:25
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 174d, last: 158d
similar bugs (8):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in sys_getsockopt (2) 1 993d 993d 0/24 closed as invalid on 2020/01/08 05:23
linux-4.19 INFO: rcu detected stall in sys_getsockopt 1 6d07h 6d07h 0/1 upstream: reported on 2022/09/21 05:52
upstream INFO: rcu detected stall in sys_getsockopt (3) 1 993d 993d 0/24 closed as invalid on 2020/01/08 05:33
upstream INFO: rcu detected stall in sys_getsockopt (4) 3 993d 993d 0/24 closed as invalid on 2020/01/09 08:13
upstream INFO: rcu detected stall in sys_getsockopt (6) 3 411d 478d 0/24 auto-closed as invalid on 2021/11/10 12:58
upstream INFO: rcu detected stall in sys_getsockopt (7) 2 268d 317d 0/24 closed as invalid on 2022/02/08 10:10
upstream INFO: rcu detected stall in sys_getsockopt (5) 2 810d 853d 0/24 auto-closed as invalid on 2020/10/06 19:28
upstream INFO: rcu detected stall in sys_getsockopt 2 1028d 1028d 0/24 closed as invalid on 2019/12/04 14:04

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	1-...!: (1 ticks this GP) idle=90b/1/0x4000000000000000 softirq=14817/14817 fqs=0 
	(detected by 0, t=10502 jiffies, g=18597, q=76)
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 3621 Comm: syz-executor.5 Not tainted 5.18.0-rc3-syzkaller-00060-g59f0c2447e25 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/29/2022
RIP: 0010:rol32 include/linux/bitops.h:75 [inline]
RIP: 0010:iterate_chain_key kernel/locking/lockdep.c:417 [inline]
RIP: 0010:__lock_acquire+0xc35/0x56c0 kernel/locking/lockdep.c:5017
Code: 0f 84 99 0d 00 00 0f b7 44 24 10 8b 4c 24 50 8b 5c 24 40 c1 e0 0d 66 0b 44 24 08 98 2b 44 24 60 33 44 24 58 89 c2 29 c1 01 d8 <c1> c2 06 31 ca 41 89 d7 29 d3 01 c2 41 c1 c7 08 41 31 df 44 89 f9
RSP: 0018:ffffc90000de0b80 EFLAGS: 00000093
RAX: 00000000ffffbfd3 RBX: 00000000fffffffe RCX: 000000000000402a
RDX: 00000000ffffbfd5 RSI: 0000000000000008 RDI: ffffffff90059c20
RBP: 0000000000000002 R08: 0000000000000000 R09: ffffffff90057907
R10: fffffbfff200af20 R11: 0000000000000001 R12: ffff888022a961b0
R13: ffff888022a95700 R14: 0000000000000001 R15: 19e6fac1599d33b4
FS:  0000555557188400(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f0d7ed691b8 CR3: 00000000452d5000 CR4: 0000000000350ee0
Call Trace:
 <IRQ>
 lock_acquire kernel/locking/lockdep.c:5641 [inline]
 lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5606
 rcu_lock_acquire include/linux/rcupdate.h:268 [inline]
 rcu_read_lock include/linux/rcupdate.h:694 [inline]
 advance_sched+0x4a5/0x9a0 net/sched/sch_taprio.c:768
 __run_hrtimer kernel/time/hrtimer.c:1685 [inline]
 __hrtimer_run_queues+0x609/0xe50 kernel/time/hrtimer.c:1749
 hrtimer_interrupt+0x31c/0x790 kernel/time/hrtimer.c:1811
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1086 [inline]
 __sysvec_apic_timer_interrupt+0x146/0x530 arch/x86/kernel/apic/apic.c:1103
 sysvec_apic_timer_interrupt+0x8e/0xc0 arch/x86/kernel/apic/apic.c:1097
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:do_raw_spin_lock+0x1bc/0x2a0 kernel/locking/spinlock_debug.c:118
Code: 48 b8 00 00 00 00 00 fc ff df 4c 89 65 10 48 c7 04 03 00 00 00 00 48 8b 44 24 60 65 48 2b 04 25 28 00 00 00 0f 85 c6 00 00 00 <48> 83 c4 68 5b 5d 41 5c 41 5d 41 5e c3 48 c7 c2 40 a8 bf 8b 89 44
RSP: 0018:ffffc90003a6fab0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 1ffff9200074df57 RCX: ffffffff815e18f0
RDX: 1ffff1100e776795 RSI: 0000000000000004 RDI: ffffc90003a6fad8
RBP: ffff888073bb3c98 R08: 0000000000000001 R09: 0000000000000003
R10: fffff5200074df5b R11: 0000000000000000 R12: ffff888022a95700
R13: ffff888073bb3ca8 R14: 0000000000000001 R15: 00000000ffffffa4
 spin_lock_bh include/linux/spinlock.h:354 [inline]
 release_sock+0x1b/0x1b0 net/core/sock.c:3325
 do_ip_getsockopt+0x2e6/0x18e0 net/ipv4/ip_sockglue.c:1737
 ip_getsockopt+0x84/0x1c0 net/ipv4/ip_sockglue.c:1770
 tcp_getsockopt+0x86/0xd0 net/ipv4/tcp.c:4295
 __sys_getsockopt+0x21f/0x6a0 net/socket.c:2224
 __do_sys_getsockopt net/socket.c:2239 [inline]
 __se_sys_getsockopt net/socket.c:2236 [inline]
 __x64_sys_getsockopt+0xba/0x150 net/socket.c:2236
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f0d7ec8a70a
Code: 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 37 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc7e2f8288 EFLAGS: 00000246 ORIG_RAX: 0000000000000037
RAX: ffffffffffffffda RBX: 00007f0d7ed69840 RCX: 00007f0d7ec8a70a
RDX: 0000000000000080 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000000001 R08: 00007ffc7e2f82ac R09: 00007ffc7e2f8330
R10: 00007ffc7e2f82b0 R11: 0000000000000246 R12: 0000000000000003
R13: 00007ffc7e2f82b0 R14: 00007f0d7ed69148 R15: 00007ffc7e2f82ac
 </TASK>
rcu: rcu_preempt kthread timer wakeup didn't happen for 10501 jiffies! g18597 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402
rcu: 	Possible timer handling issue on cpu=1 timer-softirq=7441
rcu: rcu_preempt kthread starved for 10502 jiffies! g18597 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=1
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:28728 pid:   16 ppid:     2 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5073 [inline]
 __schedule+0xa9a/0x4cc0 kernel/sched/core.c:6388
 schedule+0xd2/0x1f0 kernel/sched/core.c:6460
 schedule_timeout+0x14a/0x2a0 kernel/time/timer.c:1884
 rcu_gp_fqs_loop+0x186/0x810 kernel/rcu/tree.c:1971
 rcu_gp_kthread+0x1de/0x320 kernel/rcu/tree.c:2144
 kthread+0x2e9/0x3a0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>
rcu: Stack dump where RCU GP kthread last ran:
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 3621 Comm: syz-executor.5 Not tainted 5.18.0-rc3-syzkaller-00060-g59f0c2447e25 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/29/2022
RIP: 0010:instrument_atomic_read include/linux/instrumented.h:71 [inline]
RIP: 0010:test_bit include/asm-generic/bitops/instrumented-non-atomic.h:134 [inline]
RIP: 0010:__lock_acquire+0x1027/0x56c0 kernel/locking/lockdep.c:4999
Code: c7 07 0f 0b e9 2b fe ff ff 48 63 5c 24 10 be 08 00 00 00 48 8d 43 3f 48 85 db 48 0f 49 c3 48 c1 f8 06 48 8d 3c c5 00 79 05 90 <e8> 54 77 67 00 48 0f a3 1d ac 2e a8 0e 0f 82 bb f8 ff ff e8 21 00
RSP: 0018:ffffc90000de0af0 EFLAGS: 00000056
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 1ffffffff200afae
RDX: 0000000000000004 RSI: 0000000000000008 RDI: ffffffff90057900
RBP: ffff888022a961fa R08: 0000000000000000 R09: ffffffff90057907
R10: 0000000000000000 R11: 0000000000000001 R12: ffff888022a961d8
R13: ffff888022a95700 R14: 0000000000000000 R15: dffffc0000000000
FS:  0000555557188400(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f0d7ed691b8 CR3: 00000000452d5000 CR4: 0000000000350ee0
Call Trace:
 <IRQ>
 lock_acquire kernel/locking/lockdep.c:5641 [inline]
 lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5606
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
 _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162
 debug_object_deactivate lib/debugobjects.c:735 [inline]
 debug_object_deactivate+0x101/0x300 lib/debugobjects.c:723
 debug_hrtimer_deactivate kernel/time/hrtimer.c:425 [inline]
 debug_deactivate kernel/time/hrtimer.c:481 [inline]
 __run_hrtimer kernel/time/hrtimer.c:1653 [inline]
 __hrtimer_run_queues+0x3f8/0xe50 kernel/time/hrtimer.c:1749
 hrtimer_interrupt+0x31c/0x790 kernel/time/hrtimer.c:1811
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1086 [inline]
 __sysvec_apic_timer_interrupt+0x146/0x530 arch/x86/kernel/apic/apic.c:1103
 sysvec_apic_timer_interrupt+0x8e/0xc0 arch/x86/kernel/apic/apic.c:1097
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:do_raw_spin_lock+0x1bc/0x2a0 kernel/locking/spinlock_debug.c:118
Code: 48 b8 00 00 00 00 00 fc ff df 4c 89 65 10 48 c7 04 03 00 00 00 00 48 8b 44 24 60 65 48 2b 04 25 28 00 00 00 0f 85 c6 00 00 00 <48> 83 c4 68 5b 5d 41 5c 41 5d 41 5e c3 48 c7 c2 40 a8 bf 8b 89 44
RSP: 0018:ffffc90003a6fab0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 1ffff9200074df57 RCX: ffffffff815e18f0
RDX: 1ffff1100e776795 RSI: 0000000000000004 RDI: ffffc90003a6fad8
RBP: ffff888073bb3c98 R08: 0000000000000001 R09: 0000000000000003
R10: fffff5200074df5b R11: 0000000000000000 R12: ffff888022a95700
R13: ffff888073bb3ca8 R14: 0000000000000001 R15: 00000000ffffffa4
 spin_lock_bh include/linux/spinlock.h:354 [inline]
 release_sock+0x1b/0x1b0 net/core/sock.c:3325
 do_ip_getsockopt+0x2e6/0x18e0 net/ipv4/ip_sockglue.c:1737
 ip_getsockopt+0x84/0x1c0 net/ipv4/ip_sockglue.c:1770
 tcp_getsockopt+0x86/0xd0 net/ipv4/tcp.c:4295
 __sys_getsockopt+0x21f/0x6a0 net/socket.c:2224
 __do_sys_getsockopt net/socket.c:2239 [inline]
 __se_sys_getsockopt net/socket.c:2236 [inline]
 __x64_sys_getsockopt+0xba/0x150 net/socket.c:2236
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f0d7ec8a70a
Code: 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 37 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc7e2f8288 EFLAGS: 00000246 ORIG_RAX: 0000000000000037
RAX: ffffffffffffffda RBX: 00007f0d7ed69840 RCX: 00007f0d7ec8a70a
RDX: 0000000000000080 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000000001 R08: 00007ffc7e2f82ac R09: 00007ffc7e2f8330
R10: 00007ffc7e2f82b0 R11: 0000000000000246 R12: 0000000000000003
R13: 00007ffc7e2f82b0 R14: 00007f0d7ed69148 R15: 00007ffc7e2f82ac
 </TASK>
----------------
Code disassembly (best guess):
   0:	0f 84 99 0d 00 00    	je     0xd9f
   6:	0f b7 44 24 10       	movzwl 0x10(%rsp),%eax
   b:	8b 4c 24 50          	mov    0x50(%rsp),%ecx
   f:	8b 5c 24 40          	mov    0x40(%rsp),%ebx
  13:	c1 e0 0d             	shl    $0xd,%eax
  16:	66 0b 44 24 08       	or     0x8(%rsp),%ax
  1b:	98                   	cwtl
  1c:	2b 44 24 60          	sub    0x60(%rsp),%eax
  20:	33 44 24 58          	xor    0x58(%rsp),%eax
  24:	89 c2                	mov    %eax,%edx
  26:	29 c1                	sub    %eax,%ecx
  28:	01 d8                	add    %ebx,%eax
* 2a:	c1 c2 06             	rol    $0x6,%edx <-- trapping instruction
  2d:	31 ca                	xor    %ecx,%edx
  2f:	41 89 d7             	mov    %edx,%r15d
  32:	29 d3                	sub    %edx,%ebx
  34:	01 c2                	add    %eax,%edx
  36:	41 c1 c7 08          	rol    $0x8,%r15d
  3a:	41 31 df             	xor    %ebx,%r15d
  3d:	44 89 f9             	mov    %r15d,%ecx

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2022/04/22 00:24 upstream 59f0c2447e25 2738b391 .config log report info INFO: rcu detected stall in sys_getsockopt
ci-upstream-kasan-gce-smack-root 2022/04/06 08:31 upstream 3e732ebf7316 0127c10f .config log report info INFO: rcu detected stall in sys_getsockopt
* Struck through repros no longer work on HEAD.