syzbot


INFO: task hung in blkdev_get_by_dev (3)

Status: upstream: reported on 2024/02/01 00:39
Reported-by: syzbot+c4395209eafb4e4a1cb5@syzkaller.appspotmail.com
First crash: 94d, last: 24d
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 4d23h 97d 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 788d 788d 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
upstream INFO: task hung in blkdev_get_by_dev fs 1 1167d 1167d 0/26 auto-closed as invalid on 2021/05/23 22:12
upstream INFO: task hung in blkdev_get_by_dev (4) block 1 617d 617d 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 899d 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 54d 430d 0/26 upstream: reported C repro on 2023/03/02 18:11

Sample crash report:
INFO: task udevd:4079 blocked for more than 143 seconds.
      Not tainted 5.15.154-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:udevd           state:D stack:    0 pid: 4079 ppid:  3584 flags:0x00000004
Call trace:
 __switch_to+0x308/0x5e8 arch/arm64/kernel/process.c:518
 context_switch kernel/sched/core.c:5030 [inline]
 __schedule+0xf10/0x1e48 kernel/sched/core.c:6376
 schedule+0x11c/0x1c8 kernel/sched/core.c:6459
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6518
 __mutex_lock_common+0xba0/0x2154 kernel/locking/mutex.c:669
 __mutex_lock kernel/locking/mutex.c:729 [inline]
 mutex_lock_nested+0xa4/0xf8 kernel/locking/mutex.c:743
 blkdev_get_by_dev+0x12c/0x89c block/bdev.c:817
 blkdev_open+0x10c/0x274 block/fops.c:463
 do_dentry_open+0x780/0xed8 fs/open.c:826
 vfs_open+0x7c/0x90 fs/open.c:956
 do_open fs/namei.c:3608 [inline]
 path_openat+0x1ea0/0x26cc fs/namei.c:3742
 do_filp_open+0x1a8/0x3b4 fs/namei.c:3769
 do_sys_openat2+0x128/0x3d8 fs/open.c:1253
 do_sys_open fs/open.c:1269 [inline]
 __do_sys_openat fs/open.c:1285 [inline]
 __se_sys_openat fs/open.c:1280 [inline]
 __arm64_sys_openat+0x1f0/0x240 fs/open.c:1280
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608
 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
INFO: task syz-executor.3:5087 blocked for more than 143 seconds.
      Not tainted 5.15.154-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.3  state:D stack:    0 pid: 5087 ppid:  3983 flags:0x00000005
Call trace:
 __switch_to+0x308/0x5e8 arch/arm64/kernel/process.c:518
 context_switch kernel/sched/core.c:5030 [inline]
 __schedule+0xf10/0x1e48 kernel/sched/core.c:6376
 schedule+0x11c/0x1c8 kernel/sched/core.c:6459
 io_schedule+0x8c/0x194 kernel/sched/core.c:8484
 wait_on_page_bit_common+0x6fc/0xc14 mm/filemap.c:1356
 wait_on_page_bit mm/filemap.c:1417 [inline]
 wait_on_page_locked include/linux/pagemap.h:688 [inline]
 wait_on_page_read mm/filemap.c:3437 [inline]
 do_read_cache_page+0x760/0x950 mm/filemap.c:3480
 read_cache_page+0x68/0x84 mm/filemap.c:3574
 read_mapping_page include/linux/pagemap.h:515 [inline]
 read_part_sector+0xe8/0x4d8 block/partitions/core.c:729
 adfspart_check_ICS+0xd4/0x5d0 block/partitions/acorn.c:360
 check_partition block/partitions/core.c:148 [inline]
 blk_add_partitions block/partitions/core.c:614 [inline]
 bdev_disk_changed+0x83c/0x1358 block/partitions/core.c:700
 blkdev_get_whole+0x2a0/0x344 block/bdev.c:682
 blkdev_get_by_dev+0x238/0x89c block/bdev.c:824
 blkdev_reread_part block/ioctl.c:106 [inline]
 blkdev_common_ioctl+0x1d74/0x2764 block/ioctl.c:528
 blkdev_ioctl+0x350/0xbd0 block/ioctl.c:598
 block_ioctl+0xa8/0x114 block/fops.c:493
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl fs/ioctl.c:860 [inline]
 __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:860
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608
 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
INFO: task syz-executor.3:5089 blocked for more than 143 seconds.
      Not tainted 5.15.154-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.3  state:D stack:    0 pid: 5089 ppid:  3983 flags:0x0000000d
Call trace:
 __switch_to+0x308/0x5e8 arch/arm64/kernel/process.c:518
 context_switch kernel/sched/core.c:5030 [inline]
 __schedule+0xf10/0x1e48 kernel/sched/core.c:6376
 schedule+0x11c/0x1c8 kernel/sched/core.c:6459
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6518
 __mutex_lock_common+0xba0/0x2154 kernel/locking/mutex.c:669
 __mutex_lock kernel/locking/mutex.c:729 [inline]
 mutex_lock_nested+0xa4/0xf8 kernel/locking/mutex.c:743
 blkdev_put+0xe0/0x6b0 block/bdev.c:912
 blkdev_close+0x74/0xb0 block/fops.c:475
 __fput+0x30c/0x7f0 fs/file_table.c:280
 ____fput+0x20/0x30 fs/file_table.c:308
 task_work_run+0x130/0x1e4 kernel/task_work.c:164
 get_signal+0x1450/0x1550 kernel/signal.c:2661
 do_signal arch/arm64/kernel/signal.c:890 [inline]
 do_notify_resume+0x3d0/0x32b8 arch/arm64/kernel/signal.c:943
 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:133 [inline]
 exit_to_user_mode arch/arm64/kernel/entry-common.c:138 [inline]
 el0_svc+0xfc/0x1f0 arch/arm64/kernel/entry-common.c:609
 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffff800014b114e0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0xc/0x44 include/linux/rcupdate.h:311
4 locks held by kworker/u4:4/529:
 #0: ffff0000c038c138 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work+0x66c/0x11b8 kernel/workqueue.c:2283
 #1: ffff80001d647c00 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work+0x6ac/0x11b8 kernel/workqueue.c:2285
 #2: 
ffff800016a2a9d0
 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0xf4/0x9bc net/core/net_namespace.c:558
 #3: 
ffff800016a361a8
 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock+0x20/0x2c net/core/rtnetlink.c:72
3 locks held by kworker/0:2/1947:
 #0: 
ffff0000c0020938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x66c/0x11b8 kernel/workqueue.c:2283
 #1: ffff800022197c00 ((linkwatch_work).work){+.+.}-{0:0}, at: process_one_work+0x6ac/0x11b8 kernel/workqueue.c:2285
 #2: ffff800016a361a8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock+0x20/0x2c net/core/rtnetlink.c:72
2 locks held by kworker/0:3/3548:
 #0: ffff0000c0021938 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x66c/0x11b8 kernel/workqueue.c:2283
 #1: 
ffff80001f2e7c00
 ((work_completion)(&rew.rew_work)){+.+.}-{0:0}, at: process_one_work+0x6ac/0x11b8 kernel/workqueue.c:2285
1 lock held by udevd/3584:
 #0: 
ffff0000cb8ca918
 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x12c/0x89c block/bdev.c:817
2 locks held by getty/3724:
 #0: ffff0000d3237098 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x40/0x50 drivers/tty/tty_ldsem.c:340
 #1: ffff80001a23e2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x414/0x1204 drivers/tty/n_tty.c:2158
1 lock held by udevd/4079:
 #0: ffff0000cbd6f118 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x12c/0x89c block/bdev.c:817
1 lock held by udevd/4755:
 #0: ffff0000cb95b918 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xe0/0x6b0 block/bdev.c:912
1 lock held by syz-executor.3/5087:
 #0: ffff0000cbd6f118 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x12c/0x89c block/bdev.c:817
1 lock held by syz-executor.3/5089:
 #0: 
ffff0000cbd6f118 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xe0/0x6b0 block/bdev.c:912
2 locks held by syz-executor.1/7753:
 #0: ffff0000cf628110 (&evdev->mutex){+.+.}-{3:3}, at: evdev_close_device drivers/input/evdev.c:411 [inline]
 #0: ffff0000cf628110 (&evdev->mutex){+.+.}-{3:3}, at: evdev_release+0x208/0x2ec drivers/input/evdev.c:456
 #1: ffff0000c81cc2c0 (&dev->mutex#2){+.+.}-{3:3}, at: input_close_device+0x50/0x1d4 drivers/input/input.c:690
4 locks held by syz-executor.4/7780:
2 locks held by syz-executor.3/7804:
 #0: ffff800016a361a8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock+0x20/0x2c net/core/rtnetlink.c:72
 #1: ffff800014b15ae8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:290 [inline]
 #1: ffff800014b15ae8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x320/0x660 kernel/rcu/tree_exp.h:845
2 locks held by syz-executor.2/7815:
 #0: 
ffff0000cb8ca918
 (&disk->open_mutex){+.+.}-{3:3}
, at: blkdev_put+0xe0/0x6b0 block/bdev.c:912
 #1: ffff0000cb857468 (&lo->lo_mutex){+.+.}-{3:3}, at: lo_release+0x58/0x210 drivers/block/loop.c:2070
1 lock held by syz-executor.0/7817:
 #0: ffff800016a361a8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock+0x20/0x2c net/core/rtnetlink.c:72

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


Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/11 10:56 linux-5.15.y cdfd0a7f0139 33b9e058 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in blkdev_get_by_dev
2024/03/25 04:22 linux-5.15.y b95c01af2113 0ea90952 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in blkdev_get_by_dev
2024/02/01 00:38 linux-5.15.y 6139f2a02fe0 373b66cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in blkdev_get_by_dev
* Struck through repros no longer work on HEAD.