syzbot


INFO: task hung in __sync_dirty_buffer
Status: upstream: reported C repro on 2021/09/01 20:17
Reported-by: syzbot+91dccab7c64e2850a4e5@syzkaller.appspotmail.com
First crash: 272d, last: 43d

Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: INFO: task hung in __sync_dirty_buffer (log)
Repro: C syz .config

Fix bisection: failed (bisect log)
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 INFO: task hung in __sync_dirty_buffer C 4 8d03h 606d 0/1 upstream: reported C repro on 2020/09/29 05:34
linux-4.19 INFO: task hung in __sync_dirty_buffer C error 6 8d08h 594d 0/1 upstream: reported C repro on 2020/10/11 09:03

Sample crash report:
INFO: task syz-executor197:3637 blocked for more than 143 seconds.
      Not tainted 5.17.0-rc5-syzkaller-00189-g53ab78cd6d5a #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor197 state:D stack:25528 pid: 3637 ppid:  3636 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4995 [inline]
 __schedule+0xa94/0x4910 kernel/sched/core.c:6304
 schedule+0xd2/0x260 kernel/sched/core.c:6377
 io_schedule+0xee/0x170 kernel/sched/core.c:8416
 bit_wait_io+0x12/0xd0 kernel/sched/wait_bit.c:209
 __wait_on_bit_lock+0x121/0x1a0 kernel/sched/wait_bit.c:90
 out_of_line_wait_on_bit_lock+0xd5/0x110 kernel/sched/wait_bit.c:117
 wait_on_bit_lock_io include/linux/wait_bit.h:208 [inline]
 __lock_buffer fs/buffer.c:69 [inline]
 lock_buffer include/linux/buffer_head.h:368 [inline]
 __sync_dirty_buffer+0x35b/0x3f0 fs/buffer.c:3143
 __ext4_handle_dirty_metadata+0x28d/0x720 fs/ext4/ext4_jbd2.c:382
 ext4_convert_inline_data_nolock+0x6d3/0xf30 fs/ext4/inline.c:1255
 ext4_convert_inline_data+0x31a/0x490 fs/ext4/inline.c:2026
 ext4_fallocate+0x199/0x3ed0 fs/ext4/extents.c:4698
 vfs_fallocate+0x48d/0xe10 fs/open.c:308
 ksys_fallocate fs/open.c:331 [inline]
 __do_sys_fallocate fs/open.c:339 [inline]
 __se_sys_fallocate fs/open.c:337 [inline]
 __x64_sys_fallocate+0xcf/0x140 fs/open.c:337
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f3e66903959
RSP: 002b:00007ffe4ba51cc8 EFLAGS: 00000246 ORIG_RAX: 000000000000011d
RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007f3e66903959
RDX: 000000000000048d RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 00007f3e66971ec0 R09: 00007f3e66971ec0
R10: 0000000000000006 R11: 0000000000000246 R12: 00007ffe4ba51cf0
R13: 0000000000000000 R14: 431bde82d7b634db R15: 0000000000000000
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/26:
 #0: ffffffff8bb81ae0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6460
1 lock held by klogd/2957:
 #0: ffff8880b9d39cd8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2b/0x120 kernel/sched/core.c:489
2 locks held by getty/3283:
 #0: ffff88807e02b098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:244
 #1: ffffc90002b5e2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0xcf0/0x1230 drivers/tty/n_tty.c:2075
2 locks held by syz-executor197/3637:
 #0: ffff88807c508460 (sb_writers#6){.+.+}-{0:0}, at: ksys_fallocate fs/open.c:331 [inline]
 #0: ffff88807c508460 (sb_writers#6){.+.+}-{0:0}, at: __do_sys_fallocate fs/open.c:339 [inline]
 #0: ffff88807c508460 (sb_writers#6){.+.+}-{0:0}, at: __se_sys_fallocate fs/open.c:337 [inline]
 #0: ffff88807c508460 (sb_writers#6){.+.+}-{0:0}, at: __x64_sys_fallocate+0xcf/0x140 fs/open.c:337
 #1: ffff88806c9fe4c8 (&ei->xattr_sem){++++}-{3:3}, at: ext4_write_lock_xattr fs/ext4/xattr.h:142 [inline]
 #1: ffff88806c9fe4c8 (&ei->xattr_sem){++++}-{3:3}, at: ext4_convert_inline_data+0x21e/0x490 fs/ext4/inline.c:2024

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

NMI backtrace for cpu 0
CPU: 0 PID: 26 Comm: khungtaskd Not tainted 5.17.0-rc5-syzkaller-00189-g53ab78cd6d5a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 nmi_cpu_backtrace.cold+0x47/0x144 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x1e6/0x230 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:212 [inline]
 watchdog+0xc1d/0xf50 kernel/hung_task.c:369
 kthread+0x2e9/0x3a0 kernel/kthread.c:377
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1 skipped: idling at native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
NMI backtrace for cpu 1 skipped: idling at arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
NMI backtrace for cpu 1 skipped: idling at acpi_safe_halt drivers/acpi/processor_idle.c:115 [inline]
NMI backtrace for cpu 1 skipped: idling at acpi_idle_do_entry+0x1c6/0x250 drivers/acpi/processor_idle.c:556

Crashes (8):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-selinux-root 2022/02/26 07:00 upstream 53ab78cd6d5a 45a13a73 .config log report syz C INFO: task hung in __sync_dirty_buffer
ci-upstream-kasan-gce-root 2021/12/29 05:03 upstream ecf71de775a0 76c8cf06 .config log report syz C INFO: task hung in __sync_dirty_buffer
ci-upstream-kasan-gce-root 2021/12/25 08:18 upstream b927dfc67d05 6caa12e4 .config log report syz C INFO: task hung in __sync_dirty_buffer
ci-upstream-kasan-gce-selinux-root 2021/12/18 17:44 upstream 9eaa88c7036e 44068e19 .config log report syz C INFO: task hung in __sync_dirty_buffer
ci-upstream-kasan-gce-root 2021/08/28 20:15 upstream 64b4fc45bea6 be2c130d .config log report syz C INFO: task hung in __sync_dirty_buffer
ci-upstream-linux-next-kasan-gce-root 2022/02/06 16:20 linux-next ef6b35306dd8 a7dab638 .config log report syz C INFO: task can't die in bit_wait_io
ci-upstream-linux-next-kasan-gce-root 2021/08/31 20:01 linux-next 52c7b727581f 7eb7e152 .config log report info INFO: task hung in __sync_dirty_buffer
ci-upstream-linux-next-kasan-gce-root 2022/04/15 03:46 linux-next 40354149f4d7 b17b2923 .config log report info INFO: task can't die in bit_wait_io