syzbot


INFO: task hung in exfat_write_inode (2)

Status: upstream: reported on 2024/04/15 01:39
Reported-by: syzbot+d00e0762ccdcc5eec44e@syzkaller.appspotmail.com
First crash: 18d, last: 18d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in exfat_write_inode exfat C done error 451 1h20m 498d 0/26 upstream: reported C repro on 2022/12/22 18:53
linux-5.15 INFO: task hung in exfat_write_inode 4 5d17h 20d 0/3 upstream: reported on 2024/04/13 19:03
linux-6.1 INFO: task hung in exfat_write_inode 3 201d 265d 0/3 auto-obsoleted due to no activity on 2024/01/23 18:02

Sample crash report:
INFO: task kworker/u4:3:46 blocked for more than 143 seconds.
      Not tainted 6.1.86-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u4:3    state:D stack:20512 pid:46    ppid:2      flags:0x00004000
Workqueue: writeback wb_workfn (flush-7:1)
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5245 [inline]
 __schedule+0x142d/0x4550 kernel/sched/core.c:6558
 schedule+0xbf/0x180 kernel/sched/core.c:6634
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6693
 __mutex_lock_common kernel/locking/mutex.c:679 [inline]
 __mutex_lock+0x6b9/0xd80 kernel/locking/mutex.c:747
 exfat_write_inode+0x65/0x110 fs/exfat/inode.c:94
 write_inode fs/fs-writeback.c:1460 [inline]
 __writeback_single_inode+0x67d/0x11e0 fs/fs-writeback.c:1677
 writeback_sb_inodes+0xc2b/0x1b20 fs/fs-writeback.c:1903
 __writeback_inodes_wb+0x114/0x400 fs/fs-writeback.c:1974
 wb_writeback+0x4b1/0xe10 fs/fs-writeback.c:2079
 wb_check_old_data_flush fs/fs-writeback.c:2179 [inline]
 wb_do_writeback fs/fs-writeback.c:2232 [inline]
 wb_workfn+0xbec/0x1020 fs/fs-writeback.c:2260
 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292
 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8d12ae10 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:516
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff8d12b610 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:516
1 lock held by khungtaskd/28:
 #0: ffffffff8d12ac40 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #0: ffffffff8d12ac40 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #0: ffffffff8d12ac40 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6494
4 locks held by kworker/u4:3/46:
 #0: ffff888141e96138 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #1: ffffc90000b77d20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
 #2: ffff8880738700e0 (&type->s_umount_key#50){++++}-{3:3}, at: trylock_super+0x1b/0xf0 fs/super.c:415
 #3: ffff8880707b00e0 (&sbi->s_lock){+.+.}-{3:3}, at: exfat_write_inode+0x65/0x110 fs/exfat/inode.c:94
2 locks held by getty/3307:
 #0: ffff88814ba47098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc900031262f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a7/0x1db0 drivers/tty/n_tty.c:2188
3 locks held by syz-executor.1/3564:

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

NMI backtrace for cpu 1
CPU: 1 PID: 28 Comm: khungtaskd Not tainted 6.1.86-syzkaller #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+0x1e3/0x2cb lib/dump_stack.c:106
 nmi_cpu_backtrace+0x4e1/0x560 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x1b0/0x3f0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:220 [inline]
 watchdog+0xf88/0xfd0 kernel/hung_task.c:377
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 2992 Comm: klogd Not tainted 6.1.86-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:__lock_acquire+0x1234/0x1f80 kernel/locking/lockdep.c:5046
Code: 0f b6 04 10 84 c0 0f 85 53 0b 00 00 83 3d 53 a5 5e 10 00 0f 84 b1 00 00 00 31 db 48 83 c3 40 48 89 d8 48 c1 e8 03 80 3c 10 00 <74> 08 48 89 df e8 a2 88 77 00 48 83 3b 00 0f 84 9a 03 00 00 4c 89
RSP: 0018:ffffc9000b79f840 EFLAGS: 00000046
RAX: 1ffffffff20346b4 RBX: ffffffff901a35a0 RCX: ffffffff816a7bc0
RDX: dffffc0000000000 RSI: 0000000000000008 RDI: ffffffff9049a250
RBP: c43e8954cd7f2d9e R08: dffffc0000000000 R09: fffffbfff209344b
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff88807cad2898
R13: ffff88807cad1dc0 R14: 0000000000000001 R15: 1ffff1100f95a518
FS:  00007f1295e12380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005582998ec600 CR3: 000000002819a000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
 __might_fault+0xbd/0x110 mm/memory.c:5835
 _copy_to_user+0x26/0x130 lib/usercopy.c:36
 copy_to_user include/linux/uaccess.h:169 [inline]
 syslog_print+0x7c4/0x9b0 kernel/printk/printk.c:1577
 do_syslog+0x819/0x910 kernel/printk/printk.c:1679
 __do_sys_syslog kernel/printk/printk.c:1771 [inline]
 __se_sys_syslog kernel/printk/printk.c:1769 [inline]
 __x64_sys_syslog+0x78/0x90 kernel/printk/printk.c:1769
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f1295f73fa7
Code: 73 01 c3 48 8b 0d 81 ce 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 67 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 51 ce 0c 00 f7 d8 64 89 01 48
RSP: 002b:00007ffcef6bad98 EFLAGS: 00000206 ORIG_RAX: 0000000000000067
RAX: ffffffffffffffda RBX: 00007f12961124a0 RCX: 00007f1295f73fa7
RDX: 00000000000003ff RSI: 00007f12961124a0 RDI: 0000000000000002
RBP: 0000000000000000 R08: 0000000000000002 R09: ba6e81ffaf892235
R10: 0000000000004000 R11: 0000000000000206 R12: 00007f12961124a0
R13: 00007f1296102212 R14: 00007f1296112503 R15: 00007f1296112503
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/15 01:38 linux-6.1.y cd5d98c0556c c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in exfat_write_inode
* Struck through repros no longer work on HEAD.