syzbot


INFO: task hung in __writeback_inodes_sb_nr (2)

Status: upstream: reported C repro on 2023/12/30 04:30
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+0a0f74ced3c329bb0c35@syzkaller.appspotmail.com
First crash: 362d, last: 19d
Fix bisection: failed (error log, bisect log)
  
Bug presence (2)
Date Name Commit Repro Result
2024/05/15 linux-6.1.y (ToT) 909ba1f1b414 C [report] INFO: task hung in __writeback_inodes_sb_nr
2024/05/15 upstream (ToT) 1b294a1f3561 C Didn't crash
Similar bugs (13)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in __writeback_inodes_sb_nr fs 53 2172d 2435d 0/28 closed as dup on 2018/09/08 15:33
android-49 INFO: task hung in __writeback_inodes_sb_nr 26 2268d 2412d 0/3 auto-closed as invalid on 2019/04/08 13:33
android-414 INFO: task hung in __writeback_inodes_sb_nr 1 2206d 2083d 0/1 auto-closed as invalid on 2019/06/09 16:55
upstream INFO: task hung in __writeback_inodes_sb_nr (5) ext4 C done 48 677d 1048d 22/28 fixed on 2023/02/24 13:50
linux-5.15 INFO: task hung in __writeback_inodes_sb_nr origin:lts-only C done 1496 42d 657d 0/3 upstream: reported C repro on 2023/03/09 17:32
linux-4.19 INFO: task hung in __writeback_inodes_sb_nr ext4 4 672d 819d 0/1 upstream: reported on 2022/09/28 21:19
linux-6.1 INFO: task hung in __writeback_inodes_sb_nr 1 496d 496d 0/3 auto-obsoleted due to no activity on 2023/11/26 06:37
upstream INFO: task hung in __writeback_inodes_sb_nr (6) bcachefs C done 3433 now 558d 1/28 upstream: reported C repro on 2023/06/17 00:33
upstream INFO: task hung in __writeback_inodes_sb_nr (4) ext4 4 1055d 1110d 0/28 closed as invalid on 2022/02/08 10:10
upstream INFO: task hung in __writeback_inodes_sb_nr (3) ext4 2 1322d 1419d 0/28 auto-closed as invalid on 2021/08/11 17:49
linux-4.14 INFO: task hung in __writeback_inodes_sb_nr (2) 2 787d 789d 0/1 auto-obsoleted due to no activity on 2023/02/27 15:30
upstream INFO: task hung in __writeback_inodes_sb_nr (2) ext4 1 1604d 1604d 0/28 auto-closed as invalid on 2020/11/03 06:13
linux-4.14 INFO: task hung in __writeback_inodes_sb_nr 1 1670d 1670d 0/1 auto-closed as invalid on 2020/09/27 19:31
Fix bisection attempts (4)
Created Duration User Patch Repo Result
2024/10/14 22:00 0m bisect fix linux-6.1.y error job log
2024/08/19 07:33 1h53m bisect fix linux-6.1.y OK (0) job log log
2024/07/07 09:22 1h04m bisect fix linux-6.1.y OK (0) job log log
2024/05/28 16:14 1h29m fix candidate upstream OK (0) job log log

Sample crash report:
INFO: task syz-executor121:3582 blocked for more than 143 seconds.
      Not tainted 6.1.90-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor121 state:D stack:23880 pid:3582  ppid:3580   flags:0x00004002
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
 wb_wait_for_completion+0x162/0x290 fs/fs-writeback.c:191
 __writeback_inodes_sb_nr+0x2ce/0x370 fs/fs-writeback.c:2653
 sync_filesystem+0xa0/0x220 fs/sync.c:54
 generic_shutdown_super+0x6b/0x340 fs/super.c:474
 kill_block_super+0x7a/0xe0 fs/super.c:1459
 deactivate_locked_super+0xa0/0x110 fs/super.c:332
 cleanup_mnt+0x490/0x520 fs/namespace.c:1186
 task_work_run+0x246/0x300 kernel/task_work.c:179
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:177
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
 syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:303
 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:87
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f820e984d77
RSP: 002b:00007ffd7138a228 EFLAGS: 00000206 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f820e984d77
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffd7138a2e0
RBP: 00007ffd7138a2e0 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000206 R12: 00007ffd7138b390
R13: 00005555570e6700 R14: 431bde82d7b634db R15: 00007ffd7138b334
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8d12ae50 (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: ffffffff8d12b650 (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: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #0: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #0: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6494
3 locks held by kworker/u4:2/35:
2 locks held by getty/3307:
 #0: ffff888014a65098 (&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
1 lock held by syz-executor121/3582:
 #0: ffff88807670a0e0 (&type->s_umount_key#42){+.+.}-{3:3}, at: deactivate_super+0xa9/0xe0 fs/super.c:362

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

NMI backtrace for cpu 0
CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.1.90-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/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 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 35 Comm: kworker/u4:2 Not tainted 6.1.90-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Workqueue: writeback wb_workfn (flush-7:0)
RIP: 0010:hlock_class kernel/locking/lockdep.c:223 [inline]
RIP: 0010:mark_lock+0x61/0x340 kernel/locking/lockdep.c:4606
Code: 85 83 02 00 00 31 ed f6 43 02 03 40 0f 94 c5 83 f5 09 eb 0b 89 d5 83 fa 20 0f 83 d2 02 00 00 41 be 01 00 00 00 89 e9 41 d3 e6 <49> 8d 5f 20 48 89 d8 48 c1 e8 03 42 0f b6 04 28 84 c0 0f 85 29 02
RSP: 0018:ffffc90000ac6fb8 EFLAGS: 00000002
RAX: 0000000000040660 RBX: ffff888015ede470 RCX: 0000000000000006
RDX: 0000000000000006 RSI: ffff888015ede470 RDI: ffff888015edd940
RBP: 0000000000000006 R08: dffffc0000000000 R09: fffffbfff209365b
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff888015ede490
R13: dffffc0000000000 R14: 0000000000000040 R15: ffff888015ede470
FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000563666042600 CR3: 0000000018e77000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 mark_held_locks kernel/locking/lockdep.c:4230 [inline]
 __trace_hardirqs_on_caller kernel/locking/lockdep.c:4256 [inline]
 lockdep_hardirqs_on_prepare+0x3a0/0x7a0 kernel/locking/lockdep.c:4315
 trace_hardirqs_on+0x34/0x40 kernel/trace/trace_preemptirq.c:49
 lookup_bh_lru fs/buffer.c:1291 [inline]
 __find_get_block+0x2b5/0x1120 fs/buffer.c:1303
 __getblk_slow fs/buffer.c:1034 [inline]
 __getblk_gfp+0x146/0xa20 fs/buffer.c:1333
 __bread_gfp+0x2a/0x370 fs/buffer.c:1367
 sb_bread include/linux/buffer_head.h:338 [inline]
 exfat_get_dentry_set+0x3c4/0x1320 fs/exfat/dir.c:853
 __exfat_write_inode+0x1ff/0x880 fs/exfat/inode.c:45
 exfat_write_inode+0x99/0x110 fs/exfat/inode.c:95
 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
 wb_writeback+0x49d/0xe10 fs/fs-writeback.c:2077
 wb_do_writeback fs/fs-writeback.c:2220 [inline]
 wb_workfn+0x427/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>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 1.362 msecs

Crashes (14):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/15 04:59 linux-6.1.y 909ba1f1b414 fdb4c10c .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan INFO: task hung in __writeback_inodes_sb_nr
2024/12/07 05:02 linux-6.1.y e4d90d63d385 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in __writeback_inodes_sb_nr
2024/12/05 17:34 linux-6.1.y e4d90d63d385 29f61fce .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in __writeback_inodes_sb_nr
2024/12/02 22:19 linux-6.1.y e4d90d63d385 b499ea68 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in __writeback_inodes_sb_nr
2024/11/29 13:03 linux-6.1.y e4d90d63d385 5df23865 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in __writeback_inodes_sb_nr
2024/11/29 05:05 linux-6.1.y e4d90d63d385 5df23865 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in __writeback_inodes_sb_nr
2024/11/29 04:08 linux-6.1.y e4d90d63d385 5df23865 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in __writeback_inodes_sb_nr
2024/10/23 01:41 linux-6.1.y 7ec6f9fa3d97 15fa2979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in __writeback_inodes_sb_nr
2024/08/28 11:38 linux-6.1.y ee5e09825b81 6c853ff9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in __writeback_inodes_sb_nr
2024/04/16 12:05 linux-6.1.y cd5d98c0556c 0d592ce4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in __writeback_inodes_sb_nr
2024/04/07 11:17 linux-6.1.y 347385861c50 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in __writeback_inodes_sb_nr
2024/03/10 00:10 linux-6.1.y 61adba85cc40 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in __writeback_inodes_sb_nr
2023/12/30 04:29 linux-6.1.y 4aa6747d9352 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in __writeback_inodes_sb_nr
2024/04/29 11:10 linux-6.1.y f2295faba5e8 27e33c58 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: task hung in __writeback_inodes_sb_nr
* Struck through repros no longer work on HEAD.