syzbot


INFO: task hung in blkdev_get_by_dev

Status: auto-closed as invalid on 2021/05/23 22:12
Subsystems: fs
[Documentation on labels]
First crash: 1167d, last: 1167d
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 INFO: task hung in blkdev_get_by_dev origin:lts-only C 5 4d03h 96d 0/3 upstream: reported C repro on 2024/01/29 00:39
linux-5.15 INFO: task hung in blkdev_get_by_dev (2) 1 238d 238d 0/3 auto-obsoleted due to no activity on 2023/12/18 22:46
upstream INFO: task hung in blkdev_get_by_dev (3) block 1 787d 787d 0/26 auto-closed as invalid on 2022/05/08 09:47
linux-5.15 INFO: task hung in blkdev_get_by_dev 1 369d 369d 0/3 auto-obsoleted due to no activity on 2023/08/23 09:06
linux-5.15 INFO: task hung in blkdev_get_by_dev (3) 3 23d 93d 0/3 upstream: reported on 2024/02/01 00:39
upstream INFO: task hung in blkdev_get_by_dev (4) block 1 616d 616d 0/26 auto-obsoleted due to no activity on 2022/11/25 11:03
upstream INFO: task hung in blkdev_get_by_dev (2) block 1727 819d 898d 0/26 closed as dup on 2021/11/21 14:02
upstream INFO: task hung in blkdev_get_by_dev (5) block C error 32 53d 429d 0/26 upstream: reported C repro on 2023/03/02 18:11

Sample crash report:
INFO: task syz-executor.0:9133 blocked for more than 143 seconds.
      Not tainted 5.11.0-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.0  state:D stack:28152 pid: 9133 ppid:  8403 flags:0x00000004
Call Trace:
 context_switch kernel/sched/core.c:4324 [inline]
 __schedule+0x90c/0x21a0 kernel/sched/core.c:5075
 schedule+0xcf/0x270 kernel/sched/core.c:5154
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:5213
 __mutex_lock_common kernel/locking/mutex.c:1023 [inline]
 __mutex_lock+0x81f/0x1120 kernel/locking/mutex.c:1093
 blkdev_get_by_dev fs/block_dev.c:1444 [inline]
 blkdev_get_by_dev+0x261/0x600 fs/block_dev.c:1413
 blkdev_open+0x154/0x2b0 fs/block_dev.c:1542
 do_dentry_open+0x4b9/0x11b0 fs/open.c:817
 do_open fs/namei.c:3255 [inline]
 path_openat+0x1b8e/0x2720 fs/namei.c:3370
 do_filp_open+0x17e/0x3c0 fs/namei.c:3397
 do_sys_openat2+0x16d/0x420 fs/open.c:1178
 do_sys_open fs/open.c:1194 [inline]
 __do_sys_openat fs/open.c:1210 [inline]
 __se_sys_openat fs/open.c:1205 [inline]
 __x64_sys_openat+0x13f/0x1f0 fs/open.c:1205
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4194e4
RSP: 002b:00007f1b8a9b6ed0 EFLAGS: 00000293 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00000000004afb60 RCX: 00000000004194e4
RDX: 0000000000000002 RSI: 00007f1b8a9b7000 RDI: 00000000ffffff9c
RBP: 00007f1b8a9b7000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000002
R13: 0000000000000003 R14: 0000000020003ab8 R15: 000000000000025d

Showing all locks held in the system:
1 lock held by khungtaskd/1656:
 #0: ffffffff8bf743e0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6327
1 lock held by in:imklog/8079:
 #0: ffff88801250dc70 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0xe9/0x100 fs/file.c:961
2 locks held by systemd-udevd/9880:
 #0: ffff8880234ec460 (sb_writers#3){.+.+}-{0:0}, at: do_renameat2+0x376/0xc00 fs/namei.c:4401
 #1: ffff8880b9c1f948 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x305/0x440 kernel/sched/psi.c:833
1 lock held by systemd-udevd/9926:
2 locks held by systemd-udevd/9947:
1 lock held by systemd-udevd/10193:
1 lock held by syz-executor.0/9133:
 #0: ffff888019c3a320 (&bdev->bd_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev fs/block_dev.c:1444 [inline]
 #0: ffff888019c3a320 (&bdev->bd_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x261/0x600 fs/block_dev.c:1413

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

NMI backtrace for cpu 0
CPU: 0 PID: 1656 Comm: khungtaskd Not tainted 5.11.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:79 [inline]
 dump_stack+0xfa/0x151 lib/dump_stack.c:120
 nmi_cpu_backtrace.cold+0x44/0xd7 lib/nmi_backtrace.c:105
 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:209 [inline]
 watchdog+0xd48/0xfb0 kernel/hung_task.c:294
 kthread+0x3b1/0x4a0 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 9947 Comm: systemd-udevd Not tainted 5.11.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__sanitizer_cov_trace_const_cmp4+0xc/0x70 kernel/kcov.c:283
Code: 00 00 00 48 89 7c 30 e8 48 89 4c 30 f0 4c 89 54 d8 20 48 89 10 5b c3 0f 1f 80 00 00 00 00 41 89 f8 bf 03 00 00 00 4c 8b 14 24 <89> f1 65 48 8b 34 25 00 f0 01 00 e8 54 f0 ff ff 84 c0 74 4b 48 8b
RSP: 0018:ffffc900174cf8c8 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffc900174cf998 RCX: 0000000000000001
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: dffffc0000000000 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff83de6bd6 R11: 0000000000000000 R12: ffff88806ce202c0
R13: ffffffffffffffff R14: 0000000000000000 R15: fffff52002e99f35
FS:  00007fa0f25058c0(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005598d6932c88 CR3: 0000000015581000 CR4: 0000000000350ee0
Call Trace:
 xa_parent include/linux/xarray.h:1197 [inline]
 xas_find+0x566/0x7e0 lib/xarray.c:1257
 xas_next_entry include/linux/xarray.h:1641 [inline]
 find_get_entries+0x692/0xb80 mm/filemap.c:1913
 pagevec_lookup_entries+0x35/0x80 mm/swap.c:1063
 truncate_inode_pages_range+0x1f0/0x1620 mm/truncate.c:329
 kill_bdev fs/block_dev.c:86 [inline]
 __blkdev_put+0x30b/0x800 fs/block_dev.c:1572
 blkdev_put+0x92/0x580 fs/block_dev.c:1632
 blkdev_close+0x8c/0xb0 fs/block_dev.c:1640
 __fput+0x288/0x920 fs/file_table.c:280
 task_work_run+0xdd/0x1a0 kernel/task_work.c:140
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:174 [inline]
 exit_to_user_mode_prepare+0x249/0x250 kernel/entry/common.c:208
 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
 syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:301
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fa0f164b270
Code: 73 01 c3 48 8b 0d 38 7d 20 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 83 3d 59 c1 20 00 00 75 10 b8 03 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 ee fb ff ff 48 89 04 24
RSP: 002b:00007ffdb673b268 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007fa0f164b270
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
RBP: 00007fa0f2505710 R08: 00007fa0f25058c0 R09: 00005598d8dd9200
R10: 0000000000000040 R11: 0000000000000246 R12: 0000000000000000
R13: 00005598d8173110 R14: 0000000000000003 R15: 000000000000000e

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/02/22 22:10 upstream a99163e9e708 c26fb06b .config console log report info ci-upstream-kasan-gce-root INFO: task hung in blkdev_get_by_dev
* Struck through repros no longer work on HEAD.