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: 29d, last: 27d
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 15 104d 282d 0/27 upstream: reported C repro on 2023/09/16 05:45

Sample crash report:
INFO: task syz-executor.1:5940 blocked for more than 143 seconds.
      Not tainted 6.1.92-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.1  state:D stack:0     pid:5940  ppid:4247   flags:0x00000004
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:553
 context_switch kernel/sched/core.c:5245 [inline]
 __schedule+0xee4/0x1c98 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+0x30c/0x7bc fs/file_table.c:320
 ____fput+0x20/0x30 fs/file_table.c:348
 task_work_run+0x240/0x2f0 kernel/task_work.c:179
 exit_task_work include/linux/task_work.h:38 [inline]
 do_exit+0x554/0x1a88 kernel/exit.c:869
 do_group_exit+0x194/0x22c kernel/exit.c:1019
 get_signal+0x14a0/0x158c kernel/signal.c:2862
 do_signal arch/arm64/kernel/signal.c:1076 [inline]
 do_notify_resume+0x3ac/0x3474 arch/arm64/kernel/signal.c:1129
 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline]
 exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline]
 el0_svc+0x9c/0x168 arch/arm64/kernel/entry-common.c:638
 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: ffff800015a24e70 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x44/0xcf4 kernel/rcu/tasks.h:516
1 lock held by rcu_tasks_trace/13:
 #0: ffff800015a25670 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x44/0xcf4 kernel/rcu/tasks.h:516
1 lock held by khungtaskd/28:
 #0: ffff800015a24ca0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0xc/0x44 include/linux/rcupdate.h:349
2 locks held by getty/3987:
 #0: ffff0000d7ed8098 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x3c/0x4c drivers/tty/tty_ldsem.c:340
 #1: ffff80001bcf02f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x414/0x1214 drivers/tty/n_tty.c:2188
1 lock held by syz-fuzzer/4220:
2 locks held by kworker/1:5/4295:
 #0: ffff0000c0021938 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x664/0x1404 kernel/workqueue.c:2265
 #1: ffff80001e947c20 ((work_completion)(&rew->rew_work)){+.+.}-{0:0}, at: process_one_work+0x6a8/0x1404 kernel/workqueue.c:2267
1 lock held by syz-executor.1/5940:
 #0: ffff0000ce79a4c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xec/0x6e0 block/bdev.c:913
2 locks held by kworker/0:14/8059:
 #0: ffff0000c0020938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x664/0x1404 kernel/workqueue.c:2265
 #1: ffff80001e777c20 (free_ipc_work){+.+.}-{0:0}, at: process_one_work+0x6a8/0x1404 kernel/workqueue.c:2267
3 locks held by syz-executor.1/9245:
 #0: ffff0000d77ad0b8 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close net/bluetooth/hci_core.c:552 [inline]
 #0: ffff0000d77ad0b8 (&hdev->req_lock){+.+.}-{3:3}, at: hci_unregister_dev+0x1d8/0x4a4 net/bluetooth/hci_core.c:2736
 #1: ffff0000d77ac078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_close_sync+0x39c/0xf6c net/bluetooth/hci_sync.c:5005
 #2: ffff800017f7ee88 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1805 [inline]
 #2: ffff800017f7ee88 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xb0/0x27c net/bluetooth/hci_conn.c:2441
1 lock held by syz-executor.4/9867:
 #0: ffff800015a2a278 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:291 [inline]
 #0: ffff800015a2a278 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x3e0/0x77c kernel/rcu/tree_exp.h:962
3 locks held by syz-executor.2/10048:
 #0: ffff0000de8190b8 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close net/bluetooth/hci_core.c:552 [inline]
 #0: ffff0000de8190b8 (&hdev->req_lock){+.+.}-{3:3}, at: hci_unregister_dev+0x1d8/0x4a4 net/bluetooth/hci_core.c:2736
 #1: ffff0000de818078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_close_sync+0x39c/0xf6c net/bluetooth/hci_sync.c:5005
 #2: ffff800017f7ee88 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1805 [inline]
 #2: ffff800017f7ee88 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xb0/0x27c net/bluetooth/hci_conn.c:2441
2 locks held by syz-executor.0/10086:
 #0: ffff800017e319c8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock+0x20/0x2c net/core/rtnetlink.c:74
 #1: ffff800015a2a278 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:323 [inline]
 #1: ffff800015a2a278 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x30c/0x77c kernel/rcu/tree_exp.h:962

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


Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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.