syzbot


INFO: rcu detected stall in sys_clock_nanosleep (2)

Status: upstream: reported on 2024/01/10 22:07
Reported-by: syzbot+d81dae19476f63cd6030@syzkaller.appspotmail.com
First crash: 103d, last: 38d
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 INFO: rcu detected stall in sys_clock_nanosleep 1 224d 224d 0/3 auto-obsoleted due to no activity on 2023/12/20 18:13
upstream INFO: rcu detected stall in sys_clock_nanosleep (5) kernel C error done 25 1d21h 249d 0/26 upstream: reported C repro on 2023/08/17 09:25
upstream INFO: rcu detected stall in sys_clock_nanosleep (4) kernel 6 573d 693d 0/26 auto-obsoleted due to no activity on 2022/12/31 21:43
upstream INFO: rcu detected stall in sys_clock_nanosleep (3) kernel 3 870d 880d 0/26 closed as invalid on 2022/02/08 10:00
upstream INFO: rcu detected stall in sys_clock_nanosleep kernel 1 1125d 1125d 0/26 auto-closed as invalid on 2021/06/22 18:23
linux-6.1 INFO: rcu detected stall in sys_clock_nanosleep 1 400d 400d 0/3 auto-obsoleted due to no activity on 2023/07/17 12:13
upstream INFO: rcu detected stall in sys_clock_nanosleep (2) kernel 1 1003d 1003d 0/26 auto-closed as invalid on 2021/10/22 22:53
linux-5.15 INFO: rcu detected stall in sys_clock_nanosleep (2) 2 27d 100d 0/3 upstream: reported on 2024/01/13 21:31

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	0-...!: (1 GPs behind) idle=3b64/1/0x4000000000000000 softirq=239423/239424 fqs=0
	(detected by 1, t=10505 jiffies, g=377077, q=186 ncpus=2)
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 2879 Comm: syz-executor.3 Not tainted 6.1.82-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
RIP: 0010:native_save_fl arch/x86/include/asm/irqflags.h:35 [inline]
RIP: 0010:arch_local_save_flags arch/x86/include/asm/irqflags.h:70 [inline]
RIP: 0010:arch_irqs_disabled arch/x86/include/asm/irqflags.h:130 [inline]
RIP: 0010:lock_release+0x60b/0xa20 kernel/locking/lockdep.c:5685
Code: 4c 89 f3 48 c1 eb 03 42 80 3c 3b 00 74 08 4c 89 f7 e8 a9 7b 77 00 48 c7 84 24 90 00 00 00 00 00 00 00 9c 8f 84 24 90 00 00 00 <42> 80 3c 3b 00 74 08 4c 89 f7 e8 06 7b 77 00 f6 84 24 91 00 00 00
RSP: 0018:ffffc90000007b80 EFLAGS: 00000046
RAX: 0000000000000001 RBX: 1ffff92000000f82 RCX: ffffc90000007c03
RDX: 0000000000000000 RSI: ffffffff8aebffc0 RDI: ffffffff8b3d2b40
RBP: ffffc90000007cb0 R08: dffffc0000000000 R09: fffffbfff1ce6c56
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92000000f7c
R13: 0000000000000046 R14: ffffc90000007c10 R15: dffffc0000000000
FS:  0000555556168480(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f21ea2a5d58 CR3: 0000000075f66000 CR4: 00000000003506f0
Call Trace:
 <NMI>
 </NMI>
 <IRQ>
 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:149 [inline]
 _raw_spin_unlock_irqrestore+0x75/0x130 kernel/locking/spinlock.c:194
 __run_hrtimer kernel/time/hrtimer.c:1682 [inline]
 __hrtimer_run_queues+0x4b0/0xe50 kernel/time/hrtimer.c:1750
 hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1812
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1095 [inline]
 __sysvec_apic_timer_interrupt+0x156/0x580 arch/x86/kernel/apic/apic.c:1112
 sysvec_apic_timer_interrupt+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1106
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0xd4/0x130 kernel/locking/spinlock.c:194
Code: 9c 8f 44 24 20 42 80 3c 23 00 74 08 4c 89 f7 e8 42 2e 4e f7 f6 44 24 21 02 75 4e 41 f7 c7 00 02 00 00 74 01 fb bf 01 00 00 00 <e8> f7 78 ca f6 65 8b 05 b8 a4 6e 75 85 c0 74 3f 48 c7 04 24 0e 36
RSP: 0018:ffffc9000401fba0 EFLAGS: 00000206
RAX: 9dd001ceef38fb00 RBX: 1ffff92000803f78 RCX: ffffffff91c8e103
RDX: dffffc0000000000 RSI: ffffffff8aebee40 RDI: 0000000000000001
RBP: ffffc9000401fc30 R08: dffffc0000000000 R09: ffffed1017305499
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: 1ffff92000803f74 R14: ffffc9000401fbc0 R15: 0000000000000246
 hrtimer_start_expires include/linux/hrtimer.h:434 [inline]
 hrtimer_sleeper_start_expires kernel/time/hrtimer.c:1966 [inline]
 do_nanosleep+0x153/0x5f0 kernel/time/hrtimer.c:2042
 hrtimer_nanosleep+0x24d/0x490 kernel/time/hrtimer.c:2098
 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1308 [inline]
 __se_sys_clock_nanosleep+0x323/0x3b0 kernel/time/posix-timers.c:1285
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7ff9886a91b5
Code: 24 0c 89 3c 24 48 89 4c 24 18 e8 f6 b9 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 8b 74 24 0c 8b 3c 24 b8 e6 00 00 00 0f 05 <44> 89 c7 48 89 04 24 e8 4f ba ff ff 48 8b 04 24 48 83 c4 28 f7 d8
RSP: 002b:00007ffdfb86a1a0 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6
RAX: ffffffffffffffda RBX: 0000000000000135 RCX: 00007ff9886a91b5
RDX: 00007ffdfb86a1e0 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007ffdfb86a26c R08: 0000000000000000 R09: 0000000000000010
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000032
R13: 00000000002389d5 R14: 00000000002386cf R15: 0000000000000003
 </TASK>
rcu: rcu_preempt kthread starved for 10505 jiffies! g377077 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:26680 pid:16    ppid:2      flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5245 [inline]
 __schedule+0x142d/0x4550 kernel/sched/core.c:6558
 schedule+0xbf/0x180 kernel/sched/core.c:6634
 schedule_timeout+0x1b9/0x300 kernel/time/timer.c:1935
 rcu_gp_fqs_loop+0x2d2/0x1120 kernel/rcu/tree.c:1706
 rcu_gp_kthread+0xa3/0x3a0 kernel/rcu/tree.c:1905
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:307
 </TASK>
rcu: Stack dump where RCU GP kthread last ran:
CPU: 1 PID: 17742 Comm: kworker/u4:12 Not tainted 6.1.82-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:csd_lock_wait kernel/smp.c:424 [inline]
RIP: 0010:smp_call_function_many_cond+0x1fb0/0x3460 kernel/smp.c:998
Code: 2f 44 89 ee 83 e6 01 31 ff e8 ec 42 0b 00 41 83 e5 01 49 bd 00 00 00 00 00 fc ff df 75 0a e8 77 3f 0b 00 e9 1b ff ff ff f3 90 <42> 0f b6 04 2b 84 c0 75 14 41 f7 07 01 00 00 00 0f 84 fe fe ff ff
RSP: 0018:ffffc9001191f5a0 EFLAGS: 00000293
RAX: ffffffff817f443b RBX: 1ffff1101730859d RCX: ffff888045f73b80
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc9001191f980 R08: ffffffff817f4404 R09: fffffbfff2092c45
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000800000000
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8880b9842ce8
FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f9a25fce440 CR3: 000000000ce8e000 CR4: 00000000003506e0
Call Trace:
 <IRQ>
 </IRQ>
 <TASK>
 on_each_cpu_cond_mask+0x3b/0x80 kernel/smp.c:1166
 on_each_cpu include/linux/smp.h:71 [inline]
 text_poke_sync arch/x86/kernel/alternative.c:1334 [inline]
 text_poke_bp_batch+0x2bb/0x940 arch/x86/kernel/alternative.c:1534
 text_poke_flush arch/x86/kernel/alternative.c:1725 [inline]
 text_poke_finish+0x16/0x30 arch/x86/kernel/alternative.c:1732
 arch_jump_label_transform_apply+0x13/0x20 arch/x86/kernel/jump_label.c:146
 static_key_enable_cpuslocked+0x12e/0x250 kernel/jump_label.c:177
 static_key_enable+0x16/0x20 kernel/jump_label.c:190
 toggle_allocation_gate+0xbf/0x480 mm/kfence/core.c:804
 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292
 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:307
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/15 20:49 linux-6.1.y d7543167affd d615901c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: rcu detected stall in sys_clock_nanosleep
2024/01/10 22:06 linux-6.1.y 7c58bfa711cb 04815ef1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: rcu detected stall in sys_clock_nanosleep
* Struck through repros no longer work on HEAD.