syzbot


INFO: rcu detected stall in kvm_dev_ioctl

Status: upstream: reported on 2024/06/23 03:25
Reported-by: syzbot+6a10b1cad13fbc69a847@syzkaller.appspotmail.com
First crash: 76d, last: 76d
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in kvm_dev_ioctl (2) kernel 1 1704d 1704d 0/27 closed as invalid on 2020/01/08 05:23
upstream INFO: rcu detected stall in kvm_dev_ioctl (4) mm 1 650d 650d 0/27 auto-obsoleted due to no activity on 2023/04/10 15:34
upstream INFO: rcu detected stall in kvm_dev_ioctl (3) kernel 3 1704d 1704d 0/27 closed as invalid on 2020/01/09 08:13
upstream INFO: rcu detected stall in kvm_dev_ioctl kernel 4 1740d 1740d 0/27 closed as invalid on 2019/12/04 14:04
linux-4.19 BUG: soft lockup in kvm_dev_ioctl 1 1215d 1215d 0/1 auto-closed as invalid on 2021/09/08 20:48
android-5-15 BUG: soft lockup in kvm_dev_ioctl 1 112d 112d 0/2 auto-obsoleted due to no activity on 2024/08/16 05:28

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	1-...!: (1 ticks this GP) idle=af7c/1/0x4000000000000000 softirq=68049/68049 fqs=4
	(detected by 0, t=10505 jiffies, g=98713, q=340 ncpus=2)
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 21311 Comm: syz-executor.4 Not tainted 6.1.94-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
RIP: 0010:__sanitizer_cov_trace_pc+0x0/0x60 kernel/kcov.c:203
Code: e8 25 00 00 00 0f 0b 0f 1f 00 53 48 89 fb e8 17 00 00 00 48 8b 3d 18 f9 e8 0c 48 89 de 5b e9 67 a9 56 00 cc cc cc cc cc cc cc <48> 8b 04 24 65 48 8b 0d e4 db 77 7e 65 8b 15 e5 db 77 7e f7 c2 00
RSP: 0018:ffffc900001e0d58 EFLAGS: 00000002
RAX: 0000000000010001 RBX: 0000000000000001 RCX: ffff888015381dc0
RDX: ffff888015381dc0 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc900001e0eb0 R08: ffffffff8179be72 R09: ffff88807e9eb340
R10: 0000000000000000 R11: dffffc0000000001 R12: 1bc16d67538d79df
R13: ffff8880b992a5c0 R14: ffff8880b992a4c0 R15: dffffc0000000000
FS:  00007fa28a5ad6c0(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555555e8f788 CR3: 000000003943e000 CR4: 00000000003526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <IRQ>
 __run_hrtimer kernel/time/hrtimer.c:1652 [inline]
 __hrtimer_run_queues+0x31f/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:lock_acquire+0x26f/0x5a0 kernel/locking/lockdep.c:5666
Code: 2b 00 74 08 4c 89 f7 e8 4f ab 77 00 f6 44 24 61 02 0f 85 84 01 00 00 41 f7 c7 00 02 00 00 74 01 fb 48 c7 44 24 40 0e 36 e0 45 <4b> c7 44 25 00 00 00 00 00 43 c7 44 25 09 00 00 00 00 43 c7 44 25
RSP: 0018:ffffc9000586fb40 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff92000b0df74 RCX: ffffffff816b2042
RDX: dffffc0000000000 RSI: ffffffff8aec13c0 RDI: ffffffff8b3d4660
RBP: ffffc9000586fc98 R08: dffffc0000000000 R09: fffffbfff2093a47
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92000b0df70
R13: dffffc0000000000 R14: ffffc9000586fba0 R15: 0000000000000246
 __fs_reclaim_acquire mm/page_alloc.c:4670 [inline]
 fs_reclaim_acquire+0x83/0x120 mm/page_alloc.c:4684
 might_alloc include/linux/sched/mm.h:271 [inline]
 slab_pre_alloc_hook+0x2a/0x300 mm/slab.h:710
 slab_alloc_node mm/slub.c:3318 [inline]
 __kmem_cache_alloc_node+0x47/0x260 mm/slub.c:3437
 kmalloc_trace+0x26/0xe0 mm/slab_common.c:1045
 kmalloc include/linux/slab.h:556 [inline]
 kvm_uevent_notify_change+0x222/0x3a0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:5728
 kvm_dev_ioctl_create_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:5027 [inline]
 kvm_dev_ioctl+0x16a8/0x1860 arch/x86/kvm/../../../virt/kvm/kvm_main.c:5051
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fa28987d0a9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fa28a5ad0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fa2899b3f80 RCX: 00007fa28987d0a9
RDX: 0000000000000000 RSI: 000000000000ae01 RDI: 0000000000000003
RBP: 00007fa2898ec074 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007fa2899b3f80 R15: 00007ffd1e3cb858
 </TASK>
rcu: rcu_preempt kthread starved for 10485 jiffies! g98713 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:26712 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:1965
 rcu_gp_fqs_loop+0x2d2/0x1150 kernel/rcu/tree.c:1706
 rcu_gp_kthread+0xa3/0x3b0 kernel/rcu/tree.c:1905
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>
rcu: Stack dump where RCU GP kthread last ran:
CPU: 0 PID: 16908 Comm: kworker/u4:15 Not tainted 6.1.94-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:check_kcov_mode kernel/kcov.c:184 [inline]
RIP: 0010:__sanitizer_cov_trace_pc+0x32/0x60 kernel/kcov.c:207
Code: e4 db 77 7e 65 8b 15 e5 db 77 7e f7 c2 00 01 ff 00 74 11 f7 c2 00 01 00 00 74 35 83 b9 1c 16 00 00 00 74 2c 8b 91 f8 15 00 00 <83> fa 02 75 21 48 8b 91 00 16 00 00 48 8b 32 48 8d 7e 01 8b 89 fc
RSP: 0018:ffffc9000fd37598 EFLAGS: 00000246
RAX: ffffffff817f53eb RBX: 1ffff110173281b1 RCX: ffff888055240000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc9000fd37980 R08: ffffffff817f53b4 R09: fffffbfff2093a45
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000800000000
R13: dffffc0000000000 R14: 0000000000000001 R15: ffff8880b9940d88
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2d822000 CR3: 000000000ce8e000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 </IRQ>
 <TASK>
 csd_lock_wait kernel/smp.c:424 [inline]
 smp_call_function_many_cond+0x1fcb/0x3460 kernel/smp.c:998
 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:308
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/23 03:25 linux-6.1.y eb44d83053d6 edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: rcu detected stall in kvm_dev_ioctl
* Struck through repros no longer work on HEAD.