syzbot


INFO: task hung in read_cache_folio (3)

Status: auto-obsoleted due to no activity on 2025/01/15 05:53
Subsystems: block
[Documentation on labels]
First crash: 95d, last: 95d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in read_cache_folio block 1 534d 534d 0/28 auto-obsoleted due to no activity on 2023/11/03 07:38
upstream INFO: task hung in read_cache_folio (2) block 6 206d 399d 0/28 auto-obsoleted due to no activity on 2024/09/26 05:52

Sample crash report:
INFO: task syz.0.241:6991 blocked for more than 430 seconds.
      Not tainted 6.12.0-rc1-syzkaller-00002-gcfb10de18538 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.0.241       state:D stack:0     pid:6991  tgid:6989  ppid:4625   flags:0x00000006
Call Trace:
[<ffffffff85fe3a64>] context_switch kernel/sched/core.c:5315 [inline]
[<ffffffff85fe3a64>] __schedule+0xd5a/0x3886 kernel/sched/core.c:6675
[<ffffffff85fe6654>] __schedule_loop kernel/sched/core.c:6752 [inline]
[<ffffffff85fe6654>] schedule+0xc4/0x324 kernel/sched/core.c:6767
[<ffffffff85fe692c>] io_schedule+0x78/0xd4 kernel/sched/core.c:7552
[<ffffffff806fac6c>] folio_wait_bit_common+0x398/0x944 mm/filemap.c:1309
[<ffffffff807058b6>] folio_put_wait_locked mm/filemap.c:1473 [inline]
[<ffffffff807058b6>] do_read_cache_folio+0x2c0/0x4d2 mm/filemap.c:3807
[<ffffffff80705b16>] read_cache_folio+0x4e/0x68 mm/filemap.c:3857
[<ffffffff81300932>] read_mapping_folio include/linux/pagemap.h:1011 [inline]
[<ffffffff81300932>] read_part_sector+0xc0/0x516 block/partitions/core.c:714
[<ffffffff81300f58>] msdos_partition+0x140/0x25ac block/partitions/msdos.c:592
[<ffffffff812ff7b6>] check_partition block/partitions/core.c:138 [inline]
[<ffffffff812ff7b6>] blk_add_partitions block/partitions/core.c:581 [inline]
[<ffffffff812ff7b6>] bdev_disk_changed+0x5de/0x139c block/partitions/core.c:685
[<ffffffff81270840>] blkdev_get_whole+0x17c/0x514 block/bdev.c:707
[<ffffffff81272ab6>] bdev_open+0x86a/0xfa8 block/bdev.c:916
[<ffffffff81278d04>] blkdev_open+0x334/0x3f0 block/fops.c:631
[<ffffffff80a17df8>] do_dentry_open+0x5d0/0x10a2 fs/open.c:958
[<ffffffff80a1c810>] vfs_open+0xbe/0x37a fs/open.c:1088
[<ffffffff80a69c56>] do_open fs/namei.c:3774 [inline]
[<ffffffff80a69c56>] path_openat+0x1b70/0x28c2 fs/namei.c:3933
[<ffffffff80a6ab1a>] do_filp_open+0x172/0x328 fs/namei.c:3960
[<ffffffff80a1d5b0>] do_sys_openat2+0x174/0x1ca fs/open.c:1415
[<ffffffff80a1df5c>] do_sys_open fs/open.c:1430 [inline]
[<ffffffff80a1df5c>] __do_sys_openat fs/open.c:1446 [inline]
[<ffffffff80a1df5c>] __se_sys_openat fs/open.c:1441 [inline]
[<ffffffff80a1df5c>] __riscv_sys_openat+0x178/0x1fe fs/open.c:1441
[<ffffffff8000f2d4>] syscall_handler+0x94/0x118 arch/riscv/include/asm/syscall.h:90
[<ffffffff85fd9c3a>] do_trap_ecall_u+0x1aa/0x216 arch/riscv/kernel/traps.c:331
[<ffffffff85ffcab6>] _new_vmalloc_restore_context_a0+0xc2/0xce
INFO: task syz.0.241:6993 blocked for more than 430 seconds.
      Not tainted 6.12.0-rc1-syzkaller-00002-gcfb10de18538 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.0.241       state:D stack:0     pid:6993  tgid:6989  ppid:4625   flags:0x00000006
Call Trace:
[<ffffffff85fe3a64>] context_switch kernel/sched/core.c:5315 [inline]
[<ffffffff85fe3a64>] __schedule+0xd5a/0x3886 kernel/sched/core.c:6675
[<ffffffff85fe6654>] __schedule_loop kernel/sched/core.c:6752 [inline]
[<ffffffff85fe6654>] schedule+0xc4/0x324 kernel/sched/core.c:6767
[<ffffffff85fe6f9c>] schedule_preempt_disabled+0x16/0x28 kernel/sched/core.c:6824
[<ffffffff85fea818>] __mutex_lock_common kernel/locking/mutex.c:684 [inline]
[<ffffffff85fea818>] __mutex_lock+0x86a/0x1022 kernel/locking/mutex.c:752
[<ffffffff85feafe4>] mutex_lock_nested+0x14/0x1c kernel/locking/mutex.c:804
[<ffffffff81273812>] bdev_release+0x12c/0x600 block/bdev.c:1087
[<ffffffff81274ac6>] blkdev_release+0x1a/0x26 block/fops.c:639
[<ffffffff80a2c748>] __fput+0x378/0x9e6 fs/file_table.c:431
[<ffffffff80a2ce5c>] ____fput+0x1c/0x26 fs/file_table.c:459
[<ffffffff8014fb6c>] task_work_run+0x16a/0x25e kernel/task_work.c:228
[<ffffffff8010be38>] get_signal+0x1aa/0x23b0 kernel/signal.c:2690
[<ffffffff8000bb06>] arch_do_signal_or_restart+0x8d6/0x1190 arch/riscv/kernel/signal.c:437
[<ffffffff85fdabf4>] exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
[<ffffffff85fdabf4>] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
[<ffffffff85fdabf4>] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
[<ffffffff85fdabf4>] syscall_exit_to_user_mode+0x2a6/0x31e kernel/entry/common.c:218
[<ffffffff85fd9b16>] do_trap_ecall_u+0x86/0x216 arch/riscv/kernel/traps.c:345
[<ffffffff85ffcab6>] _new_vmalloc_restore_context_a0+0xc2/0xce

Showing all locks held in the system:
1 lock held by khungtaskd/36:
 #0: ffffffff87fcc100 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x68/0x2d6 kernel/locking/lockdep.c:6716
2 locks held by getty/3149:
 #0: ff6000001d0900a0 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x3a/0x46 drivers/tty/tty_ldsem.c:340
 #1: ff2000000008b2f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0xd7c/0x129a drivers/tty/n_tty.c:2211
3 locks held by kworker/0:3/3870:
1 lock held by syz.0.241/6991:
 #0: ff600000730d6cc8 (&disk->open_mutex){+.+.}-{3:3}, at: bdev_open+0x672/0xfa8 block/bdev.c:904
1 lock held by syz.0.241/6993:
 #0: ff600000730d6cc8 (&disk->open_mutex){+.+.}-{3:3}, at: bdev_release+0x12c/0x600 block/bdev.c:1087
7 locks held by syz-executor/7886:
 #0: ff6000001bcbe420 (sb_writers#7){.+.+}-{0:0}, at: __sb_start_write include/linux/fs.h:1716 [inline]
 #0: ff6000001bcbe420 (sb_writers#7){.+.+}-{0:0}, at: sb_start_write include/linux/fs.h:1852 [inline]
 #0: ff6000001bcbe420 (sb_writers#7){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2931 [inline]
 #0: ff6000001bcbe420 (sb_writers#7){.+.+}-{0:0}, at: vfs_write+0x728/0x9b4 fs/read_write.c:679
 #1: ff60000031848888 (&of->mutex#2){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x23a/0x460 fs/kernfs/file.c:325
 #2: ff6000001b1ecc38 (kn->active#4){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x258/0x460 fs/kernfs/file.c:326
 #3: ffffffff88c129e8 (nsim_bus_dev_list_lock){+.+.}-{3:3}, at: del_device_store+0xf0/0x48c drivers/net/netdevsim/bus.c:216
 #4: ff600000192390e8 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:1014 [inline]
 #4: ff600000192390e8 (&dev->mutex){....}-{3:3}, at: __device_driver_lock drivers/base/dd.c:1095 [inline]
 #4: ff600000192390e8 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0x9c/0x572 drivers/base/dd.c:1293
 #5: ff6000002947b250 (&devlink->lock_key#7){+.+.}-{3:3}, at: devl_lock+0x22/0x2c net/devlink/core.c:276
 #6: ffffffff87fdc7f8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock+0x266/0x384 kernel/rcu/tree_exp.h:297

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

NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 36 Comm: khungtaskd Not tainted 6.12.0-rc1-syzkaller-00002-gcfb10de18538 #0
Hardware name: riscv-virtio,qemu (DT)
Call Trace:
[<ffffffff80010a14>] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:130
[<ffffffff85f7c3bc>] show_stack+0x34/0x40 arch/riscv/kernel/stacktrace.c:136
[<ffffffff85fd796a>] __dump_stack lib/dump_stack.c:94 [inline]
[<ffffffff85fd796a>] dump_stack_lvl+0x122/0x196 lib/dump_stack.c:120
[<ffffffff85fd79fa>] dump_stack+0x1c/0x24 lib/dump_stack.c:129
[<ffffffff85f3fa9e>] nmi_cpu_backtrace+0x39c/0x39e lib/nmi_backtrace.c:113
[<ffffffff85f3fd56>] nmi_trigger_cpumask_backtrace+0x2b6/0x456 lib/nmi_backtrace.c:62
[<ffffffff80019964>] arch_trigger_cpumask_backtrace+0x2c/0x3c arch/riscv/kernel/smp.c:347
[<ffffffff80432c2c>] trigger_all_cpu_backtrace include/linux/nmi.h:162 [inline]
[<ffffffff80432c2c>] check_hung_uninterruptible_tasks kernel/hung_task.c:223 [inline]
[<ffffffff80432c2c>] watchdog+0xcfa/0x1178 kernel/hung_task.c:379
[<ffffffff80154e04>] kthread+0x28c/0x3a6 kernel/kthread.c:389
[<ffffffff85ffcbce>] ret_from_fork+0xe/0x18 arch/riscv/kernel/entry.S:326
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 3870 Comm: kworker/0:3 Not tainted 6.12.0-rc1-syzkaller-00002-gcfb10de18538 #0
Hardware name: riscv-virtio,qemu (DT)
Workqueue: events_power_efficient gc_worker
epc : arch_local_irq_restore arch/riscv/include/asm/irqflags.h:51 [inline]
epc : seqcount_lockdep_reader_access include/linux/seqlock.h:74 [inline]
epc : nf_conntrack_get_ht include/net/netfilter/nf_conntrack.h:345 [inline]
epc : gc_worker+0x2fa/0x1674 net/netfilter/nf_conntrack_core.c:1534
 ra : arch_local_irq_restore arch/riscv/include/asm/irqflags.h:51 [inline]
 ra : seqcount_lockdep_reader_access include/linux/seqlock.h:74 [inline]
 ra : nf_conntrack_get_ht include/net/netfilter/nf_conntrack.h:345 [inline]
 ra : gc_worker+0x2f6/0x1674 net/netfilter/nf_conntrack_core.c:1534
epc : ffffffff8514545c ra : ffffffff85145458 sp : ff2000000c7f79e0
 gp : ffffffff897bea80 tp : ff6000001a624ec0 t0 : ff6000001a6259e0
 t1 : ff6000001a625a58 t2 : 0000000000000357 s0 : ff2000000c7f7b70
 s1 : 0000000000000002 a0 : 0000000000000007 a1 : 0000000000000000
 a2 : 0000000000000002 a3 : ffffffff85145458 a4 : 0000000000000000
 a5 : ff6000001a625ec0 a6 : 0000000000000003 a7 : 1fec0000034c4b45
 s2 : dfffffff00000000 s3 : ffffffff87e101c0 s4 : 000000000000be31
 s5 : 0000000000001770 s6 : 0000000000000064 s7 : 0000000000000000
 s8 : 0000000000000000 s9 : ffffffffffffffff s10: ffffffff90bb16a0
 s11: 0000000000000000 t3 : 1fec0000034c4b3b t4 : 000000000000000b
 t5 : e5727b397ce8fe10 t6 : 1fec0000034c4b4f
status: 0000000200000120 badaddr: 0000000000000000 cause: 8000000000000001
[<ffffffff8514545c>] arch_local_irq_restore arch/riscv/include/asm/irqflags.h:51 [inline]
[<ffffffff8514545c>] seqcount_lockdep_reader_access include/linux/seqlock.h:74 [inline]
[<ffffffff8514545c>] nf_conntrack_get_ht include/net/netfilter/nf_conntrack.h:345 [inline]
[<ffffffff8514545c>] gc_worker+0x2fa/0x1674 net/netfilter/nf_conntrack_core.c:1534
[<ffffffff80135b62>] process_one_work+0x956/0x1dae kernel/workqueue.c:3229
[<ffffffff80137578>] process_scheduled_works kernel/workqueue.c:3310 [inline]
[<ffffffff80137578>] worker_thread+0x5be/0xdc6 kernel/workqueue.c:3391
[<ffffffff80154e04>] kthread+0x28c/0x3a6 kernel/kthread.c:389
[<ffffffff85ffcbce>] ret_from_fork+0xe/0x18 arch/riscv/kernel/entry.S:326

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/17 05:46 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes cfb10de18538 666f77ed .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu2-riscv64 INFO: task hung in read_cache_folio
* Struck through repros no longer work on HEAD.