syzbot


INFO: rcu detected stall in sys_setsockopt (3)

Status: closed as invalid on 2022/02/08 10:00
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 394d, last: 367d
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in sys_setsockopt (2) 2 494d 536d 0/24 auto-closed as invalid on 2021/10/27 00:02
upstream INFO: rcu detected stall in sys_setsockopt 1 656d 656d 0/24 auto-closed as invalid on 2021/05/17 17:51
linux-4.19 BUG: soft lockup in sys_setsockopt 3 589d 617d 0/1 auto-closed as invalid on 2021/08/23 07:10

Sample crash report:
rcu: INFO: rcu_preempt self-detected stall on CPU
rcu: 	0-...!: (10499 ticks this GP) idle=503/1/0x4000000000000000 softirq=76691/76691 fqs=1 
	(t=10500 jiffies g=141009 q=11)
rcu: rcu_preempt kthread starved for 10497 jiffies! g141009 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x0 ->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:R  running task     stack:28688 pid:   14 ppid:     2 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4969 [inline]
 __schedule+0xa9a/0x4940 kernel/sched/core.c:6250
 schedule+0xd2/0x260 kernel/sched/core.c:6323
 schedule_timeout+0x14a/0x2a0 kernel/time/timer.c:1881
 rcu_gp_fqs_loop+0x186/0x810 kernel/rcu/tree.c:1955
 rcu_gp_kthread+0x1de/0x320 kernel/rcu/tree.c:2128
 kthread+0x405/0x4f0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </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: 29076 Comm: syz-executor.0 Not tainted 5.15.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:lock_is_held_type+0x0/0x140 kernel/locking/lockdep.c:5665
Code: 48 c7 c6 20 0d 8c 89 48 c7 c7 a0 09 8c 89 89 44 24 04 e8 5a 89 bc ff 0f 0b 8b 44 24 04 eb bd 66 66 2e 0f 1f 84 00 00 00 00 00 <41> 57 41 56 41 55 41 bd ff ff ff ff 41 54 55 53 48 83 ec 08 8b 0d
RSP: 0018:ffffc90000dc0e38 EFLAGS: 00000046
RAX: 0000000000010001 RBX: ffff888035200748 RCX: 0000000000000000
RDX: ffff888019461d00 RSI: 00000000ffffffff RDI: ffff8880b9d2a418
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff8167503c R11: 0000000000000000 R12: 000000fbf647f2e5
R13: ffff8880b9d2a480 R14: ffff8880b9d2a400 R15: ffff8880b9d2a400
FS:  00007fc94a9c7700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020c00000 CR3: 000000007d778000 CR4: 00000000003526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
Call Trace:
 <IRQ>
 lock_is_held include/linux/lockdep.h:283 [inline]
 __run_hrtimer kernel/time/hrtimer.c:1651 [inline]
 __hrtimer_run_queues+0x95a/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:638
RIP: 0010:check_kcov_mode kernel/kcov.c:166 [inline]
RIP: 0010:__sanitizer_cov_trace_pc+0x1c/0x60 kernel/kcov.c:200
Code: be b0 01 00 00 e8 b4 ff ff ff 31 c0 c3 90 65 8b 05 09 89 8a 7e 89 c1 48 8b 34 24 81 e1 00 01 00 00 65 48 8b 14 25 40 70 02 00 <a9> 00 01 ff 00 74 0e 85 c9 74 35 8b 82 a4 15 00 00 85 c0 74 2b 8b
RSP: 0018:ffffc900172bfc08 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 0000000000000008 RCX: 0000000000000000
RDX: ffff888019461d00 RSI: ffffffff83dafbe1 RDI: 0000000000000003
RBP: ffffc900172bfcc0 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff83dafbd7 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000020c0ac98 R14: 0000000020c0ac98 R15: 0000000000000000
 _copy_from_user+0x91/0x180 lib/usercopy.c:14
 copy_from_user include/linux/uaccess.h:192 [inline]
 copy_from_sockptr_offset include/linux/sockptr.h:48 [inline]
 tcp_repair_options_est net/ipv4/tcp.c:3111 [inline]
 do_tcp_setsockopt net/ipv4/tcp.c:3505 [inline]
 tcp_setsockopt+0x20e2/0x2520 net/ipv4/tcp.c:3655
 __sys_setsockopt+0x2db/0x610 net/socket.c:2176
 __do_sys_setsockopt net/socket.c:2187 [inline]
 __se_sys_setsockopt net/socket.c:2184 [inline]
 __x64_sys_setsockopt+0xba/0x150 net/socket.c:2184
 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:0x7fc94d451ae9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fc94a9c7188 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00007fc94d564f60 RCX: 00007fc94d451ae9
RDX: 0000000000000016 RSI: 0000000000000006 RDI: 0000000000000004
RBP: 00007fc94d4abf6d R08: 0000000018835372 R09: 0000000000000000
R10: 0000000020000240 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fc94da98b2f R14: 00007fc94a9c7300 R15: 0000000000022000
 </TASK>
NMI backtrace for cpu 0
CPU: 0 PID: 29075 Comm: syz-executor.1 Not tainted 5.15.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 nmi_cpu_backtrace.cold+0x47/0x144 lib/nmi_backtrace.c:105
 nmi_trigger_cpumask_backtrace+0x1ae/0x220 lib/nmi_backtrace.c:62
 trigger_single_cpu_backtrace include/linux/nmi.h:164 [inline]
 rcu_dump_cpu_stacks+0x25e/0x3f0 kernel/rcu/tree_stall.h:343
 print_cpu_stall kernel/rcu/tree_stall.h:627 [inline]
 check_cpu_stall kernel/rcu/tree_stall.h:711 [inline]
 rcu_pending kernel/rcu/tree.c:3878 [inline]
 rcu_sched_clock_irq.cold+0x9d/0x746 kernel/rcu/tree.c:2597
 update_process_times+0x16d/0x200 kernel/time/timer.c:1785
 tick_sched_handle+0x9b/0x180 kernel/time/tick-sched.c:226
 tick_sched_timer+0x1b0/0x2d0 kernel/time/tick-sched.c:1421
 __run_hrtimer kernel/time/hrtimer.c:1685 [inline]
 __hrtimer_run_queues+0x1c0/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:638
RIP: 0010:__might_fault mm/memory.c:5253 [inline]
RIP: 0010:__might_fault+0xc0/0x170 mm/memory.c:5238
Code: 00 48 83 bb 10 05 00 00 00 74 b2 e8 7a 8e cb ff 48 b8 00 00 00 00 00 fc ff df 65 48 8b 1c 25 40 70 02 00 48 8d bb 10 05 00 00 <48> 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 8e 00 00 00 48 8b bb 10 05
RSP: 0018:ffffc9001733fbf0 EFLAGS: 00000246
RAX: dffffc0000000000 RBX: ffff888011988000 RCX: ffffc9000aab9000
RDX: 0000000000040000 RSI: ffffffff81ac5876 RDI: ffff888011988510
RBP: ffffffff89e4d200 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff81ac581f R11: 0000000000000000 R12: 000000000000000d
R13: 0000000020cddea8 R14: 0000000020cddea8 R15: 0000000000000000
 _copy_from_user+0x27/0x180 lib/usercopy.c:13
 copy_from_user include/linux/uaccess.h:192 [inline]
 copy_from_sockptr_offset include/linux/sockptr.h:48 [inline]
 tcp_repair_options_est net/ipv4/tcp.c:3111 [inline]
 do_tcp_setsockopt net/ipv4/tcp.c:3505 [inline]
 tcp_setsockopt+0x20e2/0x2520 net/ipv4/tcp.c:3655
 __sys_setsockopt+0x2db/0x610 net/socket.c:2176
 __do_sys_setsockopt net/socket.c:2187 [inline]
 __se_sys_setsockopt net/socket.c:2184 [inline]
 __x64_sys_setsockopt+0xba/0x150 net/socket.c:2184
 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:0x7fe6d575fae9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe6d2cd5188 EFLAGS: 00000246 ORIG_RAX: 0000000000000036
RAX: ffffffffffffffda RBX: 00007fe6d5872f60 RCX: 00007fe6d575fae9
RDX: 0000000000000016 RSI: 0000000000000006 RDI: 0000000000000004
RBP: 00007fe6d57b9f6d R08: 0000000018835372 R09: 0000000000000000
R10: 0000000020000240 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fe6d5da6b2f R14: 00007fe6d2cd5300 R15: 0000000000022000
 </TASK>
----------------
Code disassembly (best guess):
   0:	48 c7 c6 20 0d 8c 89 	mov    $0xffffffff898c0d20,%rsi
   7:	48 c7 c7 a0 09 8c 89 	mov    $0xffffffff898c09a0,%rdi
   e:	89 44 24 04          	mov    %eax,0x4(%rsp)
  12:	e8 5a 89 bc ff       	callq  0xffbc8971
  17:	0f 0b                	ud2
  19:	8b 44 24 04          	mov    0x4(%rsp),%eax
  1d:	eb bd                	jmp    0xffffffdc
  1f:	66 66 2e 0f 1f 84 00 	data16 nopw %cs:0x0(%rax,%rax,1)
  26:	00 00 00 00
* 2a:	41 57                	push   %r15 <-- trapping instruction
  2c:	41 56                	push   %r14
  2e:	41 55                	push   %r13
  30:	41 bd ff ff ff ff    	mov    $0xffffffff,%r13d
  36:	41 54                	push   %r12
  38:	55                   	push   %rbp
  39:	53                   	push   %rbx
  3a:	48 83 ec 08          	sub    $0x8,%rsp
  3e:	8b                   	.byte 0x8b
  3f:	0d                   	.byte 0xd

Crashes (4):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce 2021/11/14 01:47 upstream ccfff0a2bd2a 83f5c9b5 .config log report info INFO: rcu detected stall in sys_setsockopt
ci-upstream-net-kasan-gce 2021/12/03 03:00 net-next fc993be36f9e 61f86278 .config log report info INFO: rcu detected stall in sys_setsockopt
ci-upstream-linux-next-kasan-gce-root 2021/11/06 10:37 linux-next 6a37ebbe07bf 4c1be0be .config log report info INFO: rcu detected stall in sys_setsockopt
ci-upstream-linux-next-kasan-gce-root 2021/11/09 10:42 linux-next c8109c2ba35e 8ab17e57 .config log report info BUG: soft lockup in sys_setsockopt
* Struck through repros no longer work on HEAD.