syzbot


INFO: rcu detected stall in sys_epoll_ctl

Status: auto-closed as invalid on 2021/10/17 15:58
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 476d, last: 476d

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	0-...!: (0 ticks this GP) idle=ab5/1/0x4000000000000000 softirq=82756/82757 fqs=1 
rcu: 	Tasks blocked on level-0 rcu_node (CPUs 0-1): P12784/1:b..l
	(detected by 1, t=10502 jiffies, g=141961, q=82)
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 1 Comm: systemd Not tainted 5.14.0-rc6-next-20210818-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__kasan_check_read+0x4/0x10 mm/kasan/shadow.c:31
Code: 37 07 48 85 db 0f 85 8b c7 38 07 48 83 c4 68 5b 5d 41 5c 41 5d c3 c3 e9 8b c8 38 07 cc cc cc cc cc cc cc cc cc cc 48 8b 0c 24 <89> f6 31 d2 e9 03 f9 ff ff 0f 1f 00 48 8b 0c 24 89 f6 ba 01 00 00
RSP: 0018:ffffc90000007cd0 EFLAGS: 00000046
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff815b9fe1
RDX: ffff888140160000 RSI: 0000000000000008 RDI: ffffffff8d6e1050
RBP: 1ffff92000000f9d R08: 0000000000000000 R09: 0000000000000001
R10: ffffffff8753e516 R11: 0000000000000000 R12: ffffffff8b97ee00
R13: 185b2d1630b65a2c R14: ffff88807aca02a0 R15: 185b2d1630b65a2c
FS:  00007f318490c500(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000510ff0 CR3: 0000000024e20000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 instrument_atomic_read include/linux/instrumented.h:71 [inline]
 test_bit include/asm-generic/bitops/instrumented-non-atomic.h:134 [inline]
 cpumask_test_cpu include/linux/cpumask.h:379 [inline]
 cpu_online include/linux/cpumask.h:921 [inline]
 trace_lock_release include/trace/events/lock.h:58 [inline]
 lock_release+0xa1/0x720 kernel/locking/lockdep.c:5636
 rcu_lock_release include/linux/rcupdate.h:272 [inline]
 rcu_read_unlock include/linux/rcupdate.h:720 [inline]
 advance_sched+0x510/0x9b0 net/sched/sch_taprio.c:765
 __run_hrtimer kernel/time/hrtimer.c:1685 [inline]
 __hrtimer_run_queues+0x612/0xe60 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+0x96/0xc0 arch/x86/kernel/apic/apic.c:1097
 </IRQ>
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:kmem_cache_free+0x29a/0x5b0 mm/slub.c:3480
Code: 74 24 08 48 89 04 0e 48 8b 7d 00 40 f6 c7 0f 0f 85 30 02 00 00 48 8d 4a 08 65 48 0f c7 4f 30 0f 94 c0 84 c0 74 b7 48 8b 4d 60 <48> 8b b4 24 88 00 00 00 0f 1f 44 00 00 65 8b 05 1a a5 45 7e 83 f8
RSP: 0018:ffffc90000c67c48 EFLAGS: 00000246
RAX: 000000006ffdc800 RBX: 0000000000000000 RCX: ffffffff899a7ee0
RDX: 0000000000000000 RSI: ffffffff817c9a51 RDI: ffffffff81bc3f15
RBP: ffff8880159c0780 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff817c9a38 R11: 0000000000000000 R12: ffffea0001bff700
R13: ffff88806ffdc800 R14: ffff88806ffdc800 R15: ffff88809d9167b0
 free_ephead fs/eventpoll.c:274 [inline]
 free_ephead fs/eventpoll.c:271 [inline]
 ep_remove+0x7e8/0x9e0 fs/eventpoll.c:707
 do_epoll_ctl+0x149e/0x2f40 fs/eventpoll.c:2141
 __do_sys_epoll_ctl fs/eventpoll.c:2186 [inline]
 __se_sys_epoll_ctl fs/eventpoll.c:2177 [inline]
 __x64_sys_epoll_ctl+0x13f/0x1c0 fs/eventpoll.c:2177
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f3182ee32aa
Code: 48 8b 0d f1 fb 2a 00 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 e9 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d be fb 2a 00 f7 d8 64 89 01 48
RSP: 002b:00007ffc93eb45e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e9
RAX: ffffffffffffffda RBX: 0000559ba89d6640 RCX: 00007f3182ee32aa
RDX: 0000000000000007 RSI: 0000000000000002 RDI: 0000000000000004
RBP: 0000000000000001 R08: 0000559ba8a823d0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc93eb4628
R13: 0000559ba7e4cec0 R14: 0000559ba7e1ea20 R15: 0000000000000002
task:syz-executor.4  state:R  running task     stack:30152 pid:12784 ppid:  6594 flags:0x00000000
Call Trace:
 context_switch kernel/sched/core.c:4756 [inline]
 __schedule+0x943/0x2700 kernel/sched/core.c:6029
 preempt_schedule_common+0x49/0xd0 kernel/sched/core.c:6201
 preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:35
 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline]
 _raw_spin_unlock_irqrestore+0x5f/0x70 kernel/locking/spinlock.c:194
 spin_unlock_irqrestore include/linux/spinlock.h:423 [inline]
 timerfd_clock_was_set+0x16b/0x2e0 fs/timerfd.c:113
 clock_was_set+0x5cf/0x790 kernel/time/hrtimer.c:980
 do_settimeofday64 kernel/time/timekeeping.c:1327 [inline]
 do_settimeofday64+0x3a7/0x580 kernel/time/timekeeping.c:1293
 do_sys_settimeofday64 kernel/time/time.c:195 [inline]
 do_sys_settimeofday64+0x1e2/0x250 kernel/time/time.c:169
 __do_sys_clock_settime kernel/time/posix-timers.c:1079 [inline]
 __se_sys_clock_settime kernel/time/posix-timers.c:1067 [inline]
 __x64_sys_clock_settime+0x1a1/0x280 kernel/time/posix-timers.c:1067
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4665e9
RSP: 002b:00007fc0a3631188 EFLAGS: 00000246 ORIG_RAX: 00000000000000e3
RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9
RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000000
RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80
R13: 00007fff95da629f R14: 00007fc0a3631300 R15: 0000000000022000
rcu: rcu_preempt kthread starved for 10500 jiffies! g141961 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:28504 pid:   14 ppid:     2 flags:0x00004000
Call Trace:
 context_switch kernel/sched/core.c:4756 [inline]
 __schedule+0x943/0x2700 kernel/sched/core.c:6029
 schedule+0xd7/0x280 kernel/sched/core.c:6108
 schedule_timeout+0x14e/0x2a0 kernel/time/timer.c:1881
 rcu_gp_fqs_loop+0x186/0x810 kernel/rcu/tree.c:1955
 rcu_gp_kthread+0x1e1/0x320 kernel/rcu/tree.c:2128
 kthread+0x3e5/0x4d0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
rcu: Stack dump where RCU GP kthread last ran:
NMI backtrace for cpu 1
CPU: 1 PID: 1316 Comm: kworker/u4:5 Not tainted 5.14.0-rc6-next-20210818-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events_unbound toggle_allocation_gate
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_check_gp_kthread_starvation.cold+0x200/0x205 kernel/rcu/tree_stall.h:481
 print_other_cpu_stall kernel/rcu/tree_stall.h:586 [inline]
 check_cpu_stall kernel/rcu/tree_stall.h:729 [inline]
 rcu_pending kernel/rcu/tree.c:3878 [inline]
 rcu_sched_clock_irq+0x2138/0x2220 kernel/rcu/tree.c:2597
 update_process_times+0x171/0x200 kernel/time/timer.c:1785
 tick_sched_handle+0x9b/0x180 kernel/time/tick-sched.c:226
 tick_sched_timer+0x1b8/0x2d0 kernel/time/tick-sched.c:1421
 __run_hrtimer kernel/time/hrtimer.c:1685 [inline]
 __hrtimer_run_queues+0x1c3/0xe60 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+0x96/0xc0 arch/x86/kernel/apic/apic.c:1097
 </IRQ>
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:write_comp_data kernel/kcov.c:218 [inline]
RIP: 0010:__sanitizer_cov_trace_const_cmp4+0x17/0x70 kernel/kcov.c:284
Code: 30 f0 4c 89 54 d8 20 48 89 10 5b c3 0f 1f 80 00 00 00 00 41 89 f8 bf 03 00 00 00 4c 8b 14 24 89 f1 65 48 8b 34 25 40 f0 01 00 <e8> 24 f0 ff ff 84 c0 74 4b 48 8b 86 20 15 00 00 8b b6 1c 15 00 00
RSP: 0018:ffffc9000575f970 EFLAGS: 00000202
RAX: 0000000000000001 RBX: ffff8880b9c39d20 RCX: 0000000000000001
RDX: ffff88801d4a5580 RSI: ffff88801d4a5580 RDI: 0000000000000003
RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000001
R10: ffffffff816b11db R11: 0000000000000000 R12: ffffed10173873a5
R13: 0000000000000000 R14: ffff8880b9c39d28 R15: 0000000000000001
 csd_lock_wait kernel/smp.c:440 [inline]
 smp_call_function_many_cond+0x46b/0xc90 kernel/smp.c:969
 on_each_cpu_cond_mask+0x5a/0xa0 kernel/smp.c:1135
 on_each_cpu include/linux/smp.h:71 [inline]
 text_poke_sync arch/x86/kernel/alternative.c:929 [inline]
 text_poke_bp_batch+0x1b3/0x570 arch/x86/kernel/alternative.c:1114
 text_poke_flush arch/x86/kernel/alternative.c:1268 [inline]
 text_poke_flush arch/x86/kernel/alternative.c:1265 [inline]
 text_poke_finish+0x1a/0x30 arch/x86/kernel/alternative.c:1275
 arch_jump_label_transform_apply+0x17/0x30 arch/x86/kernel/jump_label.c:146
 jump_label_update+0x1d5/0x430 kernel/jump_label.c:830
 static_key_enable_cpuslocked+0x1b9/0x270 kernel/jump_label.c:177
 static_key_enable+0x16/0x20 kernel/jump_label.c:190
 toggle_allocation_gate mm/kfence/core.c:626 [inline]
 toggle_allocation_gate+0x100/0x390 mm/kfence/core.c:618
 process_one_work+0x9c9/0x16b0 kernel/workqueue.c:2297
 worker_thread+0x65b/0x1200 kernel/workqueue.c:2444
 kthread+0x3e5/0x4d0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
----------------
Code disassembly (best guess), 2 bytes skipped:
   0:	48 85 db             	test   %rbx,%rbx
   3:	0f 85 8b c7 38 07    	jne    0x738c794
   9:	48 83 c4 68          	add    $0x68,%rsp
   d:	5b                   	pop    %rbx
   e:	5d                   	pop    %rbp
   f:	41 5c                	pop    %r12
  11:	41 5d                	pop    %r13
  13:	c3                   	retq   
  14:	c3                   	retq   
  15:	e9 8b c8 38 07       	jmpq   0x738c8a5
  1a:	cc                   	int3   
  1b:	cc                   	int3   
  1c:	cc                   	int3   
  1d:	cc                   	int3   
  1e:	cc                   	int3   
  1f:	cc                   	int3   
  20:	cc                   	int3   
  21:	cc                   	int3   
  22:	cc                   	int3   
  23:	cc                   	int3   
  24:	48 8b 0c 24          	mov    (%rsp),%rcx
  28:	89 f6                	mov    %esi,%esi <-- trapping instruction
  2a:	31 d2                	xor    %edx,%edx
  2c:	e9 03 f9 ff ff       	jmpq   0xfffff934
  31:	0f 1f 00             	nopl   (%rax)
  34:	48 8b 0c 24          	mov    (%rsp),%rcx
  38:	89 f6                	mov    %esi,%esi
  3a:	ba                   	.byte 0xba
  3b:	01 00                	add    %eax,(%rax)

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-linux-next-kasan-gce-root 2021/08/18 15:55 linux-next f26c3abc432a a2fe1cb5 .config log report info INFO: rcu detected stall in sys_epoll_ctl
* Struck through repros no longer work on HEAD.