syzbot


INFO: task hung in ext4_quota_write

Status: fixed on 2024/10/08 03:39
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+d59334a63a7e339b51d1@syzkaller.appspotmail.com
Fix commit: 0752e7fb549d ext4: do not create EA inode under buffer lock
First crash: 330d, last: 90d
Fix bisection: fixed by (bisect log) :
commit 0752e7fb549d90c33b4d4186f11cfd25a556d1dd
Author: Jan Kara <jack@suse.cz>
Date: Thu Mar 21 16:26:50 2024 +0000

  ext4: do not create EA inode under buffer lock

  
Bug presence (3)
Date Name Commit Repro Result
2024/04/30 linux-6.1.y (ToT) dcbc050cb0d3 C [report] INFO: task hung in ext4_quota_write
2024/01/02 upstream (ToT) 610a9b8f49fb C [report] INFO: task hung in ext4_quota_write
2024/04/30 upstream (ToT) 98369dccd2f8 C Didn't crash
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 48d 201d 0/3 upstream: reported C repro on 2024/05/03 23:59
upstream INFO: task hung in ext4_quota_write ext4 C inconclusive 22 220d 325d 25/28 fixed on 2024/06/05 13:52
linux-5.15 INFO: task hung in ext4_quota_write 2 330d 330d 0/3 auto-obsoleted due to no activity on 2024/04/05 13:59
Fix bisection attempts (7)
Created Duration User Patch Repo Result
2024/10/05 04:54 5h04m bisect fix linux-6.1.y OK (1) job log
2024/08/23 11:22 2h58m bisect fix linux-6.1.y OK (0) job log log
2024/07/12 17:11 1h40m bisect fix linux-6.1.y OK (0) job log log
2024/06/02 01:40 1h27m bisect fix linux-6.1.y OK (0) job log log
2024/04/19 09:44 3h11m bisect fix linux-6.1.y OK (0) job log log
2024/03/16 20:33 1h39m bisect fix linux-6.1.y OK (0) job log log
2024/02/11 18:38 1h39m bisect fix linux-6.1.y OK (0) job log log

Sample crash report:
INFO: task syz-executor168:4244 blocked for more than 143 seconds.
      Not tainted 6.1.70-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor168 state:D stack:0     pid:4244  ppid:4243   flags:0x00000005
Call trace:
 __switch_to+0x320/0x754 arch/arm64/kernel/process.c:553
 context_switch kernel/sched/core.c:5245 [inline]
 __schedule+0xee4/0x1c98 kernel/sched/core.c:6558
 schedule+0xc4/0x170 kernel/sched/core.c:6634
 io_schedule+0x8c/0x188 kernel/sched/core.c:8786
 bit_wait_io+0x1c/0xac kernel/sched/wait_bit.c:209
 __wait_on_bit_lock+0xcc/0x1e8 kernel/sched/wait_bit.c:90
 out_of_line_wait_on_bit_lock+0x194/0x21c kernel/sched/wait_bit.c:117
 wait_on_bit_lock_io include/linux/wait_bit.h:208 [inline]
 __lock_buffer+0x78/0xac fs/buffer.c:69
 lock_buffer include/linux/buffer_head.h:397 [inline]
 ext4_quota_write+0x36c/0x54c fs/ext4/super.c:7150
 qtree_write_dquot+0x1dc/0x488 fs/quota/quota_tree.c:431
 v2_write_dquot+0xf4/0x188 fs/quota/quota_v2.c:358
 dquot_commit+0x14c/0x240 fs/quota/dquot.c:512
 ext4_write_dquot+0x1b0/0x284 fs/ext4/super.c:6753
 ext4_mark_dquot_dirty+0xe8/0x140 fs/ext4/super.c:6801
 mark_dquot_dirty fs/quota/dquot.c:372 [inline]
 mark_all_dquot_dirty fs/quota/dquot.c:410 [inline]
 dquot_alloc_inode+0x594/0xb64 fs/quota/dquot.c:1838
 ext4_xattr_inode_alloc_quota fs/ext4/xattr.c:883 [inline]
 ext4_xattr_set_entry+0x958/0x3064 fs/ext4/xattr.c:1665
 ext4_xattr_block_set+0x54c/0x2c64 fs/ext4/xattr.c:1920
 ext4_xattr_set_handle+0xae8/0x1294 fs/ext4/xattr.c:2406
 ext4_xattr_set+0x1dc/0x350 fs/ext4/xattr.c:2508
 ext4_xattr_user_set+0xd4/0xfc fs/ext4/xattr_user.c:41
 __vfs_setxattr+0x388/0x3a4 fs/xattr.c:182
 __vfs_setxattr_noperm+0x110/0x528 fs/xattr.c:216
 __vfs_setxattr_locked+0x1ec/0x218 fs/xattr.c:277
 vfs_setxattr+0x1a8/0x344 fs/xattr.c:309
 do_setxattr fs/xattr.c:594 [inline]
 setxattr+0x230/0x294 fs/xattr.c:617
 path_setxattr+0x17c/0x258 fs/xattr.c:636
 __do_sys_setxattr fs/xattr.c:652 [inline]
 __se_sys_setxattr fs/xattr.c:648 [inline]
 __arm64_sys_setxattr+0xbc/0xd8 fs/xattr.c:648
 __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:585

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffff8000159f4ef0 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x44/0xcf4 kernel/rcu/tasks.h:516
1 lock held by rcu_tasks_trace/13:
 #0: ffff8000159f56f0 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x44/0xcf4 kernel/rcu/tasks.h:516
1 lock held by khungtaskd/28:
 #0: ffff8000159f4d20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0xc/0x44 include/linux/rcupdate.h:305
2 locks held by getty/3990:
 #0: ffff0000d62ab098 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x3c/0x4c drivers/tty/tty_ldsem.c:340
 #1: ffff80001bca02f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x414/0x1214 drivers/tty/n_tty.c:2188
6 locks held by syz-executor168/4244:
 #0: ffff0000d8066460 (sb_writers#3){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:393
 #1: ffff0000df362c20 (&type->i_mutex_dir_key#3){++++}-{3:3}, at: inode_lock include/linux/fs.h:756 [inline]
 #1: ffff0000df362c20 (&type->i_mutex_dir_key#3){++++}-{3:3}, at: vfs_setxattr+0x17c/0x344 fs/xattr.c:308
 #2: ffff0000df3628e8 (&ei->xattr_sem){++++}-{3:3}, at: ext4_write_lock_xattr fs/ext4/xattr.h:155 [inline]
 #2: ffff0000df3628e8 (&ei->xattr_sem){++++}-{3:3}, at: ext4_xattr_set_handle+0x1e0/0x1294 fs/ext4/xattr.c:2321
 #3: ffff800015b26388 (dquot_srcu){....}-{0:0}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:305
 #4: ffff0000e28c80a8 (&dquot->dq_lock){+.+.}-{3:3}, at: dquot_commit+0x54/0x240 fs/quota/dquot.c:505
 #5: ffff0000d8066208 (&s->s_dquot.dqio_sem){++++}-{3:3}, at: v2_write_dquot+0x84/0x188 fs/quota/quota_v2.c:356

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


Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/02 01:00 linux-6.1.y a507f147e6f0 fb427a07 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan-arm64 INFO: task hung in ext4_quota_write
2024/01/06 06:56 linux-6.1.y 38fb82ecd144 d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in ext4_quota_write
2024/01/05 22:32 linux-6.1.y 38fb82ecd144 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in ext4_quota_write
2024/01/03 19:22 linux-6.1.y a507f147e6f0 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in ext4_quota_write
2024/01/02 06:31 linux-6.1.y a507f147e6f0 fb427a07 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan INFO: task hung in ext4_quota_write
2024/01/01 19:12 linux-6.1.y a507f147e6f0 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in ext4_quota_write
2023/12/27 15:50 linux-6.1.y 4aa6747d9352 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in ext4_quota_write
2024/01/01 19:39 linux-6.1.y a507f147e6f0 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in ext4_quota_write
2023/12/27 13:50 linux-6.1.y 4aa6747d9352 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in ext4_quota_write
* Struck through repros no longer work on HEAD.