[v6.1] INFO: task hung in f2fs_balance_fs (3)

0 views
Skip to first unread message

syzbot

unread,
Mar 27, 2024, 2:53:26 AMMar 27
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: e5cd595e23c1 Linux 6.1.83
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=177d3d85180000
kernel config: https://syzkaller.appspot.com/x/.config?x=99d0cbbc2b2c7cfd
dashboard link: https://syzkaller.appspot.com/bug?extid=78be57e74eed6a35ade1
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/cd28292a2eef/disk-e5cd595e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e8297fd856b2/vmlinux-e5cd595e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/ea8c74634429/bzImage-e5cd595e.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+78be57...@syzkaller.appspotmail.com

INFO: task kworker/u4:12:14907 blocked for more than 143 seconds.
Not tainted 6.1.83-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u4:12 state:D stack:19872 pid:14907 ppid:2 flags:0x00004000
Workqueue: writeback wb_workfn
(flush-7:2)

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
rwsem_down_write_slowpath+0xea1/0x14b0 kernel/locking/rwsem.c:1189
f2fs_down_write fs/f2fs/f2fs.h:2176 [inline]
f2fs_balance_fs+0x4fb/0x6c0 fs/f2fs/segment.c:426
f2fs_write_inode+0x4c3/0x540 fs/f2fs/inode.c:730
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:307
</TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
#0: ffffffff8d12ab10 (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: ffffffff8d12b310 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:516
2 locks held by kworker/1:0/22:
#0: ffff888012472138 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
#1: ffffc900001c7d20 ((work_completion)(&rew->rew_work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
1 lock held by khungtaskd/28:
#0: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#0: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#0: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6494
3 locks held by kworker/u4:2/33:
2 locks held by getty/3298:
#0: ffff888028844098 (&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 kworker/1:7/3611:
#0: ffff888012470938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
#1:
ffffc90004647d20 ((linkwatch_work).work){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
#2: ffffffff8e2991e8 (rtnl_mutex){+.+.}-{3:3}, at: linkwatch_event+0xa/0x50 net/core/link_watch.c:263
4 locks held by kworker/u4:12/14907:
#0: ffff8881432a6138 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
#1: ffffc9000b477d20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
#2: ffff8880474ce0e0 (&type->s_umount_key#60){++++}-{3:3}, at: trylock_super+0x1b/0xf0 fs/super.c:415
#3: ffff88807a4e5140 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_down_write fs/f2fs/f2fs.h:2176 [inline]
#3: ffff88807a4e5140 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_balance_fs+0x4fb/0x6c0 fs/f2fs/segment.c:426
2 locks held by syz-executor.2/28164:
1 lock held by syz-executor.3/1843:
#0:
ffffffff8d12ff38 (rcu_state.exp_mutex){+.+.}-{3:3}
, at: exp_funnel_lock kernel/rcu/tree_exp.h:323 [inline]
, at: synchronize_rcu_expedited+0x360/0x930 kernel/rcu/tree_exp.h:962
2 locks held by syz-executor.2/2570:
#0: ffffffff8e2991e8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:74 [inline]
#0: ffffffff8e2991e8 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x7c1/0xff0 net/core/rtnetlink.c:6118
#1:
ffffffff8d12ff38
(rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:291 [inline]
(rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x4f0/0x930 kernel/rcu/tree_exp.h:962
1 lock held by syz-executor.1/2579:
#0: ffffffff8e2991e8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:74 [inline]
#0: ffffffff8e2991e8 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x7c1/0xff0 net/core/rtnetlink.c:6118
1 lock held by syz-executor.0/2609:
#0: ffffffff8d12fe00 (rcu_state.barrier_mutex){+.+.}-{3:3}, at: rcu_barrier+0x48/0x5f0 kernel/rcu/tree.c:4018
1 lock held by syz-executor.4/2615:
#0: ffffffff8e2991e8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:74 [inline]
#0: ffffffff8e2991e8 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x7c1/0xff0 net/core/rtnetlink.c:6118

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

NMI backtrace for cpu 0
CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.1.83-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/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:307
</TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 6876 Comm: syz-fuzzer Not tainted 6.1.83-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
RIP: 0010:on_stack arch/x86/include/asm/stacktrace.h:56 [inline]
RIP: 0010:stack_access_ok arch/x86/kernel/unwind_orc.c:347 [inline]
RIP: 0010:deref_stack_reg arch/x86/kernel/unwind_orc.c:357 [inline]
RIP: 0010:unwind_next_frame+0xc13/0x2220 arch/x86/kernel/unwind_orc.c:539
Code: 48 89 6c 24 10 49 8d 5c 24 08 49 89 df 49 c1 ef 03 41 80 3c 3f 00 74 08 48 89 df e8 a7 5a a5 00 48 89 5c 24 78 4d 8b 74 24 08 <49> 8d 5c 24 10 48 89 dd 48 c1 ed 03 48 b8 00 00 00 00 00 fc ff df
RSP: 0018:ffffc9000338f000 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffc9000338f0e8 RCX: ffffffff8ed4b89c
RDX: 1ffffffff1ed159c RSI: 0000000000000000 RDI: dffffc0000000000
RBP: ffffffff8f68ace2 R08: 0000000000000001 R09: ffffc9000338f1d0
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffc9000338f0e0
R13: ffffffff8f68ace6 R14: ffffc90003388000 R15: 1ffff92000671e1d
FS: 000000c000168090(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020001000 CR3: 000000001bd35000 CR4: 00000000003526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<NMI>
</NMI>
<TASK>
arch_stack_walk+0x10d/0x140 arch/x86/kernel/stacktrace.c:25
stack_trace_save+0x113/0x1c0 kernel/stacktrace.c:122
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516
____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1724 [inline]
slab_free_freelist_hook mm/slub.c:1750 [inline]
slab_free mm/slub.c:3661 [inline]
kmem_cache_free+0x292/0x510 mm/slub.c:3683
tcp_data_queue+0x1e4/0x6fd0
tcp_rcv_established+0xe63/0x1f00 net/ipv4/tcp_input.c:6028
tcp_v4_do_rcv+0x487/0xb00 net/ipv4/tcp_ipv4.c:1677
sk_backlog_rcv include/net/sock.h:1117 [inline]
__release_sock+0x198/0x4b0 net/core/sock.c:2935
release_sock+0x5d/0x1c0 net/core/sock.c:3499
tcp_recvmsg+0x264/0x920 net/ipv4/tcp.c:2701
inet_recvmsg+0x13b/0x250 net/ipv4/af_inet.c:888
sock_recvmsg_nosec net/socket.c:1022 [inline]
sock_recvmsg net/socket.c:1040 [inline]
sock_read_iter+0x3b2/0x4b0 net/socket.c:1121
call_read_iter include/linux/fs.h:2259 [inline]
new_sync_read fs/read_write.c:389 [inline]
vfs_read+0x7de/0xbe0 fs/read_write.c:470
ksys_read+0x19c/0x2c0 fs/read_write.c:613
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x40720e
Code: 48 83 ec 38 e8 13 00 00 00 48 83 c4 38 5d c3 cc cc cc cc cc cc cc cc cc cc cc cc cc 49 89 f2 48 89 fa 48 89 ce 48 89 df 0f 05 <48> 3d 01 f0 ff ff 76 15 48 f7 d8 48 89 c1 48 c7 c0 ff ff ff ff 48
RSP: 002b:000000c00078f8d8 EFLAGS: 00000202 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000040720e
RDX: 0000000000001000 RSI: 000000c0005b0000 RDI: 0000000000000003
RBP: 000000c00078f918 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 000000c000b91e10
R13: 0000000000000004 R14: 000000c000007a00 R15: 0000000000000006
</TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages