syzbot


INFO: task hung in btrfs_mount_root

Status: closed as invalid on 2022/02/08 09:40
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 377d, last: 377d

Sample crash report:
INFO: task syz-executor.1:17256 blocked for more than 143 seconds.
      Not tainted 5.16.0-rc1-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.1  state:D stack:27816 pid:17256 ppid:  8159 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_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
 btrfs_mount_root+0x23b/0xc10 fs/btrfs/super.c:1681
 legacy_get_tree+0x105/0x220 fs/fs_context.c:610
 vfs_get_tree+0x89/0x2f0 fs/super.c:1500
 fc_mount fs/namespace.c:994 [inline]
 vfs_kern_mount.part.0+0xd3/0x170 fs/namespace.c:1024
 vfs_kern_mount+0x3c/0x60 fs/namespace.c:1011
 btrfs_mount+0x234/0xa60 fs/btrfs/super.c:1786
 legacy_get_tree+0x105/0x220 fs/fs_context.c:610
 vfs_get_tree+0x89/0x2f0 fs/super.c:1500
 do_new_mount fs/namespace.c:2988 [inline]
 path_mount+0x1320/0x1fa0 fs/namespace.c:3318
 do_mount fs/namespace.c:3331 [inline]
 __do_sys_mount fs/namespace.c:3539 [inline]
 __se_sys_mount fs/namespace.c:3516 [inline]
 __x64_sys_mount+0x27f/0x300 fs/namespace.c:3516
 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:0x7f4d39bd701a
RSP: 002b:00007f4d3714afa8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00007f4d39bd701a
RDX: 0000000020000000 RSI: 0000000020000080 RDI: 00007f4d3714b000
RBP: 00007f4d3714b040 R08: 00007f4d3714b040 R09: 0000000020000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000020000000
R13: 0000000020000080 R14: 00007f4d3714b000 R15: 00000000200000c0
 </TASK>

Showing all locks held in the system:
2 locks held by kworker/u4:0/8:
 #0: ffff8880b9d39a98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2b/0x120 kernel/sched/core.c:478
 #1: ffff8880b9d279c8 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x3a6/0x490 kernel/sched/psi.c:880
1 lock held by khungtaskd/27:
 #0: ffffffff8bb83b60 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6458
3 locks held by kworker/u4:2/50:
 #0: ffff8880b9d39a98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2b/0x120 kernel/sched/core.c:478
 #1: ffffc900017ffdb0 ((work_completion)(&(&bat_priv->nc.work)->work)){+.+.}-{0:0}, at: process_one_work+0x8ca/0x1690 kernel/workqueue.c:2273
 #2: ffff8880b9d28298 (&base->lock){..-.}-{2:2}, at: lock_timer_base+0x5a/0x1f0 kernel/time/timer.c:946
1 lock held by in:imklog/6448:
 #0: ffff888073ab74f0 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0xe9/0x100 fs/file.c:990
1 lock held by systemd-udevd/9481:
 #0: ffffffff8c265448 (uuid_mutex){+.+.}-{3:3}, at: btrfs_control_ioctl+0x115/0x2d0 fs/btrfs/super.c:2411
1 lock held by systemd-udevd/9512:
 #0: ffffffff8c265448 (uuid_mutex){+.+.}-{3:3}, at: btrfs_control_ioctl+0x115/0x2d0 fs/btrfs/super.c:2411
1 lock held by systemd-udevd/9846:
 #0: ffffffff8c265448 (uuid_mutex){+.+.}-{3:3}, at: btrfs_control_ioctl+0x115/0x2d0 fs/btrfs/super.c:2411
1 lock held by systemd-udevd/11294:
 #0: ffff88801a828118 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev.part.0+0x9b/0xb50 block/bdev.c:819
4 locks held by syz-executor.4/17208:
 #0: ffff888076df80e0 (&type->s_umount_key#52/1){+.+.}-{3:3}, at: alloc_super+0x1dd/0xac0 fs/super.c:229
 #1: ffffffff8c265448 (uuid_mutex){+.+.}-{3:3}, at: btrfs_close_devices+0x86/0x4b0 fs/btrfs/volumes.c:1192
 #2: ffff88801a828118 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0x97/0x9e0 block/bdev.c:914
 #3: ffff88801a823b60 (&lo->lo_mutex){+.+.}-{3:3}, at: lo_release+0x4d/0x1f0 drivers/block/loop.c:1748
1 lock held by syz-executor.1/17256:
 #0: ffffffff8c265448 (uuid_mutex){+.+.}-{3:3}, at: btrfs_mount_root+0x23b/0xc10 fs/btrfs/super.c:1681
1 lock held by syz-executor.2/17272:
 #0: ffffffff8c265448 (uuid_mutex){+.+.}-{3:3}, at: btrfs_mount_root+0x23b/0xc10 fs/btrfs/super.c:1681

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

NMI backtrace for cpu 1
CPU: 1 PID: 27 Comm: khungtaskd Not tainted 5.16.0-rc1-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 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 2965 Comm: systemd-journal Not tainted 5.16.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:orc_ip arch/x86/kernel/unwind_orc.c:30 [inline]
RIP: 0010:__orc_find+0x6f/0xf0 arch/x86/kernel/unwind_orc.c:52
Code: 72 4d 4c 89 e0 48 29 e8 48 89 c2 48 c1 e8 3f 48 c1 fa 02 48 01 d0 48 d1 f8 48 8d 5c 85 00 48 89 d8 48 c1 e8 03 42 0f b6 14 38 <48> 89 d8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 48 48 63 03 48 01
RSP: 0018:ffffc9000276f910 EFLAGS: 00000212
RAX: 1ffffffff1c06d3e RBX: ffffffff8e0369f0 RCX: ffffffff89600067
RDX: 0000000000000000 RSI: ffffffff8ea45776 RDI: ffffffff8e0369e8
RBP: ffffffff8e0369f0 R08: ffffffff8ea45776 R09: 0000000000000001
R10: fffff520004edf51 R11: 000000000008808a R12: ffffffff8e0369f0
R13: ffffffff8e0369e8 R14: ffffffff8e0369ec R15: dffffc0000000000
FS:  00007fed05a778c0(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fed02ff5010 CR3: 000000007aad9000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 orc_find arch/x86/kernel/unwind_orc.c:173 [inline]
 unwind_next_frame+0x32a/0x1ce0 arch/x86/kernel/unwind_orc.c:443
 arch_stack_walk+0x7d/0xe0 arch/x86/kernel/stacktrace.c:25
 stack_trace_save+0x8c/0xc0 kernel/stacktrace.c:122
 kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:434 [inline]
 __kasan_slab_alloc+0x90/0xc0 mm/kasan/common.c:467
 kasan_slab_alloc include/linux/kasan.h:259 [inline]
 slab_post_alloc_hook mm/slab.h:519 [inline]
 slab_alloc_node mm/slub.c:3234 [inline]
 slab_alloc mm/slub.c:3242 [inline]
 kmem_cache_alloc+0x202/0x3a0 mm/slub.c:3247
 getname_flags.part.0+0x50/0x4f0 fs/namei.c:138
 getname_flags+0x9a/0xe0 include/linux/audit.h:323
 user_path_at_empty+0x2b/0x60 fs/namei.c:2800
 user_path_at include/linux/namei.h:57 [inline]
 do_faccessat+0x127/0x850 fs/open.c:421
 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:0x7fed04d329c7
Code: 83 c4 08 48 3d 01 f0 ff ff 73 01 c3 48 8b 0d c8 d4 2b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 b8 15 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d a1 d4 2b 00 f7 d8 64 89 01 48
RSP: 002b:00007ffd653d5638 EFLAGS: 00000246 ORIG_RAX: 0000000000000015
RAX: ffffffffffffffda RBX: 00007ffd653d8550 RCX: 00007fed04d329c7
RDX: 00007fed057a3a00 RSI: 0000000000000000 RDI: 000055c0cbf519a3
RBP: 00007ffd653d5670 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000069 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007ffd653d8550 R15: 00007ffd653d5b60
 </TASK>
----------------
Code disassembly (best guess):
   0:	72 4d                	jb     0x4f
   2:	4c 89 e0             	mov    %r12,%rax
   5:	48 29 e8             	sub    %rbp,%rax
   8:	48 89 c2             	mov    %rax,%rdx
   b:	48 c1 e8 3f          	shr    $0x3f,%rax
   f:	48 c1 fa 02          	sar    $0x2,%rdx
  13:	48 01 d0             	add    %rdx,%rax
  16:	48 d1 f8             	sar    %rax
  19:	48 8d 5c 85 00       	lea    0x0(%rbp,%rax,4),%rbx
  1e:	48 89 d8             	mov    %rbx,%rax
  21:	48 c1 e8 03          	shr    $0x3,%rax
  25:	42 0f b6 14 38       	movzbl (%rax,%r15,1),%edx
* 2a:	48 89 d8             	mov    %rbx,%rax <-- trapping instruction
  2d:	83 e0 07             	and    $0x7,%eax
  30:	83 c0 03             	add    $0x3,%eax
  33:	38 d0                	cmp    %dl,%al
  35:	7c 04                	jl     0x3b
  37:	84 d2                	test   %dl,%dl
  39:	75 48                	jne    0x83
  3b:	48 63 03             	movslq (%rbx),%rax
  3e:	48                   	rex.W
  3f:	01                   	.byte 0x1

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2021/11/21 03:05 upstream a90af8f15bdc 4eb20a4e .config log report info INFO: task hung in btrfs_mount_root
* Struck through repros no longer work on HEAD.