[v5.15] INFO: task hung in filemap_fault

0 views
Skip to first unread message

syzbot

unread,
Aug 21, 2023, 6:48:16 PM8/21/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: f6f7927ac664 Linux 5.15.127
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15db40eba80000
kernel config: https://syzkaller.appspot.com/x/.config?x=ea39ec6ccd2c5d32
dashboard link: https://syzkaller.appspot.com/bug?extid=f9470e370497e373231f
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/e290f46611c7/disk-f6f7927a.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/64ee0ddb7c8c/vmlinux-f6f7927a.xz
kernel image: https://storage.googleapis.com/syzbot-assets/3c32675f93c1/bzImage-f6f7927a.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f9470e...@syzkaller.appspotmail.com

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>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Nov 29, 2023, 5:47:14 PM11/29/23
to syzkaller...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages