syzbot


INFO: task hung in blkdev_get_by_dev (3)

Status: auto-obsoleted due to no activity on 2024/12/17 17:06
Reported-by: syzbot+c4395209eafb4e4a1cb5@syzkaller.appspotmail.com
First crash: 325d, last: 105d
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 25 41d 328d 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 469d 469d 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 1019d 1019d 0/28 auto-closed as invalid on 2022/05/08 09:47
linux-5.15 INFO: task hung in blkdev_get_by_dev 1 601d 601d 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 1398d 1398d 0/28 auto-closed as invalid on 2021/05/23 22:12
upstream INFO: task hung in blkdev_get_by_dev (4) block 1 848d 848d 0/28 auto-obsoleted due to no activity on 2022/11/25 11:03
upstream INFO: task hung in blkdev_get_by_dev (2) block 1727 1051d 1130d 0/28 closed as dup on 2021/11/21 14:02
upstream INFO: task hung in blkdev_get_by_dev (5) block C error 32 17d 661d 0/28 upstream: reported C repro on 2023/03/02 18:11

Sample crash report:
INFO: task udevd:4829 blocked for more than 143 seconds.
      Not tainted 5.15.166-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:udevd           state:D stack:25432 pid: 4829 ppid:  3028 flags:0x00004002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5027 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6373
 schedule+0x11b/0x1f0 kernel/sched/core.c:6456
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6515
 __mutex_lock_common+0xe34/0x25a0 kernel/locking/mutex.c:669
 __mutex_lock kernel/locking/mutex.c:729 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
 blkdev_get_by_dev+0x14d/0xa50 block/bdev.c:817
 blkdev_open+0x138/0x2d0 block/fops.c:463
 do_dentry_open+0x807/0xfb0 fs/open.c:826
 do_open fs/namei.c:3608 [inline]
 path_openat+0x2705/0x2f20 fs/namei.c:3742
 do_filp_open+0x21c/0x460 fs/namei.c:3769
 do_sys_openat2+0x13b/0x4f0 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]
 __x64_sys_openat+0x243/0x290 fs/open.c:1280
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f0bdb7129a4
RSP: 002b:00007fff201dabd0 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000561b092cb660 RCX: 00007f0bdb7129a4
RDX: 00000000000a0800 RSI: 0000561b0925dbf0 RDI: 00000000ffffff9c
RBP: 0000561b0925dbf0 R08: 0000000000000001 R09: 0000000000000010
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000a0800
R13: 0000561b09246af0 R14: 0000000000000001 R15: 0000561b0923d910
 </TASK>
INFO: task syz.3.1960:8328 blocked for more than 144 seconds.
      Not tainted 5.15.166-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.3.1960      state:D stack:27352 pid: 8328 ppid:  5515 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5027 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6373
 schedule+0x11b/0x1f0 kernel/sched/core.c:6456
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6515
 __mutex_lock_common+0xe34/0x25a0 kernel/locking/mutex.c:669
 __mutex_lock kernel/locking/mutex.c:729 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
 blkdev_put+0xfb/0x790 block/bdev.c:912
 blkdev_close+0x7c/0xa0 block/fops.c:475
 __fput+0x3fe/0x8e0 fs/file_table.c:280
 task_work_run+0x129/0x1a0 kernel/task_work.c:188
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:181
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214
 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
 syscall_exit_to_user_mode+0x5d/0x240 kernel/entry/common.c:307
 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fc246e45ef9
RSP: 002b:00007fc2452bf038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: 0000000000000000 RBX: 00007fc246ffef80 RCX: 00007fc246e45ef9
RDX: 0000000000000000 RSI: 000000000000ab03 RDI: 0000000000000003
RBP: 00007fc246eb8046 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fc246ffef80 R15: 00007ffcac031de8
 </TASK>
INFO: task syz.3.1960:8333 blocked for more than 144 seconds.
      Not tainted 5.15.166-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.3.1960      state:D stack:22008 pid: 8333 ppid:  5515 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5027 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6373
 schedule+0x11b/0x1f0 kernel/sched/core.c:6456
 io_schedule+0x88/0x100 kernel/sched/core.c:8481
 wait_on_page_bit_common+0xa13/0x1180 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+0x9c1/0x1040 mm/filemap.c:3480
 read_mapping_page include/linux/pagemap.h:515 [inline]
 read_part_sector+0xd8/0x530 block/partitions/core.c:729
 adfspart_check_ICS+0xd9/0xd00 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+0x964/0x16c0 block/partitions/core.c:700
 blkdev_get_whole+0x2fb/0x390 block/bdev.c:682
 blkdev_get_by_dev+0x2bc/0xa50 block/bdev.c:824
 blkdev_open+0x138/0x2d0 block/fops.c:463
 do_dentry_open+0x807/0xfb0 fs/open.c:826
 do_open fs/namei.c:3608 [inline]
 path_openat+0x2705/0x2f20 fs/namei.c:3742
 do_filp_open+0x21c/0x460 fs/namei.c:3769
 do_sys_openat2+0x13b/0x4f0 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]
 __x64_sys_openat+0x243/0x290 fs/open.c:1280
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fc246e44890
RSP: 002b:00007fc24529db70 EFLAGS: 00000293 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc246e44890
RDX: 0000000000000000 RSI: 00007fc24529dc10 RDI: 00000000ffffff9c
RBP: 00007fc24529dc10 R08: 0000000000000000 R09: 002364626e2f7665
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fc246fff058 R15: 00007ffcac031de8
 </TASK>

Showing all locks held in the system:
2 locks held by kworker/u4:0/9:
 #0: ffff8880b903a318 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0xa8/0x140 kernel/sched/core.c:483
 #1: ffff8880b9027848 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x53d/0x810 kernel/sched/psi.c:891
1 lock held by khungtaskd/27:
 #0: ffffffff8c91fbe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by udevd/3028:
 #0: ffff888020c85118 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xfb/0x790 block/bdev.c:912
 #1: ffff88814720a468 (&lo->lo_mutex){+.+.}-{3:3}, at: lo_release+0x4d/0x1f0 drivers/block/loop.c:2070
2 locks held by getty/3323:
 #0: ffff88807f1e1098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc9000209b2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1db0 drivers/tty/n_tty.c:2158
3 locks held by kworker/0:6/3619:
 #0: ffff888017070938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc900030c7d20 (fqdir_free_work){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffffffff8c9240b0 (rcu_state.barrier_mutex){+.+.}-{3:3}, at: rcu_barrier+0x9c/0x4e0 kernel/rcu/tree.c:4039
1 lock held by udevd/4829:
 #0: ffff88802101d118 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x14d/0xa50 block/bdev.c:817
1 lock held by syz.3.1960/8328:
 #0: ffff88802101d118 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xfb/0x790 block/bdev.c:912
1 lock held by syz.3.1960/8333:
 #0: ffff88802101d118 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x14d/0xa50 block/bdev.c:817
2 locks held by syz-executor/9008:
 #0: ffff888020cf9918 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xfb/0x790 block/bdev.c:912
 #1: ffff88814720d468 (&lo->lo_mutex){+.+.}-{3:3}, at: __loop_clr_fd+0xa9/0xbe0 drivers/block/loop.c:1365
4 locks held by kworker/u4:11/11944:
 #0: ffff8880171d5938 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc900012efd20 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffffffff8da25a50 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0xf1/0xb60 net/core/net_namespace.c:561
 #3: ffffffff8c9241a8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:290 [inline]
 #3: ffffffff8c9241a8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x280/0x740 kernel/rcu/tree_exp.h:845
2 locks held by syz.3.3433/11959:
 #0: ffffffff8ce01f28 (uuid_mutex){+.+.}-{3:3}, at: btrfs_mount_root+0x27b/0x930 fs/btrfs/super.c:1709
 #1: ffff888020c85118 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x14d/0xa50 block/bdev.c:817
1 lock held by syz.1.3434/11973:
 #0: ffff88802101d118 (&disk->open_mutex){+.+.}-{3:3}, at: sync_bdevs+0x1a5/0x310 block/bdev.c:1050

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

NMI backtrace for cpu 1
CPU: 1 PID: 27 Comm: khungtaskd Not tainted 5.15.166-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x46a/0x4a0 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x181/0x2a0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
 watchdog+0xe72/0xeb0 kernel/hung_task.c:295
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 9 Comm: kworker/u4:0 Not tainted 5.15.166-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
Workqueue: phy37 ieee80211_iface_work
RIP: 0010:___slab_alloc+0xccf/0xe10 mm/slub.c:2961
Code: be ff ff ff ff e8 11 b8 6a 08 85 c0 0f 84 dd 00 00 00 49 8b 44 24 10 83 78 28 00 0f 89 2b 01 00 00 41 8b 47 28 49 8b 44 05 00 <49> 89 04 24 49 83 44 24 08 08 49 8b 1f 48 83 c3 20 e8 3b c9 6a 08
RSP: 0018:ffffc90000ce7718 EFLAGS: 00000082
RAX: 0000000000000000 RBX: ffff8880b903df20 RCX: 0000000080100010
RDX: 000000008010000f RSI: ffffffff8a8b3cc0 RDI: ffffffff8ad90100
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000080100010
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8880b903df00
R13: ffff88807f2bf000 R14: ffffffff7fff0000 R15: ffff888017041dc0
FS:  0000000000000000(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555592ae05c8 CR3: 0000000028f7c000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 __slab_alloc mm/slub.c:3095 [inline]
 slab_alloc_node mm/slub.c:3186 [inline]
 slab_alloc mm/slub.c:3228 [inline]
 __kmalloc+0x1c9/0x300 mm/slub.c:4403
 kmalloc include/linux/slab.h:596 [inline]
 kzalloc include/linux/slab.h:721 [inline]
 ieee802_11_parse_elems_crc+0xb3/0x1130 net/mac80211/util.c:1478
 ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2240 [inline]
 ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1609 [inline]
 ieee80211_ibss_rx_queued_mgmt+0x380/0x2af0 net/mac80211/ibss.c:1643
 ieee80211_iface_process_skb net/mac80211/iface.c:1441 [inline]
 ieee80211_iface_work+0x78f/0xcc0 net/mac80211/iface.c:1495
 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>

Crashes (17):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/08 17:06 linux-5.15.y 14e468424d3e 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in blkdev_get_by_dev
2024/08/29 07:28 linux-5.15.y fa93fa65db6e ef3de9e8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in blkdev_get_by_dev
2024/08/16 08:41 linux-5.15.y 7e89efd3ae1c e4bacdaf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in blkdev_get_by_dev
2024/06/10 05:18 linux-5.15.y c61bd26ae81a 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in blkdev_get_by_dev
2024/09/06 10:44 linux-5.15.y 14e468424d3e 464ac2ed .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/09/05 05:15 linux-5.15.y 14e468424d3e dfbe2ed4 .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/08/18 20:26 linux-5.15.y 7e89efd3ae1c dbc93b08 .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/07/13 09:05 linux-5.15.y f45bea23c39c eaeb5c15 .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/07/09 02:58 linux-5.15.y f45bea23c39c bc23a442 .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/05/23 17:16 linux-5.15.y 83655231580b 4c2072ee .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/05/23 17:01 linux-5.15.y 83655231580b 4c2072ee .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/05/23 16:52 linux-5.15.y 83655231580b 4c2072ee .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/05/23 16:42 linux-5.15.y 83655231580b 4c2072ee .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/05/19 10:22 linux-5.15.y 83655231580b c0f1611a .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/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.