syzbot


INFO: task hung in xfs_qm_dqfree_one

Status: upstream: reported on 2023/01/15 04:42
Subsystems: xfs
[Documentation on labels]
Reported-by: syzbot+9e9460e42ec2cd196cc9@syzkaller.appspotmail.com
First crash: 466d, last: 466d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 INFO: task hung in xfs_qm_dqfree_one origin:lts-only C unreliable 16 178d 353d 0/3 upstream: reported C repro on 2023/05/08 04:53

Sample crash report:
syz-executor.1 (27616): drop_caches: 2
ieee802154 phy0 wpan0: encryption failed: -22
ieee802154 phy1 wpan1: encryption failed: -22
ieee802154 phy0 wpan0: encryption failed: -22
ieee802154 phy1 wpan1: encryption failed: -22
INFO: task syz-executor.0:27581 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-executor.0  D26248 27581   8130 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:0x7f1886aa90c9
Code: Bad RIP value.
RSP: 002b:00007f187ebfa168 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f1886bc9050 RCX: 00007f1886aa90c9
RDX: 0000000020002080 RSI: 000000000000000c RDI: 000000000000000d
RBP: 00007f1886b04ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000870 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffd3ef0336f R14: 00007f187ebfa300 R15: 0000000000022000
INFO: task syz-executor.2:27533 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-executor.2  D23096 27533   8147 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:0x7f973c3cc5fa
Code: Bad RIP value.
RSP: 002b:00007f973a93cf88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 000000000000baed RCX: 00007f973c3cc5fa
RDX: 000000002000bb00 RSI: 0000000020000040 RDI: 00007f973a93cfe0
RBP: 00007f973a93d020 R08: 00007f973a93d020 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 000000002000bb00
R13: 0000000020000040 R14: 00007f973a93cfe0 R15: 0000000020000000
INFO: task syz-executor.5:27537 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-executor.5  D24832 27537   8137 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
 register_shrinker_prepared+0x1e/0x180 mm/vmscan.c:408
 register_shrinker+0x31/0x40 mm/vmscan.c:423
 xfs_qm_init_quotainfo+0xa8f/0xd70 fs/xfs/xfs_qm.c:691
 xfs_qm_mount_quotas+0x55/0x680 fs/xfs/xfs_qm.c:1432
 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:0x7fd96e5335fa
Code: Bad RIP value.
RSP: 002b:00007fd96caa3f88 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 000000000000baed RCX: 00007fd96e5335fa
RDX: 000000002000bb00 RSI: 0000000020000040 RDI: 00007fd96caa3fe0
RBP: 00007fd96caa4020 R08: 00007fd96caa4020 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 000000002000bb00
R13: 0000000020000040 R14: 00007fd96caa3fe0 R15: 0000000020000000

Showing all locks held in the system:
1 lock held by khungtaskd/1570:
 #0: 0000000087a76d82 (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4441
1 lock held by in:imklog/7791:
2 locks held by agetty/7802:
 #0: 000000000b69fcca (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: 00000000610e1fd4 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x217/0x1950 drivers/tty/n_tty.c:2154
2 locks held by kworker/u4:3/8895:
 #0: 000000006e11ce4b (&rq->lock){-.-.}, at: idle_balance kernel/sched/fair.c:9702 [inline]
 #0: 000000006e11ce4b (&rq->lock){-.-.}, at: pick_next_task_fair+0x556/0x1570 kernel/sched/fair.c:6841
 #1: 0000000087a76d82 (rcu_read_lock){....}, at: cpu_of kernel/sched/sched.h:923 [inline]
 #1: 0000000087a76d82 (rcu_read_lock){....}, at: __update_idle_core+0x39/0x3e0 kernel/sched/fair.c:6057
3 locks held by syz-executor.0/27581:
 #0: 00000000590de49d (sb_writers#4){.+.+}, at: file_start_write include/linux/fs.h:2779 [inline]
 #0: 00000000590de49d (sb_writers#4){.+.+}, at: do_sendfile+0x97d/0xc30 fs/read_write.c:1446
 #1: 00000000f63bbae4 (shrinker_rwsem){++++}, at: shrink_slab+0xc7/0x550 mm/vmscan.c:683
 #2: 00000000d8c0396b (&qinf->qi_tree_lock){+.+.}, at: xfs_qm_dqfree_one+0x6f/0x1a0 fs/xfs/xfs_qm.c:1611
3 locks held by syz-executor.2/27533:
 #0: 00000000fbdae026 (&type->s_umount_key#79/1){+.+.}, at: alloc_super fs/super.c:226 [inline]
 #0: 00000000fbdae026 (&type->s_umount_key#79/1){+.+.}, at: sget_userns+0x20b/0xcd0 fs/super.c:519
 #1: 00000000d8c0396b (&qinf->qi_tree_lock){+.+.}, at: xfs_qm_dquot_walk.isra.0+0xfb/0x3a0 fs/xfs/xfs_qm.c:74
 #2: 00000000a2ab0662 (&dqp->q_qlock){+.+.}, at: xfs_dqlock fs/xfs/xfs_dquot.h:94 [inline]
 #2: 00000000a2ab0662 (&dqp->q_qlock){+.+.}, at: xfs_qm_flush_one+0x9d/0x310 fs/xfs/xfs_qm.c:1223
2 locks held by syz-executor.5/27537:
 #0: 00000000633f5ddc (&type->s_umount_key#79/1){+.+.}, at: alloc_super fs/super.c:226 [inline]
 #0: 00000000633f5ddc (&type->s_umount_key#79/1){+.+.}, at: sget_userns+0x20b/0xcd0 fs/super.c:519
 #1: 00000000f63bbae4 (shrinker_rwsem){++++}, at: register_shrinker_prepared+0x1e/0x180 mm/vmscan.c:408
2 locks held by syz-executor.0/27610:
 #0: 00000000e9ac9edf (&type->s_umount_key#4/1){+.+.}, at: alloc_super fs/super.c:226 [inline]
 #0: 00000000e9ac9edf (&type->s_umount_key#4/1){+.+.}, at: sget_userns+0x20b/0xcd0 fs/super.c:519
 #1: 00000000f63bbae4 (shrinker_rwsem){++++}, at: prealloc_memcg_shrinker mm/vmscan.c:194 [inline]
 #1: 00000000f63bbae4 (shrinker_rwsem){++++}, at: prealloc_shrinker+0x176/0x340 mm/vmscan.c:382
2 locks held by syz-executor.2/27619:
 #0: 0000000006976a27 (&type->s_umount_key#4/1){+.+.}, at: alloc_super fs/super.c:226 [inline]
 #0: 0000000006976a27 (&type->s_umount_key#4/1){+.+.}, at: sget_userns+0x20b/0xcd0 fs/super.c:519
 #1: 00000000f63bbae4 (shrinker_rwsem){++++}, at: prealloc_memcg_shrinker mm/vmscan.c:194 [inline]
 #1: 00000000f63bbae4 (shrinker_rwsem){++++}, at: prealloc_shrinker+0x176/0x340 mm/vmscan.c:382
2 locks held by syz-executor.5/27620:
 #0: 0000000058a9df26 (&type->s_umount_key#4/1){+.+.}, at: alloc_super fs/super.c:226 [inline]
 #0: 0000000058a9df26 (&type->s_umount_key#4/1){+.+.}, at: sget_userns+0x20b/0xcd0 fs/super.c:519
 #1: 00000000f63bbae4 (shrinker_rwsem){++++}, at: prealloc_memcg_shrinker mm/vmscan.c:194 [inline]
 #1: 00000000f63bbae4 (shrinker_rwsem){++++}, at: prealloc_shrinker+0x176/0x340 mm/vmscan.c:382

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

NMI backtrace for cpu 0
CPU: 0 PID: 1570 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
CPU: 1 PID: 10 Comm: rcu_preempt Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:__lock_release kernel/locking/lockdep.c:3670 [inline]
RIP: 0010:lock_release+0x22d/0x8b0 kernel/locking/lockdep.c:3927
Code: df 48 89 da 48 c1 ea 03 0f b6 14 02 48 89 d8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 c6 05 00 00 44 89 f8 0b 05 43 eb d8 0b <0f> 84 69 04 00 00 48 8d 4c 24 38 44 89 fa 48 89 ee 4c 89 f7 e8 ba
RSP: 0018:ffff8880b5a67ad8 EFLAGS: 00000002
RAX: 0000000000000001 RBX: ffffffff8d243760 RCX: 1ffffffff148be2c
RDX: 0000000000000004 RSI: 0000000000000002 RDI: ffff8880b5a4eb04
RBP: ffff8880ba122b58 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000000 R12: 1ffff11016b4cf5e
R13: ffffffff8153809f R14: ffff8880b5a4e280 R15: 0000000000000001
FS:  0000000000000000(0000) GS:ffff8880ba100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f03780320b0 CR3: 00000000a1294000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 00000000b8fecd19 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:158 [inline]
 _raw_spin_unlock_irqrestore+0x1b/0xe0 kernel/locking/spinlock.c:184
 try_to_del_timer_sync+0xbf/0x110 kernel/time/timer.c:1242
 del_timer_sync+0x1a4/0x270 kernel/time/timer.c:1305
 schedule_timeout+0x4d7/0xfe0 kernel/time/timer.c:1819
 rcu_gp_kthread+0xdad/0x21c0 kernel/rcu/tree.c:2202
 kthread+0x33f/0x460 kernel/kthread.c:259
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/15 04:42 linux-4.19.y 3f8a27f9e27b a63719e7 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 INFO: task hung in xfs_qm_dqfree_one
* Struck through repros no longer work on HEAD.