syzbot


INFO: task hung in kvm_vm_ioctl

Status: closed as invalid on 2022/02/08 09:40
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 371d, last: 371d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in kvm_vm_ioctl (2) 2 262d 272d 0/24 auto-closed as invalid on 2022/06/16 11:31

Sample crash report:
INFO: task syz-executor.3:28727 blocked for more than 143 seconds.
      Not tainted 5.16.0-rc2-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.3  state:D stack:27816 pid:28727 ppid:  6819 flags:0x00000004
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_preempt_disabled+0xf/0x20 kernel/sched/core.c:6385
 __mutex_lock_common kernel/locking/mutex.c:680 [inline]
 __mutex_lock+0xa32/0x12f0 kernel/locking/mutex.c:740
 kvm_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1783 [inline]
 kvm_vm_ioctl_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1796 [inline]
 kvm_vm_ioctl+0x507/0x23d0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4293
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl fs/ioctl.c:860 [inline]
 __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
 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:0x7fa3172eb8a7
RSP: 002b:00007fa31485f5f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000020000000 RCX: 00007fa3172eb8a7
RDX: 00007fa31485fd30 RSI: 000000004020ae46 RDI: 0000000000000004
RBP: 0000000000000004 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000fec00000
R13: 00007fa31485fd30 R14: 000000000000000d R15: 000000002000c000
 </TASK>
INFO: task syz-executor.3:28782 blocked for more than 143 seconds.
      Not tainted 5.16.0-rc2-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.3  state:D stack:27824 pid:28782 ppid:  6819 flags:0x00004004
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+0x1db/0x2a0 kernel/time/timer.c:1857
 do_wait_for_common kernel/sched/completion.c:85 [inline]
 __wait_for_common kernel/sched/completion.c:106 [inline]
 wait_for_common kernel/sched/completion.c:117 [inline]
 wait_for_completion+0x174/0x270 kernel/sched/completion.c:138
 __synchronize_srcu+0x1f2/0x290 kernel/rcu/srcutree.c:930
 install_new_memslots+0x312/0x570 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1471
 kvm_set_memslot+0xdfe/0x1a40 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1605
 __kvm_set_memory_region+0xc1c/0x13d0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:1763
 kvm_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1784 [inline]
 kvm_vm_ioctl_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1796 [inline]
 kvm_vm_ioctl+0x512/0x23d0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4293
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl fs/ioctl.c:860 [inline]
 __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
 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:0x7fa3172eb8a7
RSP: 002b:00007fa3147fc5f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000020000000 RCX: 00007fa3172eb8a7
RDX: 00007fa3147fcd30 RSI: 000000004020ae46 RDI: 0000000000000004
RBP: 0000000000000004 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000fec00000
R13: 00007fa3147fcd30 R14: 000000000000000f R15: 000000002000e000
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8bb83ca0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6458
1 lock held by in:imklog/6441:
 #0: ffff88807a0c8ff0 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0xe9/0x100 fs/file.c:990
2 locks held by agetty/6465:
 #0: ffff88801bbc0098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:252
 #1: ffffc90002a2f2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0xcf0/0x1230 drivers/tty/n_tty.c:2113
2 locks held by kworker/1:2/13789:
1 lock held by syz-executor.3/28727:
 #0: ffffc900054310a8 (&kvm->slots_lock){+.+.}-{3:3}, at: kvm_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1783 [inline]
 #0: ffffc900054310a8 (&kvm->slots_lock){+.+.}-{3:3}, at: kvm_vm_ioctl_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1796 [inline]
 #0: ffffc900054310a8 (&kvm->slots_lock){+.+.}-{3:3}, at: kvm_vm_ioctl+0x507/0x23d0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4293
1 lock held by syz-executor.3/28782:
 #0: ffffc900054310a8 (&kvm->slots_lock){+.+.}-{3:3}, at: kvm_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1783 [inline]
 #0: ffffc900054310a8 (&kvm->slots_lock){+.+.}-{3:3}, at: kvm_vm_ioctl_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1796 [inline]
 #0: ffffc900054310a8 (&kvm->slots_lock){+.+.}-{3:3}, at: kvm_vm_ioctl+0x507/0x23d0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4293
2 locks held by syz-executor.3/28786:
3 locks held by systemd-udevd/28814:

=============================================

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 5.16.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <TASK>
 __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_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
 watchdog+0xc1d/0xf50 kernel/hung_task.c:295
 kthread+0x405/0x4f0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 8233 Comm: kworker/u4:5 Not tainted 5.16.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: bat_events batadv_nc_worker
RIP: 0010:mark_lock+0x6/0x17b0 kernel/locking/lockdep.c:4566
Code: ff c3 66 90 be 00 00 02 00 48 c7 c7 e0 66 2b 8f e8 6f c2 7b 02 48 98 c3 66 66 2e 0f 1f 84 00 00 00 00 00 90 41 57 41 56 41 55 <41> 54 41 89 d4 48 ba 00 00 00 00 00 fc ff df 55 53 48 81 ec 18 01
RSP: 0018:ffffc900169bf9c0 EFLAGS: 00000046
RAX: 0000000000000004 RBX: ffff888036b08a44 RCX: ffffffff815c54cd
RDX: 0000000000000002 RSI: ffff888036b08ab0 RDI: ffff888036b08000
RBP: ffff888036b08ad2 R08: 0000000000000000 R09: ffffffff8ff72adf
R10: 0000000000000001 R11: 0000000000000000 R12: ffff888036b08ab0
R13: ffff888036b08000 R14: ffff888036b08a60 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555f373565e0 CR3: 000000000b88e000 CR4: 00000000003526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 mark_usage kernel/locking/lockdep.c:4514 [inline]
 __lock_acquire+0x844/0x54a0 kernel/locking/lockdep.c:4981
 lock_acquire kernel/locking/lockdep.c:5637 [inline]
 lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602
 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
 _raw_spin_lock_bh+0x2f/0x40 kernel/locking/spinlock.c:178
 spin_lock_bh include/linux/spinlock.h:354 [inline]
 batadv_nc_purge_paths+0xdf/0x3a0 net/batman-adv/network-coding.c:446
 batadv_nc_worker+0x930/0xfa0 net/batman-adv/network-coding.c:726
 process_one_work+0x9b2/0x1690 kernel/workqueue.c:2298
 worker_thread+0x658/0x11f0 kernel/workqueue.c:2445
 kthread+0x405/0x4f0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
----------------
Code disassembly (best guess):
   0:	ff c3                	inc    %ebx
   2:	66 90                	xchg   %ax,%ax
   4:	be 00 00 02 00       	mov    $0x20000,%esi
   9:	48 c7 c7 e0 66 2b 8f 	mov    $0xffffffff8f2b66e0,%rdi
  10:	e8 6f c2 7b 02       	callq  0x27bc284
  15:	48 98                	cltq
  17:	c3                   	retq
  18:	66 66 2e 0f 1f 84 00 	data16 nopw %cs:0x0(%rax,%rax,1)
  1f:	00 00 00 00
  23:	90                   	nop
  24:	41 57                	push   %r15
  26:	41 56                	push   %r14
  28:	41 55                	push   %r13
* 2a:	41 54                	push   %r12 <-- trapping instruction
  2c:	41 89 d4             	mov    %edx,%r12d
  2f:	48 ba 00 00 00 00 00 	movabs $0xdffffc0000000000,%rdx
  36:	fc ff df
  39:	55                   	push   %rbp
  3a:	53                   	push   %rbx
  3b:	48                   	rex.W
  3c:	81                   	.byte 0x81
  3d:	ec                   	in     (%dx),%al
  3e:	18 01                	sbb    %al,(%rcx)

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce 2021/11/29 08:22 upstream d06c942efea4 63eeac02 .config log report info INFO: task hung in kvm_vm_ioctl
* Struck through repros no longer work on HEAD.