syzbot


INFO: task hung in __filemap_get_folio

Status: upstream: reported C repro on 2023/04/03 01:36
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+bd081b10a5bc611b2987@syzkaller.appspotmail.com
First crash: 445d, last: 26d
Bug presence (1)
Date Name Commit Repro Result
2023/05/21 upstream (ToT) 44c026a73be8 C [report] INFO: task hung in blkdev_put
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in __filemap_get_folio block C done done 111 319d 682d 0/27 upstream: reported C repro on 2022/08/08 08:05
Fix bisection attempts (10)
Created Duration User Patch Repo Result
2024/05/25 10:59 2h08m bisect fix linux-6.1.y job log (0) log
2024/04/21 02:08 2h50m bisect fix linux-6.1.y job log (0) log
2024/03/18 14:52 2h24m bisect fix linux-6.1.y job log (0) log
2024/02/15 06:08 2h04m bisect fix linux-6.1.y job log (0) log
2024/01/09 02:21 2h12m bisect fix linux-6.1.y job log (0) log
2023/12/09 23:11 2h39m bisect fix linux-6.1.y job log (0) log
2023/11/09 07:30 2h33m bisect fix linux-6.1.y job log (0) log
2023/10/06 04:21 2h03m bisect fix linux-6.1.y job log (0) log
2023/08/11 09:29 5h09m (2) bisect fix linux-6.1.y job log (0) log
2023/06/22 07:51 1h06m bisect fix linux-6.1.y job log (0) log

Sample crash report:
INFO: task udevd:4263 blocked for more than 143 seconds.
      Not tainted 6.1.29-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:udevd           state:D stack:0     pid:4263  ppid:3838   flags:0x0000000d
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:553
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0xee4/0x1c98 kernel/sched/core.c:6554
 schedule+0xc4/0x170 kernel/sched/core.c:6630
 io_schedule+0x8c/0x188 kernel/sched/core.c:8774
 folio_wait_bit_common+0x65c/0xb90 mm/filemap.c:1296
 __folio_lock mm/filemap.c:1659 [inline]
 folio_lock include/linux/pagemap.h:939 [inline]
 __filemap_get_folio+0x5ac/0xb6c mm/filemap.c:1931
 truncate_inode_pages_range+0x47c/0xf10 mm/truncate.c:378
 truncate_inode_pages+0x2c/0x3c mm/truncate.c:452
 kill_bdev block/bdev.c:76 [inline]
 blkdev_flush_mapping+0x134/0x280 block/bdev.c:662
 blkdev_put_whole block/bdev.c:693 [inline]
 blkdev_put+0x464/0x6e0 block/bdev.c:953
 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:2858
 do_signal arch/arm64/kernel/signal.c:1076 [inline]
 do_notify_resume+0x3ac/0x3470 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:581
INFO: task syz-executor390:4696 blocked for more than 143 seconds.
      Not tainted 6.1.29-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor390 state:D stack:0     pid:4696  ppid:4259   flags:0x00000001
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:553
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0xee4/0x1c98 kernel/sched/core.c:6554
 schedule+0xc4/0x170 kernel/sched/core.c:6630
 schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6689
 __mutex_lock_common+0xbd8/0x21a0 kernel/locking/mutex.c:679
 __mutex_lock kernel/locking/mutex.c:747 [inline]
 mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799
 blkdev_get_by_dev+0x12c/0x8ec block/bdev.c:813
 blkdev_open+0x10c/0x290 block/fops.c:500
 do_dentry_open+0x734/0xfa0 fs/open.c:882
 vfs_open+0x7c/0x90 fs/open.c:1013
 do_open fs/namei.c:3557 [inline]
 path_openat+0x1e14/0x2548 fs/namei.c:3714
 do_filp_open+0x1bc/0x3cc fs/namei.c:3741
 do_sys_openat2+0x128/0x3d8 fs/open.c:1310
 do_sys_open fs/open.c:1326 [inline]
 __do_sys_openat fs/open.c:1342 [inline]
 __se_sys_openat fs/open.c:1337 [inline]
 __arm64_sys_openat+0x1f0/0x240 fs/open.c:1337
 __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:142
 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
 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:581

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffff800015774ef0 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x44/0xcf4 kernel/rcu/tasks.h:510
1 lock held by rcu_tasks_trace/13:
 #0: ffff8000157756f0 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x44/0xcf4 kernel/rcu/tasks.h:510
1 lock held by khungtaskd/28:
 #0: ffff800015774d20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0xc/0x44 include/linux/rcupdate.h:305
2 locks held by getty/3981:
 #0: ffff0000d632f098 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x3c/0x4c drivers/tty/tty_ldsem.c:340
 #1: ffff80001ca202f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x414/0x1210 drivers/tty/n_tty.c:2177
1 lock held by udevd/4263:
 #0: ffff0000ce56c4c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xec/0x6e0 block/bdev.c:911
1 lock held by syz-executor390/4696:
 #0: ffff0000ce56c4c8 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_get_by_dev+0x12c/0x8ec block/bdev.c:813

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


Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/21 22:05 linux-6.1.y fa74641fb6b9 4bce1a3e .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in __filemap_get_folio
2023/04/03 01:36 linux-6.1.y 3b29299e5f60 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in __filemap_get_folio
2023/04/15 16:11 linux-6.1.y 0102425ac76b ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in __filemap_get_folio
* Struck through repros no longer work on HEAD.