syzbot


INFO: task hung in truncate_inode_pages

Status: upstream: reported on 2024/05/26 06:36
Reported-by: syzbot+97853ba2a7926422db1a@syzkaller.appspotmail.com
First crash: 179d, last: 73d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in truncate_inode_pages block C 29 25d 432d 0/28 upstream: reported C repro on 2023/09/16 05:45

Sample crash report:
INFO: task syz.0.3394:12325 blocked for more than 143 seconds.
      Not tainted 6.1.109-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.0.3394      state:D stack:0     pid:12325 ppid:10451  flags:0x0000000c
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:553
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0xef4/0x1d44 kernel/sched/core.c:6558
 schedule+0xc4/0x170 kernel/sched/core.c:6634
 io_schedule+0x8c/0x188 kernel/sched/core.c:8786
 folio_wait_bit_common+0x65c/0xb90 mm/filemap.c:1296
 __folio_lock mm/filemap.c:1659 [inline]
 folio_lock include/linux/pagemap.h:974 [inline]
 __filemap_get_folio+0x5ac/0xb6c mm/filemap.c:1931
 truncate_inode_pages_range+0x47c/0xf10 mm/truncate.c:377
 truncate_inode_pages+0x2c/0x3c mm/truncate.c:451
 kill_bdev block/bdev.c:76 [inline]
 blkdev_flush_mapping+0x134/0x280 block/bdev.c:664
 blkdev_put_whole block/bdev.c:695 [inline]
 blkdev_put+0x464/0x6e0 block/bdev.c:955
 blkdev_close+0x58/0x94 block/fops.c:514
 __fput+0x1c8/0x7c8 fs/file_table.c:320
 ____fput+0x20/0x30 fs/file_table.c:348
 task_work_run+0x240/0x2f0 kernel/task_work.c:203
 exit_task_work include/linux/task_work.h:39 [inline]
 do_exit+0x554/0x1a88 kernel/exit.c:871
 do_group_exit+0x194/0x22c kernel/exit.c:1021
 __do_sys_exit_group kernel/exit.c:1032 [inline]
 __se_sys_exit_group kernel/exit.c:1030 [inline]
 __wake_up_parent+0x0/0x60 kernel/exit.c:1030
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140
 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:204
 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffff800015ba50b0 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x44/0xcf4 kernel/rcu/tasks.h:517
1 lock held by rcu_tasks_trace/13:
 #0: ffff800015ba58b0 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x44/0xcf4 kernel/rcu/tasks.h:517
1 lock held by khungtaskd/28:
 #0: ffff800015ba4ee0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0xc/0x44 include/linux/rcupdate.h:349
2 locks held by getty/4053:
 #0: ffff0000d64b6098 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x3c/0x4c drivers/tty/tty_ldsem.c:340
 #1: ffff80001efc32f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x414/0x1214 drivers/tty/n_tty.c:2198
1 lock held by syz.0.3394/12325:
 #0: ffff0000ce6324c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xec/0x6e0 block/bdev.c:913
3 locks held by kworker/u4:10/13067:
1 lock held by syz.0.4074/13971:
 #0: ffff0000ce6324c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x12c/0x8ec block/bdev.c:815
1 lock held by syz.1.4674/15391:
 #0: ffff0000ce6324c8 (&disk->open_mutex){+.+.}-{3:3}, at: sync_bdevs+0x150/0x28c block/bdev.c:1054
2 locks held by syz-executor/15489:
3 locks held by syz.0.4971/16185:
5 locks held by syz.1.4974/16189:
2 locks held by syz.4.4976/16195:

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


Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/08 21:11 linux-6.1.y 5ca5b389fddf 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in truncate_inode_pages
2024/09/07 05:47 linux-6.1.y 699506173494 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in truncate_inode_pages
2024/06/25 18:46 linux-6.1.y eb44d83053d6 04bd2a30 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in truncate_inode_pages
2024/05/28 10:49 linux-6.1.y 88690811da69 f550015e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in truncate_inode_pages
2024/05/26 06:35 linux-6.1.y 88690811da69 a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in truncate_inode_pages
* Struck through repros no longer work on HEAD.