syzbot


INFO: task hung in kvm_vm_ioctl (2)

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

Sample crash report:
INFO: task syz-executor.5:17724 blocked for more than 143 seconds.
      Not tainted 5.17.0-rc8-syzkaller-00045-g551acdc3c3d2 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.5  state:D stack:26872 pid:17724 ppid:  3625 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4995 [inline]
 __schedule+0x926/0x1080 kernel/sched/core.c:6304
 schedule+0x12b/0x1f0 kernel/sched/core.c:6377
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6436
 __mutex_lock_common+0xd1f/0x2590 kernel/locking/mutex.c:673
 __mutex_lock kernel/locking/mutex.c:733 [inline]
 mutex_lock_nested+0x1a/0x20 kernel/locking/mutex.c:785
 kvm_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1926 [inline]
 kvm_vm_ioctl_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1939 [inline]
 kvm_vm_ioctl+0xeb4/0x2720 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4492
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fcd2f9a2e07
RSP: 002b:00007fcd2e3165d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000020000000 RCX: 00007fcd2f9a2e07
RDX: 00007fcd2e316d10 RSI: 000000004020ae46 RDI: 0000000000000005
RBP: 0000000000000005 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000246 R12: 00000000fec00000
R13: 00007fcd2e316d10 R14: 0000000000000005 R15: 0000000020004000
 </TASK>
INFO: task syz-executor.5:17736 blocked for more than 143 seconds.
      Not tainted 5.17.0-rc8-syzkaller-00045-g551acdc3c3d2 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.5  state:D stack:27248 pid:17736 ppid:  3625 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4995 [inline]
 __schedule+0x926/0x1080 kernel/sched/core.c:6304
 schedule+0x12b/0x1f0 kernel/sched/core.c:6377
 schedule_timeout+0xac/0x300 kernel/time/timer.c:1857
 do_wait_for_common+0x2da/0x480 kernel/sched/completion.c:85
 __wait_for_common kernel/sched/completion.c:106 [inline]
 wait_for_common kernel/sched/completion.c:117 [inline]
 wait_for_completion+0x46/0x60 kernel/sched/completion.c:138
 __synchronize_srcu+0x2aa/0x350 kernel/rcu/srcutree.c:930
 kvm_io_bus_register_dev+0x534/0x6d0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:5156
 kvm_vm_ioctl_register_coalesced_mmio+0x198/0x320 arch/x86/kvm/../../../virt/kvm/coalesced_mmio.c:156
 kvm_vm_ioctl+0xbb5/0x2720 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4522
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:860
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fcd2f9a3049
RSP: 002b:00007fcd2e2f7168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fcd2fab6030 RCX: 00007fcd2f9a3049
RDX: 00000000200001c0 RSI: 000000004010ae67 RDI: 0000000000000005
RBP: 00007fcd2f9fd08d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe83b8d49f R14: 00007fcd2e2f7300 R15: 0000000000022000
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/26:
 #0: ffffffff8cb1d9a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/3280:
 #0: ffff88807e971098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc90002b662e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6c5/0x1c60 drivers/tty/n_tty.c:2075
1 lock held by syz-executor.5/17724:
 #0: ffffc900046a90a8 (&kvm->slots_lock){+.+.}-{3:3}, at: kvm_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1926 [inline]
 #0: ffffc900046a90a8 (&kvm->slots_lock){+.+.}-{3:3}, at: kvm_vm_ioctl_set_memory_region arch/x86/kvm/../../../virt/kvm/kvm_main.c:1939 [inline]
 #0: ffffc900046a90a8 (&kvm->slots_lock){+.+.}-{3:3}, at: kvm_vm_ioctl+0xeb4/0x2720 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4492
1 lock held by syz-executor.5/17736:
 #0: ffffc900046a90a8 (&kvm->slots_lock){+.+.}-{3:3}, at: kvm_vm_ioctl_register_coalesced_mmio+0x118/0x320 arch/x86/kvm/../../../virt/kvm/coalesced_mmio.c:155

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

NMI backtrace for cpu 0
CPU: 0 PID: 26 Comm: khungtaskd Not tainted 5.17.0-rc8-syzkaller-00045-g551acdc3c3d2 #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+0x1dc/0x2d8 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x45f/0x490 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x16a/0x280 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:212 [inline]
 watchdog+0xc82/0xcd0 kernel/hung_task.c:369
 kthread+0x2a3/0x2d0 kernel/kthread.c:377
 ret_from_fork+0x1f/0x30
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 140 Comm: kworker/1:2 Not tainted 5.17.0-rc8-syzkaller-00045-g551acdc3c3d2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events nsim_dev_trap_report_work
RIP: 0010:unwind_next_frame+0x9a/0x1fc0
Code: 84 c0 0f 85 ed 18 00 00 41 8b 45 00 85 c0 0f 84 1b 18 00 00 89 84 24 84 00 00 00 48 89 54 24 10 4c 89 64 24 50 4c 89 74 24 58 <48> 89 6c 24 18 bf 01 00 00 00 e8 f7 84 1f 00 49 8d 6d 50 48 89 e8
RSP: 0018:ffffc9000282f5e0 EFLAGS: 00000202
RAX: 0000000000000001 RBX: 1ffff92000505edb RCX: ffffffff8f36c000
RDX: ffffc9000282faa0 RSI: ffffffff81d1dcce RDI: ffffc9000282f6a0
RBP: 1ffff92000505ed4 R08: 0000000000000003 R09: ffffc9000282f790
R10: fffff52000505ee0 R11: 0000000000000000 R12: ffffc9000282f6d8
R13: ffffc9000282f6a0 R14: ffffffff81d1dcce R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa052f4a000 CR3: 000000000c88e000 CR4: 00000000003526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 arch_stack_walk+0x112/0x140 arch/x86/kernel/stacktrace.c:25
 stack_trace_save+0x11b/0x1e0 kernel/stacktrace.c:122
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track+0x4c/0x70 mm/kasan/common.c:45
 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:370
 ____kasan_slab_free+0x126/0x180 mm/kasan/common.c:366
 kasan_slab_free include/linux/kasan.h:236 [inline]
 slab_free_hook mm/slub.c:1728 [inline]
 slab_free_freelist_hook+0x12e/0x1a0 mm/slub.c:1754
 slab_free mm/slub.c:3509 [inline]
 kmem_cache_free+0xb6/0x1c0 mm/slub.c:3526
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:818 [inline]
 nsim_dev_trap_report_work+0x7c6/0xaf0 drivers/net/netdevsim/dev.c:843
 process_one_work+0x86c/0x1190 kernel/workqueue.c:2307
 worker_thread+0xab1/0x1300 kernel/workqueue.c:2454
 kthread+0x2a3/0x2d0 kernel/kthread.c:377
 ret_from_fork+0x1f/0x30
 </TASK>
----------------
Code disassembly (best guess):
   0:	84 c0                	test   %al,%al
   2:	0f 85 ed 18 00 00    	jne    0x18f5
   8:	41 8b 45 00          	mov    0x0(%r13),%eax
   c:	85 c0                	test   %eax,%eax
   e:	0f 84 1b 18 00 00    	je     0x182f
  14:	89 84 24 84 00 00 00 	mov    %eax,0x84(%rsp)
  1b:	48 89 54 24 10       	mov    %rdx,0x10(%rsp)
  20:	4c 89 64 24 50       	mov    %r12,0x50(%rsp)
  25:	4c 89 74 24 58       	mov    %r14,0x58(%rsp)
* 2a:	48 89 6c 24 18       	mov    %rbp,0x18(%rsp) <-- trapping instruction
  2f:	bf 01 00 00 00       	mov    $0x1,%edi
  34:	e8 f7 84 1f 00       	callq  0x1f8530
  39:	49 8d 6d 50          	lea    0x50(%r13),%rbp
  3d:	48 89 e8             	mov    %rbp,%rax

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-smack-root 2022/03/18 11:25 upstream 551acdc3c3d2 e2d91b1d .config log report info INFO: task hung in kvm_vm_ioctl
ci-upstream-kasan-gce 2022/03/08 08:20 upstream ea4424be1688 7bdd8b2c .config log report info INFO: task hung in kvm_vm_ioctl
* Struck through repros no longer work on HEAD.