[v6.1] INFO: task hung in lock_extent

0 views
Skip to first unread message

syzbot

unread,
May 8, 2023, 1:01:57 PM5/8/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: ca48fc16c493 Linux 6.1.27
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14cb176a280000
kernel config: https://syzkaller.appspot.com/x/.config?x=aea4bb7802570997
dashboard link: https://syzkaller.appspot.com/bug?extid=f8217aae382555004877
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10efe5f4280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11513424280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/ec11c1903c52/disk-ca48fc16.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/8ce41c1ad391/vmlinux-ca48fc16.xz
kernel image: https://storage.googleapis.com/syzbot-assets/affba5631cad/Image-ca48fc16.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/2b34293650ce/mount_0.gz

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

INFO: task syz-executor164:4254 blocked for more than 143 seconds.
Not tainted 6.1.27-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor164 state:D stack:0 pid:4254 ppid:4253 flags:0x00000009
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
wait_on_state fs/btrfs/extent-io-tree.c:709 [inline]
wait_extent_bit+0x3e8/0x530 fs/btrfs/extent-io-tree.c:742
lock_extent+0x160/0x1fc fs/btrfs/extent-io-tree.c:1657
btrfs_page_mkwrite+0x614/0xcac fs/btrfs/inode.c:8454
do_page_mkwrite+0x144/0x37c mm/memory.c:2973
wp_page_shared+0x148/0x550 mm/memory.c:3319
do_wp_page+0xcbc/0xf44 mm/memory.c:3469
handle_pte_fault mm/memory.c:4982 [inline]
__handle_mm_fault mm/memory.c:5106 [inline]
handle_mm_fault+0x1ae8/0x3e9c mm/memory.c:5227
__do_page_fault arch/arm64/mm/fault.c:512 [inline]
do_page_fault+0x634/0xac4 arch/arm64/mm/fault.c:612
do_mem_abort+0x74/0x200 arch/arm64/mm/fault.c:831
el1_abort+0x3c/0x5c arch/arm64/kernel/entry-common.c:367
el1h_64_sync_handler+0x60/0xac arch/arm64/kernel/entry-common.c:427
el1h_64_sync+0x64/0x68 arch/arm64/kernel/entry.S:576
__arch_copy_to_user+0x88/0x234 arch/arm64/lib/copy_template.S:90
emit_last_fiemap_cache fs/btrfs/extent_io.c:3598 [inline]
extent_fiemap+0x1718/0x1b1c fs/btrfs/extent_io.c:4129
btrfs_fiemap+0x154/0x1c0 fs/btrfs/inode.c:8126
ioctl_fiemap fs/ioctl.c:219 [inline]
do_vfs_ioctl+0x194c/0x26f8 fs/ioctl.c:810
__do_sys_ioctl fs/ioctl.c:868 [inline]
__se_sys_ioctl fs/ioctl.c:856 [inline]
__arm64_sys_ioctl+0xe4/0x1c8 fs/ioctl.c:856
__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: ffff800015764d30 (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: ffff800015765530 (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: ffff800015764b60 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0xc/0x44 include/linux/rcupdate.h:305
2 locks held by getty/3983:
#0: ffff0000d5e44098 (&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
4 locks held by syz-executor164/4254:
#0: ffff0000e1839920 (&sb->s_type->i_mutex_key#17){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:766 [inline]
#0: ffff0000e1839920 (&sb->s_type->i_mutex_key#17){++++}-{3:3}, at: btrfs_inode_lock+0x68/0xe0 fs/btrfs/inode.c:147
#1: ffff0000d6dc1f48 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline]
#1: ffff0000d6dc1f48 (&mm->mmap_lock){++++}-{3:3}, at: do_page_fault+0x2dc/0xac4 arch/arm64/mm/fault.c:593
#2: ffff0000dcd9e558 (sb_pagefaults){.+.+}-{0:0}, at: do_page_mkwrite+0x144/0x37c mm/memory.c:2973
#3: ffff0000e18397a8 (&ei->i_mmap_lock){.+.+}-{3:3}, at: btrfs_page_mkwrite+0x4bc/0xcac fs/btrfs/inode.c:8443

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



---
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 syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to change 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,
Jan 19, 2024, 6:00:08 PMJan 19
to syzkaller...@googlegroups.com
syzbot suspects this issue could be fixed by backporting the following commit:

commit a1912f712188291f9d7d434fba155461f1ebef66
git tree: upstream
Author: Josef Bacik <jo...@toxicpanda.com>
Date: Wed Nov 22 17:17:55 2023 +0000

btrfs: remove code for inode_cache and recovery mount options

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=13ed294fe80000
kernel config: https://syzkaller.appspot.com/x/.config?x=662f56cd322cfd0e
dashboard link: https://syzkaller.appspot.com/bug?extid=f8217aae382555004877
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13daf143280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12b4c88b280000


Please keep in mind that other backports might be required as well.

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages