syzbot


INFO: task hung in f2fs_balance_fs

Status: upstream: reported C repro on 2023/03/08 13:34
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+3b1c9adc2b5043073aab@syzkaller.appspotmail.com
First crash: 201d, last: 3d11h
Bug presence (1)
Date Name Commit Repro Result
2023/05/19 upstream (ToT) 2d1bcbc6cd70 C [report] INFO: task hung in f2fs_balance_fs
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 INFO: task hung in f2fs_balance_fs f2fs C 199 202d 342d 0/1 upstream: reported C repro on 2022/10/18 13:55
linux-4.14 INFO: task hung in f2fs_balance_fs 3 311d 338d 0/1 auto-obsoleted due to no activity on 2023/03/18 03:56
upstream INFO: task hung in f2fs_balance_fs f2fs C done 254 3d09h 194d 0/25 upstream: reported C repro on 2023/03/15 03:28
linux-6.1 INFO: task hung in f2fs_balance_fs 20 138d 202d 0/3 auto-obsoleted due to no activity on 2023/08/22 15:19
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2023/09/09 03:03 2h10m bisect fix linux-5.15.y job log (0) log
2023/06/18 19:46 35m bisect fix linux-5.15.y job log (0) log

Sample crash report:
INFO: task kworker/u4:1:3549 blocked for more than 143 seconds.
      Not tainted 5.15.112-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u4:1    state:D stack:24192 pid: 3549 ppid:     2 flags:0x00004000
Workqueue: writeback wb_workfn (flush-7:0)
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5026 [inline]
 __schedule+0x12c4/0x4590 kernel/sched/core.c:6372
 schedule+0x11b/0x1f0 kernel/sched/core.c:6455
 rwsem_down_write_slowpath+0xebb/0x15c0 kernel/locking/rwsem.c:1157
 __down_write_common kernel/locking/rwsem.c:1284 [inline]
 __down_write kernel/locking/rwsem.c:1293 [inline]
 down_write+0x164/0x170 kernel/locking/rwsem.c:1542
 f2fs_balance_fs+0x4d4/0x6a0 fs/f2fs/segment.c:529
 f2fs_write_inode+0x4c3/0x540 fs/f2fs/inode.c:727
 write_inode fs/fs-writeback.c:1478 [inline]
 __writeback_single_inode+0x644/0xe30 fs/fs-writeback.c:1683
 writeback_sb_inodes+0xbf0/0x1a50 fs/fs-writeback.c:1908
 __writeback_inodes_wb+0x114/0x400 fs/fs-writeback.c:1979
 wb_writeback+0x465/0xc50 fs/fs-writeback.c:2084
 wb_check_old_data_flush fs/fs-writeback.c:2184 [inline]
 wb_do_writeback fs/fs-writeback.c:2237 [inline]
 wb_workfn+0xc55/0x1130 fs/fs-writeback.c:2266
 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2307
 worker_thread+0xaca/0x1280 kernel/workqueue.c:2454
 kthread+0x3f6/0x4f0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>

Showing all locks held in the system:
1 lock held by ksoftirqd/1/20:
 #0: ffff8880b9b39698 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475
1 lock held by khungtaskd/27:
 #0: ffffffff8c91c5a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/3261:
 #0: ffff888024428098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc900024bb2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1da0 drivers/tty/n_tty.c:2147
2 locks held by syz-executor287/3542:
4 locks held by kworker/u4:1/3549:
 #0: ffff888142bbe938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2280
 #1: ffffc90002defd20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2282
 #2: ffff8880790960e0 (&type->s_umount_key#45){.+.+}-{3:3}, at: trylock_super+0x1b/0xf0 fs/super.c:418
 #3: ffff888018801108 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_balance_fs+0x4d4/0x6a0 fs/f2fs/segment.c:529
2 locks held by dhcpcd/4211:
 #0: ffff888079af2120 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1649 [inline]
 #0: ffff888079af2120 (sk_lock-AF_PACKET){+.+.}-{0:0}, at: packet_do_bind+0x2a/0xc90 net/packet/af_packet.c:3162
 #1: ffffffff8c920ae8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:290 [inline]
 #1: ffffffff8c920ae8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x280/0x740 kernel/rcu/tree_exp.h:840

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

NMI backtrace for cpu 1
CPU: 1 PID: 27 Comm: khungtaskd Not tainted 5.15.112-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 nmi_cpu_backtrace+0x46a/0x4a0 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x181/0x2a0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
 watchdog+0xe72/0xeb0 kernel/hung_task.c:295
 kthread+0x3f6/0x4f0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 3542 Comm: syz-executor287 Not tainted 5.15.112-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
RIP: 0010:lock_acquire+0x239/0x4f0 kernel/locking/lockdep.c:5625
Code: 4c 89 f7 e8 59 e5 66 00 48 c7 44 24 60 00 00 00 00 9c 8f 44 24 60 42 80 3c 2b 00 74 08 4c 89 f7 e8 bc e4 66 00 f6 44 24 61 02 <0f> 85 84 01 00 00 41 f7 c7 00 02 00 00 74 01 fb 48 c7 44 24 40 0e
RSP: 0018:ffffc90002dbdaa0 EFLAGS: 00000046
RAX: 0000000000000001 RBX: 1ffff920005b7b60 RCX: ffffffff816316d2
RDX: dffffc0000000000 RSI: ffffffff8a8b0e00 RDI: ffffffff8ad85d40
RBP: ffffc90002dbdbe8 R08: dffffc0000000000 R09: fffffbfff1f7903b
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff920005b7b5c
R13: dffffc0000000000 R14: ffffc90002dbdb00 R15: 0000000000000246
FS:  00007f8efb923700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555556ffa2b8 CR3: 0000000071f80000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 down_read+0x45/0x2e0 kernel/locking/rwsem.c:1488
 check_valid_map fs/f2fs/gc.c:881 [inline]
 gc_data_segment fs/f2fs/gc.c:1450 [inline]
 do_garbage_collect+0x20d8/0x7600 fs/f2fs/gc.c:1670
 f2fs_gc+0x9e5/0x1ad0 fs/f2fs/gc.c:1764
 f2fs_balance_fs+0x4e8/0x6a0 fs/f2fs/segment.c:530
 f2fs_write_single_data_page+0xc4f/0x18a0 fs/f2fs/data.c:2868
 f2fs_write_cache_pages fs/f2fs/data.c:3082 [inline]
 __f2fs_write_data_pages fs/f2fs/data.c:3233 [inline]
 f2fs_write_data_pages+0x17de/0x2c00 fs/f2fs/data.c:3260
 do_writepages+0x481/0x730 mm/page-writeback.c:2364
 filemap_fdatawrite_wbc+0x1d6/0x230 mm/filemap.c:400
 __filemap_fdatawrite_range mm/filemap.c:433 [inline]
 file_write_and_wait_range+0x1cb/0x2b0 mm/filemap.c:810
 f2fs_do_sync_file+0x650/0x19d0 fs/f2fs/file.c:274
 generic_write_sync include/linux/fs.h:2913 [inline]
 f2fs_file_write_iter+0x476/0xb80 fs/f2fs/file.c:4358
 __kernel_write+0x5b1/0xa60 fs/read_write.c:539
 __dump_emit+0x264/0x3a0 fs/coredump.c:875
 dump_user_range+0x91/0x320 fs/coredump.c:949
 elf_core_dump+0x3c7d/0x4570 fs/binfmt_elf.c:2285
 do_coredump+0x1852/0x31e0 fs/coredump.c:826
 get_signal+0xc06/0x14e0 kernel/signal.c:2875
 arch_do_signal_or_restart+0xc3/0x1890 arch/x86/kernel/signal.c:865
 handle_signal_work kernel/entry/common.c:148 [inline]
 exit_to_user_mode_loop+0x97/0x130 kernel/entry/common.c:172
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:208
 irqentry_exit_to_user_mode+0x5/0x30 kernel/entry/common.c:314
 exc_page_fault+0x342/0x740 arch/x86/mm/fault.c:1544
 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:568
RIP: 0033:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 002b:00000000200001c8 EFLAGS: 00010217
RAX: 0000000000000000 RBX: 00007f8effe2c6d8 RCX: 00007f8effd981f9
RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000080004000
RBP: 00007f8effe2c6d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8effe2c6dc
R13: 9958090000000000 R14: 0030656c69662f2e R15: 0000000000022000
 </TASK>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 2.303 msecs

Crashes (31):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/19 05:22 linux-5.15.y 9d6bde853685 3bb7af1d .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/09/22 13:23 linux-5.15.y 35ecaa3632bf 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/06/27 02:34 linux-5.15.y f67653019430 4cd5bb25 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/06/25 11:54 linux-5.15.y f67653019430 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/06/23 11:29 linux-5.15.y f67653019430 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/06/23 09:21 linux-5.15.y f67653019430 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/05/10 18:18 linux-5.15.y 8a7f2a5c5aa1 14b12a99 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/05/05 02:46 linux-5.15.y 8a7f2a5c5aa1 518a39a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/05/03 22:14 linux-5.15.y 8a7f2a5c5aa1 b5918830 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/05/03 15:48 linux-5.15.y 8a7f2a5c5aa1 b5918830 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/05/03 03:33 linux-5.15.y 8a7f2a5c5aa1 48e0a81d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/05/03 02:08 linux-5.15.y 8a7f2a5c5aa1 48e0a81d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/05/02 00:13 linux-5.15.y 8a7f2a5c5aa1 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/05/01 15:14 linux-5.15.y 8a7f2a5c5aa1 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/05/01 09:23 linux-5.15.y 8a7f2a5c5aa1 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/05/01 07:08 linux-5.15.y 8a7f2a5c5aa1 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/04/29 09:05 linux-5.15.y f48aeeaaa64c 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/04/29 06:55 linux-5.15.y f48aeeaaa64c 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/04/01 21:33 linux-5.15.y c957cbb87315 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/03/30 09:09 linux-5.15.y 115472395b0a f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/03/28 12:57 linux-5.15.y 115472395b0a 47f3aaf1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/03/25 17:48 linux-5.15.y 115472395b0a fbf0499a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/03/25 02:47 linux-5.15.y 115472395b0a 9700afae .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/03/19 22:10 linux-5.15.y 8020ae3c051d 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/03/15 20:24 linux-5.15.y 2ddbd0f967b3 18b58603 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/03/08 17:22 linux-5.15.y d9b4a0c83a2d 4fc6d98d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/03/08 13:34 linux-5.15.y d9b4a0c83a2d d2b00170 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in f2fs_balance_fs
2023/06/26 12:56 linux-5.15.y f67653019430 79782afc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in f2fs_balance_fs
2023/04/10 18:28 linux-5.15.y d86dfc4d95cd 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in f2fs_balance_fs
2023/04/06 19:53 linux-5.15.y d86dfc4d95cd 08707520 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in f2fs_balance_fs
2023/04/01 21:34 linux-5.15.y c957cbb87315 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in f2fs_balance_fs
* Struck through repros no longer work on HEAD.