syzbot


INFO: rcu detected stall in timerfd_create

Status: auto-closed as invalid on 2021/11/29 23:25
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 451d, last: 451d

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	0-...!: (1 GPs behind) idle=397/1/0x4000000000000000 softirq=62335/62336 fqs=1 
rcu: 	Tasks blocked on level-0 rcu_node (CPUs 0-1): P1/1:b..l P28569/1:b..l
	(detected by 1, t=10502 jiffies, g=102049, q=65)
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 4933 Comm: systemd-timesyn Not tainted 5.14.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:preempt_count arch/x86/include/asm/preempt.h:27 [inline]
RIP: 0010:preempt_count_sub+0x3b/0x150 kernel/sched/core.c:5427
Code: fc ff df 48 89 c1 83 e0 07 48 c1 e9 03 83 c0 03 0f b6 14 11 38 d0 7c 08 84 d2 0f 85 e4 00 00 00 8b 0d f9 18 d4 0e 85 c9 75 1b <65> 8b 05 0e 21 b3 7e 89 c2 81 e2 ff ff ff 7f 39 da 7c 13 81 fb fe
RSP: 0018:ffffc90000007d30 EFLAGS: 00000046
RAX: 0000000000000003 RBX: 0000000000000001 RCX: 0000000000000000
RDX: 0000000000000004 RSI: 0000000000000004 RDI: 0000000000000001
RBP: ffffffff903cf960 R08: 0000000000000000 R09: ffffffff903cf963
R10: fffffbfff2079f2c R11: 0000000000000000 R12: dffffc0000000000
R13: ffffffff898dc5a0 R14: 1ffff92000000fad R15: ffff88801984e340
FS:  00007f9f4605a8c0(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000056c030 CR3: 0000000029d55000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline]
 _raw_spin_unlock_irqrestore+0x3d/0x70 kernel/locking/spinlock.c:194
 debug_object_deactivate lib/debugobjects.c:757 [inline]
 debug_object_deactivate+0x264/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>
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:161 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x38/0x70 kernel/locking/spinlock.c:194
Code: 74 24 10 e8 1a 51 2c f8 48 89 ef e8 62 c7 2c f8 81 e3 00 02 00 00 75 25 9c 58 f6 c4 02 75 2d 48 85 db 74 01 fb bf 01 00 00 00 <e8> d3 88 20 f8 65 8b 05 1c aa d3 76 85 c0 74 0a 5b 5d c3 e8 10 32
RSP: 0018:ffffc90001877e28 EFLAGS: 00000206
RAX: 0000000000000046 RBX: 0000000000000200 RCX: 1ffffffff1ad98ed
RDX: 0000000000000000 RSI: ffffffff817b7851 RDI: 0000000000000001
RBP: ffffffff90284f18 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff817b7838 R11: 000000000000003f R12: ffff888010840600
R13: 0000000000000150 R14: ffff88823bd7d000 R15: dffffc0000000000
 kfence_guarded_alloc mm/kfence/core.c:328 [inline]
 __kfence_alloc+0x7b2/0xc90 mm/kfence/core.c:776
 kfence_alloc include/linux/kfence.h:124 [inline]
 slab_alloc mm/slab.c:3310 [inline]
 kmem_cache_alloc_trace+0x292/0x480 mm/slab.c:3573
 kmalloc include/linux/slab.h:591 [inline]
 kzalloc include/linux/slab.h:721 [inline]
 __do_sys_timerfd_create+0x265/0x370 fs/timerfd.c:428
 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:0x7f9f4544f787
Code: 00 00 48 89 d0 48 83 c4 08 48 3d 01 f0 ff ff 73 01 c3 48 8b 0d 02 f7 2a 00 f7 d8 64 89 01 48 83 c8 ff c3 b8 1b 01 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d e1 f6 2a 00 f7 d8 64 89 01 48
RSP: 002b:00007ffc03443ee8 EFLAGS: 00000246 ORIG_RAX: 000000000000011b
RAX: ffffffffffffffda RBX: 000056246d19e630 RCX: 00007f9f4544f787
RDX: 0000000000000000 RSI: 0000000000080800 RDI: 0000000000000000
RBP: 00007ffc03443f58 R08: 0000000000000020 R09: 000000000000000d
R10: 0000000000000000 R11: 0000000000000246 R12: 000056246d1a0fa0
R13: 0000000000000064 R14: 0000000000000066 R15: 0000000000000000
task:syz-executor.3  state:R  running task     stack:29760 pid:28569 ppid:  8453 flags:0x00000000
Call Trace:
 context_switch kernel/sched/core.c:4940 [inline]
 __schedule+0x940/0x26f0 kernel/sched/core.c:6287
 preempt_schedule_common+0x45/0xc0 kernel/sched/core.c:6459
 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+0x57/0x70 kernel/locking/spinlock.c:194
 spin_unlock_irqrestore include/linux/spinlock.h:418 [inline]
 timerfd_clock_was_set+0x162/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+0x3e2/0x5c0 kernel/time/timekeeping.c:1293
 do_sys_settimeofday64 kernel/time/time.c:195 [inline]
 do_sys_settimeofday64+0x1de/0x260 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+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4665f9
RSP: 002b:00007f10bbe18188 EFLAGS: 00000246 ORIG_RAX: 00000000000000e3
RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665f9
RDX: 0000000000000000 RSI: 0000000020000640 RDI: 0000000000000000
RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80
R13: 00007ffed167b8ef R14: 00007f10bbe18300 R15: 0000000000022000
task:systemd         state:R  running task     stack:22328 pid:    1 ppid:     0 flags:0x00000000
Call Trace:
 context_switch kernel/sched/core.c:4940 [inline]
 __schedule+0x940/0x26f0 kernel/sched/core.c:6287
 preempt_schedule_common+0x45/0xc0 kernel/sched/core.c:6459
 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+0x57/0x70 kernel/locking/spinlock.c:194
 spin_unlock_irqrestore include/linux/spinlock.h:418 [inline]
 __wake_up_common_lock+0xde/0x130 kernel/sched/wait.c:140
 sock_def_readable+0xec/0x4e0 net/core/sock.c:3015
 unix_dgram_sendmsg+0x1032/0x1d30 net/unix/af_unix.c:1852
 sock_sendmsg_nosec net/socket.c:703 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:723
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2395
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2449
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2478
 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:0x7f2df2a57eb0
RSP: 002b:00007ffd604fce10 EFLAGS: 00000293 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000025 RCX: 00007f2df2a57eb0
RDX: 0000000000004000 RSI: 00007ffd604fce90 RDI: 0000000000000025
RBP: 00007ffd604fce90 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000073 R11: 0000000000000293 R12: 0000000000004000
R13: 000055f88ac47d88 R14: 0000000000000000 R15: 00007f2df41ba2f8
rcu: rcu_preempt kthread starved for 10500 jiffies! g102049 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:28952 pid:   14 ppid:     2 flags:0x00004000
Call Trace:
 context_switch kernel/sched/core.c:4940 [inline]
 __schedule+0x940/0x26f0 kernel/sched/core.c:6287
 schedule+0xd3/0x270 kernel/sched/core.c:6366
 schedule_timeout+0x14a/0x2a0 kernel/time/timer.c:1881
 rcu_gp_fqs_loop+0x186/0x800 kernel/rcu/tree.c:1957
 rcu_gp_kthread+0x1de/0x320 kernel/rcu/tree.c:2130
 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: 8 Comm: kworker/u4:0 Not tainted 5.14.0-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:105
 nmi_cpu_backtrace.cold+0x44/0xd7 lib/nmi_backtrace.c:105
 nmi_trigger_cpumask_backtrace+0x1b3/0x230 lib/nmi_backtrace.c:62
 trigger_single_cpu_backtrace include/linux/nmi.h:164 [inline]
 rcu_check_gp_kthread_starvation.cold+0x1fb/0x200 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:3880 [inline]
 rcu_sched_clock_irq+0x2125/0x2200 kernel/rcu/tree.c:2599
 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>
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:check_kcov_mode+0x7/0x40 kernel/kcov.c:163
Code: fe ff ff 48 89 df e8 78 d3 45 00 e9 a1 fe ff ff 48 8b 3c 24 e8 6a d3 45 00 e9 18 fe ff ff cc cc cc cc cc 65 8b 05 c9 a9 8c 7e <89> c2 81 e2 00 01 00 00 a9 00 01 ff 00 74 10 31 c0 85 d2 74 15 8b
RSP: 0018:ffffc90000eef9f0 EFLAGS: 00000202
RAX: 0000000000000001 RBX: ffff8880b9c5cfe0 RCX: 0000000000000001
RDX: ffff888011e2e200 RSI: ffff888011e2e200 RDI: 0000000000000003
RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000001
R10: ffffffff816a0626 R11: 0000000000000000 R12: ffffed101738b9fd
R13: 0000000000000000 R14: ffff8880b9c5cfe8 R15: 0000000000000001
 write_comp_data kernel/kcov.c:218 [inline]
 __sanitizer_cov_trace_const_cmp4+0x1c/0x70 kernel/kcov.c:284
 csd_lock_wait kernel/smp.c:440 [inline]
 smp_call_function_many_cond+0x476/0xc20 kernel/smp.c:969
 on_each_cpu_cond_mask+0x56/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/0x560 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+0x16/0x30 arch/x86/kernel/alternative.c:1275
 arch_jump_label_transform_apply+0x13/0x20 arch/x86/kernel/jump_label.c:146
 jump_label_update+0x1d5/0x430 kernel/jump_label.c:830
 static_key_disable_cpuslocked+0x152/0x1b0 kernel/jump_label.c:207
 static_key_disable+0x16/0x20 kernel/jump_label.c:215
 toggle_allocation_gate mm/kfence/core.c:637 [inline]
 toggle_allocation_gate+0x185/0x390 mm/kfence/core.c:615
 process_one_work+0x98d/0x1630 kernel/workqueue.c:2276
 worker_thread+0x658/0x11f0 kernel/workqueue.c:2422
 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:	df 48 89             	fisttps -0x77(%rax)
   3:	c1 83 e0 07 48 c1 e9 	roll   $0xe9,-0x3eb7f820(%rbx)
   a:	03 83 c0 03 0f b6    	add    -0x49f0fc40(%rbx),%eax
  10:	14 11                	adc    $0x11,%al
  12:	38 d0                	cmp    %dl,%al
  14:	7c 08                	jl     0x1e
  16:	84 d2                	test   %dl,%dl
  18:	0f 85 e4 00 00 00    	jne    0x102
  1e:	8b 0d f9 18 d4 0e    	mov    0xed418f9(%rip),%ecx        # 0xed4191d
  24:	85 c9                	test   %ecx,%ecx
  26:	75 1b                	jne    0x43
* 28:	65 8b 05 0e 21 b3 7e 	mov    %gs:0x7eb3210e(%rip),%eax        # 0x7eb3213d <-- trapping instruction
  2f:	89 c2                	mov    %eax,%edx
  31:	81 e2 ff ff ff 7f    	and    $0x7fffffff,%edx
  37:	39 da                	cmp    %ebx,%edx
  39:	7c 13                	jl     0x4e
  3b:	81                   	.byte 0x81
  3c:	fb                   	sti
  3d:	fe                   	.byte 0xfe

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-selinux-root 2021/08/31 23:22 upstream 9c849ce86e0f 7eb7e152 .config log report info INFO: rcu detected stall in timerfd_create
* Struck through repros no longer work on HEAD.