syzbot


INFO: rcu detected stall in clock_adjtime

Status: closed as invalid on 2022/02/08 10:00
Subsystems: kernel
[Documentation on labels]
First crash: 1167d, last: 1157d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in clock_adjtime (2) kernel C error 107 15h16m 479d 0/28 upstream: reported C repro on 2023/10/07 20:25

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	1-...!: (1 GPs behind) idle=b0f/1/0x4000000000000000 softirq=41893/41894 fqs=16 
	(detected by 0, t=10502 jiffies, g=70145, q=192)
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 21149 Comm: syz-executor.1 Not tainted 5.16.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:check_preemption_disabled+0x3e/0x170 lib/smp_processor_id.c:56
Code: 44 8b 25 1d f7 bd 76 65 8b 1d 8e 51 be 76 81 e3 ff ff ff 7f 31 ff 89 de 0f 1f 44 00 00 85 db 74 11 0f 1f 44 00 00 44 89 e0 5b <5d> 41 5c 41 5d 41 5e c3 0f 1f 44 00 00 9c 5b 81 e3 00 02 00 00 31
RSP: 0018:ffffc90000dc0c90 EFLAGS: 00000002
RAX: 0000000000000001 RBX: 0000000000000002 RCX: 0000000000000001
RDX: 0000000000000000 RSI: 0000000000010002 RDI: 0000000000000000
RBP: ffffffff8a0519a0 R08: 0000000000000000 R09: ffffffff8d912b97
R10: fffffbfff1b22572 R11: 0000000000000000 R12: 0000000000000001
R13: ffffffff89ac0fe0 R14: 00000000ffffffff R15: ffff8880773f6188
FS:  00007f862c62f700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f862f1c9000 CR3: 0000000070431000 CR4: 0000000000350ee0
Call Trace:
 <IRQ>
 lockdep_recursion_finish kernel/locking/lockdep.c:438 [inline]
 lock_is_held_type+0xd7/0x140 kernel/locking/lockdep.c:5681
 lock_is_held include/linux/lockdep.h:283 [inline]
 rcu_read_lock_sched_held+0x3a/0x70 kernel/rcu/update.c:125
 trace_lock_release include/trace/events/lock.h:58 [inline]
 lock_release+0x522/0x720 kernel/locking/lockdep.c:5648
 rcu_lock_release include/linux/rcupdate.h:273 [inline]
 rcu_read_unlock include/linux/rcupdate.h:721 [inline]
 advance_sched+0x507/0x9a0 net/sched/sch_taprio.c:769
 __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:638
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x38/0x70 kernel/locking/spinlock.c:194
Code: 74 24 10 e8 aa bd 15 f8 48 89 ef e8 f2 33 16 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> b3 fd 08 f8 65 8b 05 9c 80 bb 76 85 c0 74 0a 5b 5d c3 e8 90 ed
RSP: 0018:ffffc9000298fa98 EFLAGS: 00000206
RAX: 0000000000000006 RBX: 0000000000000200 RCX: 1ffffffff1fee676
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001
RBP: ffff8880b9c2a400 R08: 0000000000000001 R09: ffffffff8ff72a07
R10: 0000000000000001 R11: 0000000000000000 R12: e2329b9e091d76c1
R13: 0000000000000000 R14: 0000007dc4340075 R15: dffffc0000000000
 clock_was_set+0x56d/0x790 kernel/time/hrtimer.c:970
 timekeeping_inject_offset+0x4b4/0x620 kernel/time/timekeeping.c:1375
 do_adjtimex+0x28f/0xa90 kernel/time/timekeeping.c:2409
 do_clock_adjtime kernel/time/posix-timers.c:1109 [inline]
 __do_sys_clock_adjtime+0x163/0x270 kernel/time/posix-timers.c:1121
 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:0x7f862f0b9ae9
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:00007f862c62f188 EFLAGS: 00000246 ORIG_RAX: 0000000000000131
RAX: ffffffffffffffda RBX: 00007f862f1ccf60 RCX: 00007f862f0b9ae9
RDX: 0000000000000000 RSI: 0000000020000100 RDI: 0000000000000000
RBP: 00007f862f113f6d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc0b09b44f R14: 00007f862c62f300 R15: 0000000000022000
 </TASK>
rcu: rcu_preempt kthread starved for 10470 jiffies! g70145 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:28688 pid:   14 ppid:     2 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4972 [inline]
 __schedule+0xa9a/0x4940 kernel/sched/core.c:6253
 schedule+0xd2/0x260 kernel/sched/core.c:6326
 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:
NMI backtrace for cpu 0
CPU: 0 PID: 21158 Comm: syz-executor.0 Not tainted 5.16.0-rc2-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:111
 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:3878 [inline]
 rcu_sched_clock_irq+0x2125/0x2200 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:csd_lock_wait kernel/smp.c:440 [inline]
RIP: 0010:smp_call_function_many_cond+0x452/0xc20 kernel/smp.c:969
Code: 0b 00 85 ed 74 4d 48 b8 00 00 00 00 00 fc ff df 4d 89 f4 4c 89 f5 49 c1 ec 03 83 e5 07 49 01 c4 83 c5 03 e8 80 75 0b 00 f3 90 <41> 0f b6 04 24 40 38 c5 7c 08 84 c0 0f 85 33 06 00 00 8b 43 08 31
RSP: 0018:ffffc90002a5f9d0 EFLAGS: 00000246
RAX: 0000000000040000 RBX: ffff8880b9d3fca0 RCX: ffffc900175b1000
RDX: 0000000000040000 RSI: ffffffff816c23e0 RDI: 0000000000000003
RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000001
R10: ffffffff816c2406 R11: 0000000000000000 R12: ffffed10173a7f95
R13: 0000000000000001 R14: ffff8880b9d3fca8 R15: 0000000000000001
 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:1112 [inline]
 text_poke_bp_batch+0x1b3/0x560 arch/x86/kernel/alternative.c:1297
 text_poke_flush arch/x86/kernel/alternative.c:1451 [inline]
 text_poke_flush arch/x86/kernel/alternative.c:1448 [inline]
 text_poke_finish+0x16/0x30 arch/x86/kernel/alternative.c:1458
 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_slow_inc_cpuslocked+0x1b2/0x250 kernel/jump_label.c:144
 static_key_slow_inc+0x16/0x20 kernel/jump_label.c:159
 perf_swevent_init+0x404/0x5d0 kernel/events/core.c:9647
 perf_try_init_event+0x12a/0x560 kernel/events/core.c:11249
 perf_init_event kernel/events/core.c:11326 [inline]
 perf_event_alloc.part.0+0x2230/0x3b10 kernel/events/core.c:11604
 perf_event_alloc kernel/events/core.c:12027 [inline]
 __do_sys_perf_event_open+0x4ae/0x3130 kernel/events/core.c:12125
 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:0x7fb257f11ae9
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:00007fb255466188 EFLAGS: 00000246 ORIG_RAX: 000000000000012a
RAX: ffffffffffffffda RBX: 00007fb258025020 RCX: 00007fb257f11ae9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000040
RBP: 00007fb257f6bf6d R08: 0000000000000000 R09: 0000000000000000
R10: ffffffffffffffff R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffedf7c8e9f R14: 00007fb255466300 R15: 0000000000022000
 </TASK>
----------------
Code disassembly (best guess):
   0:	44 8b 25 1d f7 bd 76 	mov    0x76bdf71d(%rip),%r12d        # 0x76bdf724
   7:	65 8b 1d 8e 51 be 76 	mov    %gs:0x76be518e(%rip),%ebx        # 0x76be519c
   e:	81 e3 ff ff ff 7f    	and    $0x7fffffff,%ebx
  14:	31 ff                	xor    %edi,%edi
  16:	89 de                	mov    %ebx,%esi
  18:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
  1d:	85 db                	test   %ebx,%ebx
  1f:	74 11                	je     0x32
  21:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
  26:	44 89 e0             	mov    %r12d,%eax
  29:	5b                   	pop    %rbx
* 2a:	5d                   	pop    %rbp <-- trapping instruction
  2b:	41 5c                	pop    %r12
  2d:	41 5d                	pop    %r13
  2f:	41 5e                	pop    %r14
  31:	c3                   	retq
  32:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
  37:	9c                   	pushfq
  38:	5b                   	pop    %rbx
  39:	81 e3 00 02 00 00    	and    $0x200,%ebx
  3f:	31                   	.byte 0x31

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/11/27 23:00 upstream 741392771338 63eeac02 .config console log report info ci-upstream-kasan-gce-root INFO: rcu detected stall in clock_adjtime
2021/11/18 07:02 upstream ee1703cda8dc cafff8b6 .config console log report info ci-upstream-kasan-gce-root INFO: rcu detected stall in clock_adjtime
* Struck through repros no longer work on HEAD.