[v5.15] INFO: task hung in xfs_qm_dqfree_one

5 views
Skip to first unread message

syzbot

unread,
May 8, 2023, 12:53:55 AM5/8/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 8a7f2a5c5aa1 Linux 5.15.110
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13ea26a8280000
kernel config: https://syzkaller.appspot.com/x/.config?x=7e93d602da27af41
dashboard link: https://syzkaller.appspot.com/bug?extid=7fd5b26e5c78f7503289
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=17260bf2280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=105b39d4280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/16bea75b636d/disk-8a7f2a5c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/3b169e33dcf2/vmlinux-8a7f2a5c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/190d08a00950/Image-8a7f2a5c.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/abdd9da82659/mount_0.gz

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

INFO: task syz-executor315:9028 blocked for more than 143 seconds.
Not tainted 5.15.110-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor315 state:D stack: 0 pid: 9028 ppid: 4050 flags:0x00000009
Call trace:
__switch_to+0x308/0x5e8 arch/arm64/kernel/process.c:518
context_switch kernel/sched/core.c:5026 [inline]
__schedule+0xf10/0x1e38 kernel/sched/core.c:6372
schedule+0x11c/0x1c8 kernel/sched/core.c:6455
schedule_preempt_disabled+0x18/0x2c kernel/sched/core.c:6514
__mutex_lock_common+0xba0/0x2154 kernel/locking/mutex.c:669
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_nested+0xa4/0xf8 kernel/locking/mutex.c:743
xfs_qm_dqfree_one+0x74/0x1b0 fs/xfs/xfs_qm.c:1607
xfs_qm_shrink_scan+0x280/0x354 fs/xfs/xfs_qm.c:523
do_shrink_slab+0x4b4/0x10b0 mm/vmscan.c:758
shrink_slab+0x1f8/0x894 mm/vmscan.c:918
drop_slab_node+0xcc/0x170 mm/vmscan.c:953
drop_slab+0x98/0x140 mm/vmscan.c:963
drop_caches_sysctl_handler+0x178/0x394 fs/drop_caches.c:66
proc_sys_call_handler+0x4cc/0x7cc fs/proc/proc_sysctl.c:587
proc_sys_write+0x2c/0x3c fs/proc/proc_sysctl.c:613
do_iter_readv_writev+0x420/0x5f8
do_iter_write+0x1b8/0x664 fs/read_write.c:855
vfs_iter_write+0x88/0xac fs/read_write.c:896
iter_file_splice_write+0x618/0xc48 fs/splice.c:689
do_splice_from fs/splice.c:767 [inline]
direct_splice_actor+0xe4/0x1c0 fs/splice.c:936
splice_direct_to_actor+0x408/0x9a0 fs/splice.c:891
do_splice_direct+0x1f4/0x334 fs/splice.c:979
do_sendfile+0x4bc/0xc70 fs/read_write.c:1249
__do_sys_sendfile64 fs/read_write.c:1311 [inline]
__se_sys_sendfile64 fs/read_write.c:1303 [inline]
__arm64_sys_sendfile64+0x264/0x408 fs/read_write.c:1303
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
INFO: task syz-executor315:9029 blocked for more than 143 seconds.
Not tainted 5.15.110-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor315 state:D stack: 0 pid: 9029 ppid: 4049 flags:0x00000009
Call trace:
__switch_to+0x308/0x5e8 arch/arm64/kernel/process.c:518
context_switch kernel/sched/core.c:5026 [inline]
__schedule+0xf10/0x1e38 kernel/sched/core.c:6372
schedule+0x11c/0x1c8 kernel/sched/core.c:6455
schedule_timeout+0xb8/0x344 kernel/time/timer.c:1860
do_wait_for_common+0x214/0x388 kernel/sched/completion.c:85
__wait_for_common kernel/sched/completion.c:106 [inline]
wait_for_common kernel/sched/completion.c:117 [inline]
wait_for_completion+0x4c/0x64 kernel/sched/completion.c:138
xfs_buf_iowait+0x16c/0x704 fs/xfs/xfs_buf.c:1573
xfs_buf_delwri_pushbuf+0x330/0x5e4 fs/xfs/xfs_buf.c:2251
xfs_qm_flush_one+0x1fc/0x2cc fs/xfs/xfs_qm.c:1249
xfs_qm_dquot_walk+0x1f0/0x424 fs/xfs/xfs_qm.c:86
xfs_qm_quotacheck+0x288/0x56c fs/xfs/xfs_qm.c:1335
xfs_qm_mount_quotas+0x2ac/0x578 fs/xfs/xfs_qm.c:1441
xfs_mountfs+0x11e4/0x1778 fs/xfs/xfs_mount.c:904
xfs_fs_fill_super+0xd64/0xf60 fs/xfs/xfs_super.c:1658
get_tree_bdev+0x360/0x54c fs/super.c:1303
xfs_fs_get_tree+0x28/0x38 fs/xfs/xfs_super.c:1705
vfs_get_tree+0x90/0x274 fs/super.c:1508
do_new_mount+0x25c/0x8c8 fs/namespace.c:2994
path_mount+0x590/0x104c fs/namespace.c:3324
do_mount fs/namespace.c:3337 [inline]
__do_sys_mount fs/namespace.c:3545 [inline]
__se_sys_mount fs/namespace.c:3522 [inline]
__arm64_sys_mount+0x510/0x5e0 fs/namespace.c:3522
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
INFO: task syz-executor315:9030 blocked for more than 143 seconds.
Not tainted 5.15.110-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor315 state:D stack: 0 pid: 9030 ppid: 4048 flags:0x00000009
Call trace:
__switch_to+0x308/0x5e8 arch/arm64/kernel/process.c:518
context_switch kernel/sched/core.c:5026 [inline]
__schedule+0xf10/0x1e38 kernel/sched/core.c:6372
schedule+0x11c/0x1c8 kernel/sched/core.c:6455
rwsem_down_write_slowpath+0xca8/0x1340 kernel/locking/rwsem.c:1157
__down_write_common kernel/locking/rwsem.c:1284 [inline]
__down_write kernel/locking/rwsem.c:1293 [inline]
down_write+0x25c/0x260 kernel/locking/rwsem.c:1542
register_shrinker_prepared mm/vmscan.c:653 [inline]
register_shrinker+0x5c/0x144 mm/vmscan.c:665
xfs_inodegc_register_shrinker+0xbc/0x100 fs/xfs/xfs_icache.c:2211
xfs_mountfs+0x7a8/0x1778 fs/xfs/xfs_mount.c:755
xfs_fs_fill_super+0xd64/0xf60 fs/xfs/xfs_super.c:1658
get_tree_bdev+0x360/0x54c fs/super.c:1303
xfs_fs_get_tree+0x28/0x38 fs/xfs/xfs_super.c:1705
vfs_get_tree+0x90/0x274 fs/super.c:1508
do_new_mount+0x25c/0x8c8 fs/namespace.c:2994
path_mount+0x590/0x104c fs/namespace.c:3324
do_mount fs/namespace.c:3337 [inline]
__do_sys_mount fs/namespace.c:3545 [inline]
__se_sys_mount fs/namespace.c:3522 [inline]
__arm64_sys_mount+0x510/0x5e0 fs/namespace.c:3522
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
INFO: task syz-executor315:9031 blocked for more than 143 seconds.
Not tainted 5.15.110-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor315 state:D stack: 0 pid: 9031 ppid: 4046 flags:0x00000001
Call trace:
__switch_to+0x308/0x5e8 arch/arm64/kernel/process.c:518
context_switch kernel/sched/core.c:5026 [inline]
__schedule+0xf10/0x1e38 kernel/sched/core.c:6372
schedule+0x11c/0x1c8 kernel/sched/core.c:6455
rwsem_down_write_slowpath+0xca8/0x1340 kernel/locking/rwsem.c:1157
__down_write_common kernel/locking/rwsem.c:1284 [inline]
__down_write kernel/locking/rwsem.c:1293 [inline]
down_write+0x25c/0x260 kernel/locking/rwsem.c:1542
prealloc_memcg_shrinker mm/vmscan.c:359 [inline]
prealloc_shrinker+0xa4/0x75c mm/vmscan.c:620
alloc_super+0x608/0x844 fs/super.c:270
sget_fc+0x1dc/0x538 fs/super.c:541
get_tree_bdev+0x220/0x54c fs/super.c:1273
xfs_fs_get_tree+0x28/0x38 fs/xfs/xfs_super.c:1705
vfs_get_tree+0x90/0x274 fs/super.c:1508
do_new_mount+0x25c/0x8c8 fs/namespace.c:2994
path_mount+0x590/0x104c fs/namespace.c:3324
do_mount fs/namespace.c:3337 [inline]
__do_sys_mount fs/namespace.c:3545 [inline]
__se_sys_mount fs/namespace.c:3522 [inline]
__arm64_sys_mount+0x510/0x5e0 fs/namespace.c:3522
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
INFO: task syz-executor315:9048 blocked for more than 143 seconds.
Not tainted 5.15.110-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor315 state:D stack: 0 pid: 9048 ppid: 4051 flags:0x00000001
Call trace:
__switch_to+0x308/0x5e8 arch/arm64/kernel/process.c:518
context_switch kernel/sched/core.c:5026 [inline]
__schedule+0xf10/0x1e38 kernel/sched/core.c:6372
schedule+0x11c/0x1c8 kernel/sched/core.c:6455
rwsem_down_write_slowpath+0xca8/0x1340 kernel/locking/rwsem.c:1157
__down_write_common kernel/locking/rwsem.c:1284 [inline]
__down_write kernel/locking/rwsem.c:1293 [inline]
down_write+0x25c/0x260 kernel/locking/rwsem.c:1542
prealloc_memcg_shrinker mm/vmscan.c:359 [inline]
prealloc_shrinker+0xa4/0x75c mm/vmscan.c:620
alloc_super+0x608/0x844 fs/super.c:270
sget_fc+0x1dc/0x538 fs/super.c:541
get_tree_bdev+0x220/0x54c fs/super.c:1273
xfs_fs_get_tree+0x28/0x38 fs/xfs/xfs_super.c:1705
vfs_get_tree+0x90/0x274 fs/super.c:1508
do_new_mount+0x25c/0x8c8 fs/namespace.c:2994
path_mount+0x590/0x104c fs/namespace.c:3324
do_mount fs/namespace.c:3337 [inline]
__do_sys_mount fs/namespace.c:3545 [inline]
__se_sys_mount fs/namespace.c:3522 [inline]
__arm64_sys_mount+0x510/0x5e0 fs/namespace.c:3522
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
INFO: task syz-executor315:9054 blocked for more than 143 seconds.
Not tainted 5.15.110-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor315 state:D stack: 0 pid: 9054 ppid: 4047 flags:0x00000001
Call trace:
__switch_to+0x308/0x5e8 arch/arm64/kernel/process.c:518
context_switch kernel/sched/core.c:5026 [inline]
__schedule+0xf10/0x1e38 kernel/sched/core.c:6372
schedule+0x11c/0x1c8 kernel/sched/core.c:6455
rwsem_down_write_slowpath+0xca8/0x1340 kernel/locking/rwsem.c:1157
__down_write_common kernel/locking/rwsem.c:1284 [inline]
__down_write kernel/locking/rwsem.c:1293 [inline]
down_write+0x25c/0x260 kernel/locking/rwsem.c:1542
prealloc_memcg_shrinker mm/vmscan.c:359 [inline]
prealloc_shrinker+0xa4/0x75c mm/vmscan.c:620
alloc_super+0x608/0x844 fs/super.c:270
sget_fc+0x1dc/0x538 fs/super.c:541
get_tree_bdev+0x220/0x54c fs/super.c:1273
xfs_fs_get_tree+0x28/0x38 fs/xfs/xfs_super.c:1705
vfs_get_tree+0x90/0x274 fs/super.c:1508
do_new_mount+0x25c/0x8c8 fs/namespace.c:2994
path_mount+0x590/0x104c fs/namespace.c:3324
do_mount fs/namespace.c:3337 [inline]
__do_sys_mount fs/namespace.c:3545 [inline]
__se_sys_mount fs/namespace.c:3522 [inline]
__arm64_sys_mount+0x510/0x5e0 fs/namespace.c:3522
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:596
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:614
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

Showing all locks held in the system:
1 lock held by khungtaskd/27:
#0: ffff800014aa1960 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0xc/0x44 include/linux/rcupdate.h:268
2 locks held by getty/3725:
#0: ffff0000d2e03098 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x40/0x50 drivers/tty/tty_ldsem.c:340
#1: ffff80001a27e2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x414/0x1200 drivers/tty/n_tty.c:2147
3 locks held by syz-executor315/9028:
#0: ffff0000d4918460 (sb_writers#4){.+.+}-{0:0}, at: do_sendfile+0x4a0/0xc70 fs/read_write.c:1248
#1: ffff800014b32770 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x10c/0x894 mm/vmscan.c:908
#2: ffff0000c9c2a958 (&qinf->qi_tree_lock){+.+.}-{3:3}, at: xfs_qm_dqfree_one+0x74/0x1b0 fs/xfs/xfs_qm.c:1607
3 locks held by syz-executor315/9029:
#0: ffff0000d4c780e0 (&type->s_umount_key#42/1){+.+.}-{3:3}, at: alloc_super+0x1b8/0x844 fs/super.c:229
#1: ffff0000c9c2a958 (&qinf->qi_tree_lock){+.+.}-{3:3}, at: xfs_qm_dquot_walk+0x130/0x424 fs/xfs/xfs_qm.c:73
#2: ffff0000d3a1a668 (&dqp->q_qlock){+.+.}-{3:3}, at: xfs_dqlock fs/xfs/xfs_dquot.h:133 [inline]
#2: ffff0000d3a1a668 (&dqp->q_qlock){+.+.}-{3:3}, at: xfs_qm_flush_one+0xc8/0x2cc fs/xfs/xfs_qm.c:1225
2 locks held by syz-executor315/9030:
#0: ffff0000d51560e0 (&type->s_umount_key#42/1){+.+.}-{3:3}, at: alloc_super+0x1b8/0x844 fs/super.c:229
#1: ffff800014b32770 (shrinker_rwsem){++++}-{3:3}, at: register_shrinker_prepared mm/vmscan.c:653 [inline]
#1: ffff800014b32770 (shrinker_rwsem){++++}-{3:3}, at: register_shrinker+0x5c/0x144 mm/vmscan.c:665
3 locks held by syz-executor315/9031:
#0: ffff0000c058cce0 (&bdev->bd_fsfreeze_mutex){+.+.}-{3:3}, at: get_tree_bdev+0x160/0x54c fs/super.c:1263
#1: ffff0000c9b160e0 (&type->s_umount_key#42/1){+.+.}-{3:3}, at: alloc_super+0x1b8/0x844 fs/super.c:229
#2: ffff800014b32770 (shrinker_rwsem){++++}-{3:3}, at: prealloc_memcg_shrinker mm/vmscan.c:359 [inline]
#2: ffff800014b32770 (shrinker_rwsem){++++}-{3:3}, at: prealloc_shrinker+0xa4/0x75c mm/vmscan.c:620
3 locks held by syz-executor315/9048:
#0: ffff0000c0590660 (&bdev->bd_fsfreeze_mutex){+.+.}-{3:3}, at: get_tree_bdev+0x160/0x54c fs/super.c:1263
#1: ffff0000d5cb20e0 (&type->s_umount_key#42/1){+.+.}-{3:3}, at: alloc_super+0x1b8/0x844 fs/super.c:229
#2: ffff800014b32770 (shrinker_rwsem){++++}-{3:3}, at: prealloc_memcg_shrinker mm/vmscan.c:359 [inline]
#2: ffff800014b32770 (shrinker_rwsem){++++}-{3:3}, at: prealloc_shrinker+0xa4/0x75c mm/vmscan.c:620
3 locks held by syz-executor315/9054:
#0: ffff0000c058d8a0 (&bdev->bd_fsfreeze_mutex){+.+.}-{3:3}, at: get_tree_bdev+0x160/0x54c fs/super.c:1263
#1: ffff0000d0e7e0e0 (&type->s_umount_key#42/1){+.+.}-{3:3}, at: alloc_super+0x1b8/0x844 fs/super.c:229
#2: ffff800014b32770 (shrinker_rwsem){++++}-{3:3}, at: prealloc_memcg_shrinker mm/vmscan.c:359 [inline]
#2: ffff800014b32770 (shrinker_rwsem){++++}-{3:3}, at: prealloc_shrinker+0xa4/0x75c mm/vmscan.c:620

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



---
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
Reply all
Reply to author
Forward
0 new messages