syzbot


INFO: task hung in filemap_fault

Status: auto-obsoleted due to no activity on 2023/11/29 22:47
Reported-by: syzbot+f9470e370497e373231f@syzkaller.appspotmail.com
First crash: 255d, last: 255d
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in filemap_fault (3) mm 1 878d 878d 0/26 closed as invalid on 2022/02/08 09:40
upstream INFO: task hung in filemap_fault (5) mm fs 12 322d 700d 0/26 auto-obsoleted due to no activity on 2023/09/13 22:48
linux-6.1 INFO: task hung in filemap_fault 2 336d 360d 0/3 auto-obsoleted due to no activity on 2023/09/09 11:34
upstream INFO: task hung in filemap_fault mm 24 2306d 2327d 0/26 closed as invalid on 2018/02/13 19:52
android-44 INFO: task hung in filemap_fault 3 2236d 2238d 0/2 auto-closed as invalid on 2019/02/22 14:09
android-49 INFO: task hung in filemap_fault 4 2129d 2176d 0/3 auto-closed as invalid on 2019/02/22 14:49
upstream INFO: task hung in filemap_fault (2) mm 5 2019d 2224d 0/26 auto-closed as invalid on 2019/04/20 06:20
upstream INFO: task hung in filemap_fault (4) mm 1 796d 796d 0/26 auto-closed as invalid on 2022/05/27 12:14

Sample crash report:
INFO: task syz-executor.3:26635 blocked for more than 143 seconds.
      Not tainted 5.15.127-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.3  state:D stack:27064 pid:26635 ppid:  3527 flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5026 [inline]
 __schedule+0x12c4/0x4590 kernel/sched/core.c:6372
 schedule+0x11b/0x1f0 kernel/sched/core.c:6455
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6514
 rwsem_down_read_slowpath+0x605/0xb40 kernel/locking/rwsem.c:1047
 __down_read_common kernel/locking/rwsem.c:1231 [inline]
 __down_read kernel/locking/rwsem.c:1244 [inline]
 down_read+0x9a/0x2e0 kernel/locking/rwsem.c:1490
 filemap_invalidate_lock_shared include/linux/fs.h:842 [inline]
 filemap_fault+0x708/0x1470 mm/filemap.c:3072
 __do_fault+0x139/0x340 mm/memory.c:3898
 do_shared_fault mm/memory.c:4288 [inline]
 do_fault mm/memory.c:4366 [inline]
 handle_pte_fault mm/memory.c:4621 [inline]
 __handle_mm_fault mm/memory.c:4756 [inline]
 handle_mm_fault+0x275d/0x5950 mm/memory.c:4854
 do_user_addr_fault arch/x86/mm/fault.c:1397 [inline]
 handle_page_fault arch/x86/mm/fault.c:1485 [inline]
 exc_page_fault+0x271/0x740 arch/x86/mm/fault.c:1541
 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:568
RIP: 0033:0x7f404a123b98
RSP: 002b:00007ffd5fd895d8 EFLAGS: 00010246
RAX: 0000000020000040 RBX: 00007ffd5fd896e8 RCX: 0030656c69662f2e
RDX: 0000000000000008 RSI: 0030656c69662f2e RDI: 0000000020000040
RBP: 0000000000000032 R08: 00007f404a0c6000 R09: 0000000000000000
R10: 0000000081a6b190 R11: 0000000000000246 R12: 00007f4049cc6498
R13: fffffffffffffffe R14: 00007f4049cc6000 R15: 00007f4049cc64a0
 </TASK>
INFO: task syz-executor.3:26640 blocked for more than 143 seconds.
      Not tainted 5.15.127-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.3  state:D stack:28736 pid:26640 ppid:  3527 flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5026 [inline]
 __schedule+0x12c4/0x4590 kernel/sched/core.c:6372
 schedule+0x11b/0x1f0 kernel/sched/core.c:6455
 rwsem_down_write_slowpath+0xebb/0x15c0 kernel/locking/rwsem.c:1157
 __down_write_common kernel/locking/rwsem.c:1284 [inline]
 __down_write kernel/locking/rwsem.c:1293 [inline]
 down_write+0x164/0x170 kernel/locking/rwsem.c:1542
 filemap_invalidate_lock include/linux/fs.h:832 [inline]
 blkdev_fallocate+0x257/0x3d0 block/fops.c:600
 vfs_fallocate+0x54a/0x6b0 fs/open.c:308
 ksys_fallocate fs/open.c:331 [inline]
 __do_sys_fallocate fs/open.c:339 [inline]
 __se_sys_fallocate fs/open.c:337 [inline]
 __x64_sys_fallocate+0xb9/0x100 fs/open.c:337
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f404a142ae9
RSP: 002b:00007f40486a30c8 EFLAGS: 00000246 ORIG_RAX: 000000000000011d
RAX: ffffffffffffffda RBX: 00007f404a262050 RCX: 00007f404a142ae9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00007f404a18e47a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000001002000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007f404a262050 R15: 00007ffd5fd894f8
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8c91f0a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/3248:
 #0: ffff88814aef4098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc90002bb52e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1db0 drivers/tty/n_tty.c:2158
3 locks held by syz-fuzzer/3487:
 #0: ffff8880249f8460 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:377
 #1: ffff88803da0a1d8 (&type->i_mutex_dir_key#4/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:822 [inline]
 #1: ffff88803da0a1d8 (&type->i_mutex_dir_key#4/1){+.+.}-{3:3}, at: do_unlinkat+0x260/0x940 fs/namei.c:4260
 #2: ffff88803da083f0 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
 #2: ffff88803da083f0 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: vfs_unlink+0xe0/0x5f0 fs/namei.c:4198
2 locks held by kworker/u4:0/25004:
 #0: ffff8880b9a39718 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0xa8/0x140 kernel/sched/core.c:483
 #1: ffff8880b9a27848 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x53d/0x810 kernel/sched/psi.c:891
2 locks held by syz-executor.3/26635:
 #0: ffff88807ace7128 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline]
 #0: ffff88807ace7128 (&mm->mmap_lock){++++}-{3:3}, at: do_user_addr_fault arch/x86/mm/fault.c:1338 [inline]
 #0: ffff88807ace7128 (&mm->mmap_lock){++++}-{3:3}, at: handle_page_fault arch/x86/mm/fault.c:1485 [inline]
 #0: ffff88807ace7128 (&mm->mmap_lock){++++}-{3:3}, at: exc_page_fault+0x181/0x740 arch/x86/mm/fault.c:1541
 #1: ffff888012062cb8 (mapping.invalidate_lock#2){++++}-{3:3}, at: filemap_invalidate_lock_shared include/linux/fs.h:842 [inline]
 #1: ffff888012062cb8 (mapping.invalidate_lock#2){++++}-{3:3}, at: filemap_fault+0x708/0x1470 mm/filemap.c:3072
1 lock held by syz-executor.3/26636:
1 lock held by syz-executor.3/26640:
 #0: ffff888012062cb8 (mapping.invalidate_lock#2){++++}-{3:3}, at: filemap_invalidate_lock include/linux/fs.h:832 [inline]
 #0: ffff888012062cb8 (mapping.invalidate_lock#2){++++}-{3:3}, at: blkdev_fallocate+0x257/0x3d0 block/fops.c:600
1 lock held by syz-executor.3/26725:
 #0: ffff888012062cb8 (mapping.invalidate_lock#2){++++}-{3:3}, at: filemap_invalidate_lock_shared include/linux/fs.h:842 [inline]
 #0: ffff888012062cb8 (mapping.invalidate_lock#2){++++}-{3:3}, at: page_cache_ra_unbounded+0x1a6/0x930 mm/readahead.c:195
1 lock held by syz-executor.3/26726:
 #0: ffff888012062cb8 (mapping.invalidate_lock#2){++++}-{3:3}, at: filemap_invalidate_lock include/linux/fs.h:832 [inline]
 #0: ffff888012062cb8 (mapping.invalidate_lock#2){++++}-{3:3}, at: blkdev_fallocate+0x257/0x3d0 block/fops.c:600
4 locks held by syz-executor.3/26727:
 #0: ffff888022bd79f0 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2cb/0x380 fs/file.c:1088
 #1: ffff8880249f8460 (sb_writers#5){.+.+}-{0:0}, at: vfs_write+0x29a/0xe50 fs/read_write.c:590
 #2: ffff88803da083f0 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
 #2: ffff88803da083f0 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: ext4_buffered_write_iter+0xa0/0x360 fs/ext4/file.c:262
 #3: ffff888012062cb8 (mapping.invalidate_lock#2){++++}-{3:3}, at: filemap_invalidate_lock_shared include/linux/fs.h:842 [inline]
 #3: ffff888012062cb8 (mapping.invalidate_lock#2){++++}-{3:3}, at: page_cache_ra_unbounded+0x1a6/0x930 mm/readahead.c:195

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

NMI backtrace for cpu 0
CPU: 0 PID: 27 Comm: khungtaskd Not tainted 5.15.127-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb 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:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 19525 Comm: kworker/u4:2 Not tainted 5.15.127-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
Workqueue:  0x0 (phy9)
RIP: 0010:pwq_dec_nr_in_flight+0x2f/0x460
Code: 41 55 41 54 53 50 48 89 f3 49 89 ff e8 4a 9c 2c 00 41 89 dc 41 c1 ec 05 41 83 e4 0f 48 89 de 48 83 e6 02 31 ff e8 11 a0 2c 00 <49> be 00 00 00 00 00 fc ff df 48 83 e3 02 4c 89 3c 24 0f 85 84 00
RSP: 0018:ffffc90002e1fc20 EFLAGS: 00000093
RAX: 0000000000000000 RBX: ffff88807819d005 RCX: ffff88807d9c5940
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90002e1fdc8 R08: ffffffff815377af R09: ffff88801b1b7d10
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffff88801b1b7d28 R14: ffff888011c79a70 R15: ffff88807819d000
FS:  0000000000000000(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c014054840 CR3: 0000000018450000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 process_one_work+0xb87/0x10c0 kernel/workqueue.c:2353
 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
 kthread+0x3f6/0x4f0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/08/21 22:46 linux-5.15.y f6f7927ac664 6b415825 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in filemap_fault
* Struck through repros no longer work on HEAD.