syzbot


INFO: task hung in ext4_quota_write

Status: fixed on 2024/06/05 13:52
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+a43d4f48b8397d0e41a9@syzkaller.appspotmail.com
Fix commit: 0a46ef234756 ext4: do not create EA inode under buffer lock
First crash: 372d, last: 241d
Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: INFO: task hung in ext4_quota_write (log)
Repro: C syz .config
  
Discussions (6)
Title Replies (including bot) Last reply
[Bug 219283] kernel regression with ext4 and ea_inode mount flags and exercising xattrs (between Linux 6.8 and 6.11) 1 (1) 2024/09/17 18:13
[PATCH AUTOSEL 6.9 3/5] ext4: do not create EA inode under buffer lock 1 (1) 2024/05/28 02:18
[PATCH 2/2] ext4: Do not create EA inode under buffer lock 4 (4) 2024/05/03 04:03
[syzbot] Monthly ext4 report (Apr 2024) 0 (1) 2024/04/12 13:18
[PATCH 2/3] ext4: Do not create EA inode under buffer lock 3 (3) 2024/03/14 18:12
[syzbot] [ext4?] INFO: task hung in ext4_quota_write 4 (7) 2024/01/10 11:40
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 INFO: task hung in ext4_quota_write (2) origin:lts-only C error 11 69d 222d 0/3 upstream: reported C repro on 2024/05/03 23:59
linux-6.1 INFO: task hung in ext4_quota_write origin:upstream missing-backport C done 9 110d 350d 3/3 fixed on 2024/10/08 03:39
linux-5.15 INFO: task hung in ext4_quota_write 2 350d 350d 0/3 auto-obsoleted due to no activity on 2024/04/05 13:59
Last patch testing requests (7)
Created Duration User Patch Repo Result
2024/04/29 11:34 24m retest repro upstream OK log
2024/04/29 11:34 24m retest repro upstream OK log
2024/04/29 11:34 24m retest repro upstream OK log
2024/02/21 15:04 23m retest repro upstream OK log
2024/02/21 11:00 1h09m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log
2024/01/06 02:48 14m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master report log
2024/01/05 14:23 22m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f5837722ffec OK log

Sample crash report:
INFO: task syz-executor220:5077 blocked for more than 143 seconds.
      Not tainted 6.8.0-syzkaller-08951-gfe46a7dd189e #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor220 state:D stack:20088 pid:5077  tgid:5077  ppid:5076   flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5409 [inline]
 __schedule+0x17d3/0x4a20 kernel/sched/core.c:6736
 __schedule_loop kernel/sched/core.c:6813 [inline]
 schedule+0x14b/0x320 kernel/sched/core.c:6828
 io_schedule+0x8d/0x110 kernel/sched/core.c:9034
 bit_wait_io+0x12/0xd0 kernel/sched/wait_bit.c:209
 __wait_on_bit_lock+0xd7/0x530 kernel/sched/wait_bit.c:90
 out_of_line_wait_on_bit_lock+0x1d5/0x260 kernel/sched/wait_bit.c:117
 lock_buffer include/linux/buffer_head.h:401 [inline]
 ext4_quota_write+0x381/0x580 fs/ext4/super.c:7240
 qtree_write_dquot+0x26b/0x5b0 fs/quota/quota_tree.c:462
 v2_write_dquot+0x189/0x2a0 fs/quota/quota_v2.c:372
 dquot_commit+0x3cb/0x520 fs/quota/dquot.c:514
 ext4_write_dquot+0x1f2/0x2c0 fs/ext4/super.c:6866
 mark_dquot_dirty fs/quota/dquot.c:372 [inline]
 mark_all_dquot_dirty+0xfd/0x410 fs/quota/dquot.c:412
 dquot_alloc_inode+0x7ea/0xc90 fs/quota/dquot.c:1789
 ext4_xattr_inode_alloc_quota fs/ext4/xattr.c:932 [inline]
 ext4_xattr_set_entry+0xaf3/0x3fd0 fs/ext4/xattr.c:1715
 ext4_xattr_block_set+0x6a2/0x35e0 fs/ext4/xattr.c:1970
 ext4_xattr_set_handle+0xe54/0x1780 fs/ext4/xattr.c:2456
 ext4_xattr_set+0x241/0x3d0 fs/ext4/xattr.c:2558
 __vfs_setxattr+0x46a/0x4a0 fs/xattr.c:200
 __vfs_setxattr_noperm+0x12e/0x5e0 fs/xattr.c:234
 vfs_setxattr+0x221/0x430 fs/xattr.c:321
 do_setxattr fs/xattr.c:629 [inline]
 setxattr+0x25d/0x2f0 fs/xattr.c:652
 path_setxattr+0x1c0/0x2a0 fs/xattr.c:671
 __do_sys_setxattr fs/xattr.c:687 [inline]
 __se_sys_setxattr fs/xattr.c:683 [inline]
 __x64_sys_setxattr+0xbb/0xd0 fs/xattr.c:683
 do_syscall_64+0xfd/0x240
 entry_SYSCALL_64_after_hwframe+0x6d/0x75
RIP: 0033:0x7fb65a9b2d99
RSP: 002b:00007fff62ecb458 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc
RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007fb65a9b2d99
RDX: 0000000020000380 RSI: 0000000020000340 RDI: 00000000200002c0
RBP: 00007fb65aa275f0 R08: 0000000000000000 R09: 00005555689894c0
R10: 000000000000ffed R11: 0000000000000246 R12: 00007fff62ecb480
R13: 00007fff62ecb6a8 R14: 431bde82d7b634db R15: 00007fb65a9fc03b
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/29:
 #0: ffffffff8e132020 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:298 [inline]
 #0: ffffffff8e132020 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:750 [inline]
 #0: ffffffff8e132020 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6614
1 lock held by syslogd/4504:
 #0: ffff8880b953e358 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:559
2 locks held by getty/4827:
 #0: ffff888029fba0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: ffffc900031332f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6b5/0x1e10 drivers/tty/n_tty.c:2201
6 locks held by syz-executor220/5077:
 #0: ffff88802e776420 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:409
 #1: ffff88807e33a200 (&type->i_mutex_dir_key#3){++++}-{3:3}, at: inode_lock include/linux/fs.h:793 [inline]
 #1: ffff88807e33a200 (&type->i_mutex_dir_key#3){++++}-{3:3}, at: vfs_setxattr+0x1e1/0x430 fs/xattr.c:320
 #2: ffff88807e339ec8 (&ei->xattr_sem){++++}-{3:3}, at: ext4_write_lock_xattr fs/ext4/xattr.h:155 [inline]
 #2: ffff88807e339ec8 (&ei->xattr_sem){++++}-{3:3}, at: ext4_xattr_set_handle+0x26b/0x1780 fs/ext4/xattr.c:2371
 #3: ffffffff8e291830 (dquot_srcu){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:116 [inline]
 #3: ffffffff8e291830 (dquot_srcu){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:215 [inline]
 #3: ffffffff8e291830 (dquot_srcu){.+.+}-{0:0}, at: dquot_alloc_inode+0x1bf/0xc90 fs/quota/dquot.c:1765
 #4: ffff8880779a80a8 (&dquot->dq_lock){+.+.}-{3:3}, at: dquot_commit+0x5b/0x520 fs/quota/dquot.c:507
 #5: ffff88802e776210 (&s->s_dquot.dqio_sem){++++}-{3:3}, at: v2_write_dquot+0x9c/0x2a0 fs/quota/quota_v2.c:369

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

NMI backtrace for cpu 0
CPU: 0 PID: 29 Comm: khungtaskd Not tainted 6.8.0-syzkaller-08951-gfe46a7dd189e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114
 nmi_cpu_backtrace+0x49c/0x4d0 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x198/0x320 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:160 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:222 [inline]
 watchdog+0xfb0/0xff0 kernel/hung_task.c:379
 kthread+0x2f2/0x390 kernel/kthread.c:388
 ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 4504 Comm: syslogd Not tainted 6.8.0-syzkaller-08951-gfe46a7dd189e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:stack_trace_consume_entry+0x2f/0x280 kernel/stacktrace.c:86
Code: 41 57 41 56 41 55 41 54 53 48 83 ec 18 48 89 fb 48 ba 00 00 00 00 00 fc ff df 4c 8d 4f 10 4d 89 cf 49 c1 ef 03 41 0f b6 04 17 <84> c0 0f 85 06 01 00 00 44 8b 43 10 48 8d 6b 08 49 89 ec 49 c1 ec
RSP: 0018:ffffc9000315f4b0 EFLAGS: 00000216
RAX: 0000000000000000 RBX: ffffc9000315f5e0 RCX: ffff88807bd10000
RDX: dffffc0000000000 RSI: ffffffff81f80f16 RDI: ffffc9000315f5e0
RBP: ffffc9000315f590 R08: ffffffff81372702 R09: ffffc9000315f5f0
R10: 0000000000000003 R11: ffffffff8180e0a0 R12: ffff88807bd10000
R13: ffffffff8180e0a0 R14: ffffc9000315f5e0 R15: 1ffff9200062bebe
FS:  00007fe5074c5380(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000560ddc150600 CR3: 000000007be70000 CR4: 0000000000350ef0
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 arch_stack_walk+0x145/0x1b0 arch/x86/kernel/stacktrace.c:27
 stack_trace_save+0x118/0x1d0 kernel/stacktrace.c:122
 kasan_save_stack mm/kasan/common.c:47 [inline]
 kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579
 poison_slab_object+0xa6/0xe0 mm/kasan/common.c:240
 __kasan_slab_free+0x37/0x60 mm/kasan/common.c:256
 kasan_slab_free include/linux/kasan.h:184 [inline]
 slab_free_hook mm/slub.c:2106 [inline]
 slab_free mm/slub.c:4280 [inline]
 kmem_cache_free+0x102/0x2b0 mm/slub.c:4344
 __unix_dgram_recvmsg+0xe2d/0x1450 net/unix/af_unix.c:2514
 sock_recvmsg_nosec net/socket.c:1046 [inline]
 sock_recvmsg+0x231/0x280 net/socket.c:1068
 sock_read_iter+0x2ca/0x3e0 net/socket.c:1138
 call_read_iter include/linux/fs.h:2102 [inline]
 new_sync_read fs/read_write.c:395 [inline]
 vfs_read+0x97d/0xb70 fs/read_write.c:476
 ksys_read+0x1a0/0x2c0 fs/read_write.c:619
 do_syscall_64+0xfd/0x240
 entry_SYSCALL_64_after_hwframe+0x6d/0x75
RIP: 0033:0x7fe507619b6a
Code: 00 3d 00 00 41 00 75 0d 50 48 8d 3d 2d 08 0a 00 e8 ea 7d 01 00 31 c0 e9 07 ff ff ff 64 8b 04 25 18 00 00 00 85 c0 75 1b 0f 05 <48> 3d 00 f0 ff ff 76 6c 48 8b 15 8f a2 0d 00 f7 d8 64 89 02 48 83
RSP: 002b:00007fff88988c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007fe507619b6a
RDX: 00000000000000ff RSI: 000055bf429ea950 RDI: 0000000000000000
RBP: 000055bf429ea910 R08: 0000000000000001 R09: 0000000000000000
R10: 00007fe5077b83a3 R11: 0000000000000246 R12: 000055bf429ea99c
R13: 000055bf429ea950 R14: 0000000000000000 R15: 00007fe5077fca80
 </TASK>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 2.485 msecs

Crashes (22):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/15 08:19 upstream fe46a7dd189e c8349e48 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root INFO: task hung in ext4_quota_write
2024/04/13 14:13 upstream fe46a7dd189e c8349e48 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root INFO: task hung in ext4_quota_write
2024/04/07 08:35 upstream fe46a7dd189e ca620dd8 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root INFO: task hung in ext4_quota_write
2023/12/28 11:58 upstream f5837722ffec fb427a07 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root INFO: task hung in ext4_quota_write
2024/01/02 03:19 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci aafe7ad77b91 fb427a07 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 INFO: task hung in ext4_quota_write
2024/02/07 02:18 upstream 99bd3cb0d12e 6404acf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in ext4_quota_write
2024/01/28 19:46 upstream 8a696a29c690 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in ext4_quota_write
2024/01/16 01:34 upstream 052d534373b7 2a7bcc7f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in ext4_quota_write
2024/01/16 00:04 upstream 052d534373b7 2a7bcc7f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in ext4_quota_write
2023/12/28 05:58 upstream f5837722ffec fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in ext4_quota_write
2023/12/27 13:58 upstream fbafc3e621c3 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in ext4_quota_write
2023/12/27 13:58 upstream fbafc3e621c3 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root INFO: task hung in ext4_quota_write
2023/12/27 13:53 upstream fbafc3e621c3 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in ext4_quota_write
2023/12/06 05:28 upstream bee0e7762ad2 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in ext4_quota_write
2024/01/27 23:07 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 0802e17d9aca cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 INFO: task hung in ext4_quota_write
2024/01/27 21:12 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 0802e17d9aca cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 INFO: task hung in ext4_quota_write
2024/01/27 07:49 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 0802e17d9aca cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 INFO: task hung in ext4_quota_write
2024/01/27 04:29 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 0802e17d9aca cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 INFO: task hung in ext4_quota_write
2024/01/27 02:38 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 0802e17d9aca cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 INFO: task hung in ext4_quota_write
2023/12/24 12:58 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci aafe7ad77b91 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 INFO: task hung in ext4_quota_write
2023/12/16 10:01 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci d5b235ec8eab 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 INFO: task hung in ext4_quota_write
2023/12/05 19:38 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci d46efae31672 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 INFO: task hung in ext4_quota_write
* Struck through repros no longer work on HEAD.