[xfs?] INFO: task hung in unregister_shrinker

8 views
Skip to first unread message

syzbot

unread,
Jan 15, 2023, 3:29:37 AM1/15/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=119a9b86480000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=ce4807a1e678270b3ff9
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=137fe716480000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17dd87ba480000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/98c0bdb4abb3/disk-3f8a27f9.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ea228ff02669/vmlinux-3f8a27f9.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/2d4fd3d46457/mount_0.gz

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

syz-executor213 (13154): drop_caches: 2
XFS (loop0): Quotacheck needed: Please wait.
XFS (loop3): Quotacheck: Done.
syz-executor213 (13153): drop_caches: 2
syz-executor213 (13154): drop_caches: 2
INFO: task syz-executor213:8122 blocked for more than 140 seconds.
Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor213 D27192 8122 8116 0x00000000
Call Trace:
context_switch kernel/sched/core.c:2828 [inline]
__schedule+0x887/0x2040 kernel/sched/core.c:3517
schedule+0x8d/0x1b0 kernel/sched/core.c:3561
__rwsem_down_write_failed_common kernel/locking/rwsem-xadd.c:589 [inline]
rwsem_down_write_failed+0x3aa/0x760 kernel/locking/rwsem-xadd.c:618
call_rwsem_down_write_failed+0x13/0x20 arch/x86/lib/rwsem.S:117
__down_write arch/x86/include/asm/rwsem.h:142 [inline]
down_write+0x4f/0x90 kernel/locking/rwsem.c:72
unregister_memcg_shrinker mm/vmscan.c:221 [inline]
unregister_shrinker+0x24d/0x300 mm/vmscan.c:436
deactivate_locked_super+0x6c/0x160 fs/super.c:328
deactivate_super+0x174/0x1a0 fs/super.c:360
cleanup_mnt+0x1a8/0x290 fs/namespace.c:1098
task_work_run+0x148/0x1c0 kernel/task_work.c:113
tracehook_notify_resume include/linux/tracehook.h:193 [inline]
exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167
prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f03a93ddf27
Code: Bad RIP value.
RSP: 002b:00007fff1f47f048 EFLAGS: 00000206 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f03a93ddf27
RDX: 00007fff1f47f10a RSI: 000000000000000a RDI: 00007fff1f47f100
RBP: 00007fff1f47f100 R08: 00000000ffffffff R09: 00007fff1f47eee0
R10: 0000555555d89683 R11: 0000000000000206 R12: 00007fff1f480170
R13: 0000555555d895f0 R14: 00007fff1f47f070 R15: 0000000000000037
INFO: task syz-executor213:13153 blocked for more than 140 seconds.
Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor213 D23096 13153 8120 0x80000004
Call Trace:
context_switch kernel/sched/core.c:2828 [inline]
__schedule+0x887/0x2040 kernel/sched/core.c:3517
schedule+0x8d/0x1b0 kernel/sched/core.c:3561
schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:3619
__mutex_lock_common kernel/locking/mutex.c:1016 [inline]
__mutex_lock+0x5f0/0x1190 kernel/locking/mutex.c:1078
xfs_qm_dqfree_one+0x6f/0x1a0 fs/xfs/xfs_qm.c:1611
xfs_qm_shrink_scan fs/xfs/xfs_qm.c:527 [inline]
xfs_qm_shrink_scan+0x293/0x380 fs/xfs/xfs_qm.c:499
do_shrink_slab+0x397/0xa40 mm/vmscan.c:537
shrink_slab+0x16f/0x550 mm/vmscan.c:693
drop_slab_node+0x33/0x70 mm/vmscan.c:724
drop_slab+0x4b/0x90 mm/vmscan.c:734
drop_caches_sysctl_handler+0xf6/0x110 fs/drop_caches.c:65
proc_sys_call_handler.isra.0+0x1f3/0x3b0 fs/proc/proc_sysctl.c:597
__vfs_write+0xf7/0x770 fs/read_write.c:485
__kernel_write+0x109/0x370 fs/read_write.c:506
write_pipe_buf+0x153/0x1f0 fs/splice.c:798
splice_from_pipe_feed fs/splice.c:503 [inline]
__splice_from_pipe+0x389/0x800 fs/splice.c:627
splice_from_pipe fs/splice.c:662 [inline]
default_file_splice_write+0xd8/0x180 fs/splice.c:810
do_splice_from fs/splice.c:852 [inline]
direct_splice_actor+0x115/0x160 fs/splice.c:1025
splice_direct_to_actor+0x33f/0x8d0 fs/splice.c:980
do_splice_direct+0x1a7/0x270 fs/splice.c:1068
do_sendfile+0x550/0xc30 fs/read_write.c:1447
__do_sys_sendfile64 fs/read_write.c:1502 [inline]
__se_sys_sendfile64+0xc4/0x160 fs/read_write.c:1494
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f03a93dcb89
Code: Bad RIP value.
RSP: 002b:00007fff1f480138 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f03a942cbce RCX: 00007f03a93dcb89
RDX: 0000000020002080 RSI: 0000000000000005 RDI: 0000000000000006
RBP: 0000000020000040 R08: 00007fff1f480160 R09: 00007fff1f480160
R10: 0000000000000870 R11: 0000000000000246 R12: 00007fff1f48015c
R13: 00007fff1f480190 R14: 00007fff1f480170 R15: 0000000000000035
INFO: task syz-executor213:13158 blocked for more than 140 seconds.
Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor213 D23096 13158 8117 0x00000004
Call Trace:
context_switch kernel/sched/core.c:2828 [inline]
__schedule+0x887/0x2040 kernel/sched/core.c:3517
schedule+0x8d/0x1b0 kernel/sched/core.c:3561
schedule_timeout+0x92d/0xfe0 kernel/time/timer.c:1794
do_wait_for_common kernel/sched/completion.c:83 [inline]
__wait_for_common kernel/sched/completion.c:104 [inline]
wait_for_common+0x29c/0x470 kernel/sched/completion.c:115
xfs_buf_iowait+0x74/0x5d0 fs/xfs/xfs_buf.c:1483
xfs_buf_delwri_pushbuf+0x25e/0x5b0 fs/xfs/xfs_buf.c:2129
xfs_qm_flush_one+0x242/0x310 fs/xfs/xfs_qm.c:1247
xfs_qm_dquot_walk.isra.0+0x1a2/0x3a0 fs/xfs/xfs_qm.c:87
xfs_qm_quotacheck+0x6ba/0x880 fs/xfs/xfs_qm.c:1339
xfs_qm_mount_quotas+0x124/0x680 fs/xfs/xfs_qm.c:1445
xfs_mountfs+0x17e2/0x1bf0 fs/xfs/xfs_mount.c:1001
xfs_fs_fill_super+0xd0e/0x1540 fs/xfs/xfs_super.c:1720
mount_bdev+0x2fc/0x3b0 fs/super.c:1158
mount_fs+0xa3/0x310 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2492 [inline]
do_mount+0x115c/0x2f50 fs/namespace.c:2822
ksys_mount+0xcf/0x130 fs/namespace.c:3038
__do_sys_mount fs/namespace.c:3052 [inline]
__se_sys_mount fs/namespace.c:3049 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3049
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f03a93ddfea
Code: Bad RIP value.
RSP: 002b:00007fff1f47ffa8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00646975756f6e2c RCX: 00007f03a93ddfea
RDX: 000000002000bb00 RSI: 0000000020000040 RDI: 00007fff1f47ffc0
RBP: 00007fff1f47ffc0 R08: 00007fff1f480000 R09: 000000000000bae7
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000004
R13: 0000555555d882c0 R14: 0000000000000000 R15: 00007fff1f480000
INFO: task syz-executor213:13173 blocked for more than 140 seconds.
Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor213 D28304 13173 8119 0x00000004
Call Trace:
context_switch kernel/sched/core.c:2828 [inline]
__schedule+0x887/0x2040 kernel/sched/core.c:3517
schedule+0x8d/0x1b0 kernel/sched/core.c:3561
__rwsem_down_write_failed_common kernel/locking/rwsem-xadd.c:589 [inline]
rwsem_down_write_failed+0x3aa/0x760 kernel/locking/rwsem-xadd.c:618
call_rwsem_down_write_failed+0x13/0x20 arch/x86/lib/rwsem.S:117
__down_write arch/x86/include/asm/rwsem.h:142 [inline]
down_write+0x4f/0x90 kernel/locking/rwsem.c:72
prealloc_memcg_shrinker mm/vmscan.c:194 [inline]
prealloc_shrinker+0x176/0x340 mm/vmscan.c:382
alloc_super fs/super.c:265 [inline]
sget_userns+0x7b4/0xcd0 fs/super.c:519
sget+0x102/0x140 fs/super.c:570
mount_bdev+0xf8/0x3b0 fs/super.c:1131
mount_fs+0xa3/0x310 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2492 [inline]
do_mount+0x115c/0x2f50 fs/namespace.c:2822
ksys_mount+0xcf/0x130 fs/namespace.c:3038
__do_sys_mount fs/namespace.c:3052 [inline]
__se_sys_mount fs/namespace.c:3049 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3049
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f03a93ddfea
Code: Bad RIP value.
RSP: 002b:00007fff1f47ffa8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00646975756f6e2c RCX: 00007f03a93ddfea
RDX: 000000002000bb00 RSI: 0000000020000040 RDI: 00007fff1f47ffc0
RBP: 00007fff1f47ffc0 R08: 00007fff1f480000 R09: 000000000000bae7
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000004
R13: 0000555555d882c0 R14: 0000000000000000 R15: 00007fff1f480000
INFO: task syz-executor213:13240 blocked for more than 140 seconds.
Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor213 D28304 13240 8121 0x00000004
Call Trace:
context_switch kernel/sched/core.c:2828 [inline]
__schedule+0x887/0x2040 kernel/sched/core.c:3517
schedule+0x8d/0x1b0 kernel/sched/core.c:3561
__rwsem_down_write_failed_common kernel/locking/rwsem-xadd.c:589 [inline]
rwsem_down_write_failed+0x3aa/0x760 kernel/locking/rwsem-xadd.c:618
call_rwsem_down_write_failed+0x13/0x20 arch/x86/lib/rwsem.S:117
__down_write arch/x86/include/asm/rwsem.h:142 [inline]
down_write+0x4f/0x90 kernel/locking/rwsem.c:72
prealloc_memcg_shrinker mm/vmscan.c:194 [inline]
prealloc_shrinker+0x176/0x340 mm/vmscan.c:382
alloc_super fs/super.c:265 [inline]
sget_userns+0x7b4/0xcd0 fs/super.c:519
sget+0x102/0x140 fs/super.c:570
mount_bdev+0xf8/0x3b0 fs/super.c:1131
mount_fs+0xa3/0x310 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2492 [inline]
do_mount+0x115c/0x2f50 fs/namespace.c:2822
ksys_mount+0xcf/0x130 fs/namespace.c:3038
__do_sys_mount fs/namespace.c:3052 [inline]
__se_sys_mount fs/namespace.c:3049 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3049
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f03a93ddfea
Code: Bad RIP value.
RSP: 002b:00007fff1f47ffa8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00646975756f6e2c RCX: 00007f03a93ddfea
RDX: 000000002000bb00 RSI: 0000000020000040 RDI: 00007fff1f47ffc0
RBP: 00007fff1f47ffc0 R08: 00007fff1f480000 R09: 000000000000bae7
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000004
R13: 0000555555d882c0 R14: 0000000000000000 R15: 00007fff1f480000
INFO: task syz-executor213:13242 blocked for more than 140 seconds.
Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor213 D28304 13242 8118 0x00000004
Call Trace:
context_switch kernel/sched/core.c:2828 [inline]
__schedule+0x887/0x2040 kernel/sched/core.c:3517
schedule+0x8d/0x1b0 kernel/sched/core.c:3561
__rwsem_down_write_failed_common kernel/locking/rwsem-xadd.c:589 [inline]
rwsem_down_write_failed+0x3aa/0x760 kernel/locking/rwsem-xadd.c:618
call_rwsem_down_write_failed+0x13/0x20 arch/x86/lib/rwsem.S:117
__down_write arch/x86/include/asm/rwsem.h:142 [inline]
down_write+0x4f/0x90 kernel/locking/rwsem.c:72
prealloc_memcg_shrinker mm/vmscan.c:194 [inline]
prealloc_shrinker+0x176/0x340 mm/vmscan.c:382
alloc_super fs/super.c:265 [inline]
sget_userns+0x7b4/0xcd0 fs/super.c:519
sget+0x102/0x140 fs/super.c:570
mount_bdev+0xf8/0x3b0 fs/super.c:1131
mount_fs+0xa3/0x310 fs/super.c:1261
vfs_kern_mount.part.0+0x68/0x470 fs/namespace.c:961
vfs_kern_mount fs/namespace.c:951 [inline]
do_new_mount fs/namespace.c:2492 [inline]
do_mount+0x115c/0x2f50 fs/namespace.c:2822
ksys_mount+0xcf/0x130 fs/namespace.c:3038
__do_sys_mount fs/namespace.c:3052 [inline]
__se_sys_mount fs/namespace.c:3049 [inline]
__x64_sys_mount+0xba/0x150 fs/namespace.c:3049
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f03a93ddfea
Code: Bad RIP value.
RSP: 002b:00007fff1f47ffa8 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00646975756f6e2c RCX: 00007f03a93ddfea
RDX: 000000002000bb00 RSI: 0000000020000040 RDI: 00007fff1f47ffc0
RBP: 00007fff1f47ffc0 R08: 00007fff1f480000 R09: 000000000000bae7
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000004
R13: 0000555555d882c0 R14: 0000000000000000 R15: 00007fff1f480000

Showing all locks held in the system:
1 lock held by khungtaskd/1567:
#0: 000000001bc8e02e (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4441
2 locks held by syz-executor213/8122:
#0: 0000000057f86f3a (&type->s_umount_key#47){++++}, at: deactivate_super+0x16c/0x1a0 fs/super.c:359
#1: 00000000aac90a1a (shrinker_rwsem){++++}, at: unregister_memcg_shrinker mm/vmscan.c:221 [inline]
#1: 00000000aac90a1a (shrinker_rwsem){++++}, at: unregister_shrinker+0x24d/0x300 mm/vmscan.c:436
3 locks held by syz-executor213/13153:
#0: 0000000066fce42d (sb_writers#4){.+.+}, at: file_start_write include/linux/fs.h:2779 [inline]
#0: 0000000066fce42d (sb_writers#4){.+.+}, at: do_sendfile+0x97d/0xc30 fs/read_write.c:1446
#1: 00000000aac90a1a (shrinker_rwsem){++++}, at: shrink_slab+0xc7/0x550 mm/vmscan.c:683
#2: 00000000a9475191 (&qinf->qi_tree_lock){+.+.}, at: xfs_qm_dqfree_one+0x6f/0x1a0 fs/xfs/xfs_qm.c:1611
3 locks held by syz-executor213/13158:
#0: 000000000e6b0d4d (&type->s_umount_key#46/1){+.+.}, at: alloc_super fs/super.c:226 [inline]
#0: 000000000e6b0d4d (&type->s_umount_key#46/1){+.+.}, at: sget_userns+0x20b/0xcd0 fs/super.c:519
#1: 00000000a9475191 (&qinf->qi_tree_lock){+.+.}, at: xfs_qm_dquot_walk.isra.0+0xfb/0x3a0 fs/xfs/xfs_qm.c:74
#2: 00000000c05d19b0 (&dqp->q_qlock){+.+.}, at: xfs_dqlock fs/xfs/xfs_dquot.h:94 [inline]
#2: 00000000c05d19b0 (&dqp->q_qlock){+.+.}, at: xfs_qm_flush_one+0x9d/0x310 fs/xfs/xfs_qm.c:1223
3 locks held by syz-executor213/13173:
#0: 000000007ea79c06 (&bdev->bd_fsfreeze_mutex){+.+.}, at: mount_bdev+0x90/0x3b0 fs/super.c:1125
#1: 000000003358871f (&type->s_umount_key#46/1){+.+.}, at: alloc_super fs/super.c:226 [inline]
#1: 000000003358871f (&type->s_umount_key#46/1){+.+.}, at: sget_userns+0x20b/0xcd0 fs/super.c:519
#2: 00000000aac90a1a (shrinker_rwsem){++++}, at: prealloc_memcg_shrinker mm/vmscan.c:194 [inline]
#2: 00000000aac90a1a (shrinker_rwsem){++++}, at: prealloc_shrinker+0x176/0x340 mm/vmscan.c:382
3 locks held by syz-executor213/13240:
#0: 000000002d541527 (&bdev->bd_fsfreeze_mutex){+.+.}, at: mount_bdev+0x90/0x3b0 fs/super.c:1125
#1: 000000003bace3ad (&type->s_umount_key#46/1){+.+.}, at: alloc_super fs/super.c:226 [inline]
#1: 000000003bace3ad (&type->s_umount_key#46/1){+.+.}, at: sget_userns+0x20b/0xcd0 fs/super.c:519
#2: 00000000aac90a1a (shrinker_rwsem){++++}, at: prealloc_memcg_shrinker mm/vmscan.c:194 [inline]
#2: 00000000aac90a1a (shrinker_rwsem){++++}, at: prealloc_shrinker+0x176/0x340 mm/vmscan.c:382
3 locks held by syz-executor213/13242:
#0: 000000005f3bf656 (&bdev->bd_fsfreeze_mutex){+.+.}, at: mount_bdev+0x90/0x3b0 fs/super.c:1125
#1: 000000001d456d61 (&type->s_umount_key#46/1){+.+.}, at: alloc_super fs/super.c:226 [inline]
#1: 000000001d456d61 (&type->s_umount_key#46/1){+.+.}, at: sget_userns+0x20b/0xcd0 fs/super.c:519
#2: 00000000aac90a1a (shrinker_rwsem){++++}, at: prealloc_memcg_shrinker mm/vmscan.c:194 [inline]
#2: 00000000aac90a1a (shrinker_rwsem){++++}, at: prealloc_shrinker+0x176/0x340 mm/vmscan.c:382

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

NMI backtrace for cpu 0
CPU: 0 PID: 1567 Comm: khungtaskd Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
nmi_cpu_backtrace.cold+0x63/0xa2 lib/nmi_backtrace.c:101
nmi_trigger_cpumask_backtrace+0x1a6/0x1f0 lib/nmi_backtrace.c:62
trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:203 [inline]
watchdog+0x991/0xe60 kernel/hung_task.c:287
kthread+0x33f/0x460 kernel/kthread.c:259
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1 skipped: idling at native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:60


---
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.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches
Reply all
Reply to author
Forward
0 new messages