[v6.1] INFO: task hung in f2fs_balance_fs

0 views
Skip to first unread message

syzbot

unread,
Mar 7, 2023, 4:50:36 PM3/7/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 42616e0f09fb Linux 6.1.15
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=134e80dac80000
kernel config: https://syzkaller.appspot.com/x/.config?x=690b9ff41783cd73
dashboard link: https://syzkaller.appspot.com/bug?extid=8bb6c95aba352a8b0f0e
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/db869f2ed2bd/disk-42616e0f.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/37951bbe5829/vmlinux-42616e0f.xz
kernel image: https://storage.googleapis.com/syzbot-assets/23aa1a75ce0f/bzImage-42616e0f.xz

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

INFO: task kworker/u4:6:3770 blocked for more than 143 seconds.
Not tainted 6.1.15-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u4:6 state:D stack:20832 pid:3770 ppid:2 flags:0x00004000
Workqueue: writeback wb_workfn (flush-7:3)
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5238 [inline]
__schedule+0x1376/0x4360 kernel/sched/core.c:6551
schedule+0xbf/0x180 kernel/sched/core.c:6627
rwsem_down_write_slowpath+0xfc7/0x1490 kernel/locking/rwsem.c:1190
f2fs_down_write fs/f2fs/f2fs.h:2205 [inline]
f2fs_balance_fs+0x4fb/0x6c0 fs/f2fs/segment.c:409
f2fs_write_inode+0x4c3/0x540 fs/f2fs/inode.c:753
write_inode fs/fs-writeback.c:1440 [inline]
__writeback_single_inode+0x7f9/0x1540 fs/fs-writeback.c:1652
writeback_sb_inodes+0xc43/0x1b70 fs/fs-writeback.c:1878
__writeback_inodes_wb+0x114/0x400 fs/fs-writeback.c:1949
wb_writeback+0x4fd/0x1020 fs/fs-writeback.c:2054
wb_check_old_data_flush fs/fs-writeback.c:2154 [inline]
wb_do_writeback fs/fs-writeback.c:2207 [inline]
wb_workfn+0xca8/0x10e0 fs/fs-writeback.c:2235
process_one_work+0x8ee/0x1350 kernel/workqueue.c:2289
worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
kthread+0x268/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
INFO: task kworker/u4:8:3889 blocked for more than 144 seconds.
Not tainted 6.1.15-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u4:8 state:D stack:23352 pid:3889 ppid:2 flags:0x00004000
Workqueue: writeback wb_workfn (flush-7:4)
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5238 [inline]
__schedule+0x1376/0x4360 kernel/sched/core.c:6551
schedule+0xbf/0x180 kernel/sched/core.c:6627
rwsem_down_write_slowpath+0xfc7/0x1490 kernel/locking/rwsem.c:1190
f2fs_down_write fs/f2fs/f2fs.h:2205 [inline]
f2fs_balance_fs+0x4fb/0x6c0 fs/f2fs/segment.c:409
f2fs_write_inode+0x4c3/0x540 fs/f2fs/inode.c:753
write_inode fs/fs-writeback.c:1440 [inline]
__writeback_single_inode+0x7f9/0x1540 fs/fs-writeback.c:1652
writeback_sb_inodes+0xc43/0x1b70 fs/fs-writeback.c:1878
__writeback_inodes_wb+0x114/0x400 fs/fs-writeback.c:1949
wb_writeback+0x4fd/0x1020 fs/fs-writeback.c:2054
wb_check_old_data_flush fs/fs-writeback.c:2154 [inline]
wb_do_writeback fs/fs-writeback.c:2207 [inline]
wb_workfn+0xca8/0x10e0 fs/fs-writeback.c:2235
process_one_work+0x8ee/0x1350 kernel/workqueue.c:2289
worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
kthread+0x268/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
INFO: task kworker/u4:11:4056 blocked for more than 146 seconds.
Not tainted 6.1.15-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u4:11 state:D stack:24152 pid:4056 ppid:2 flags:0x00004000
Workqueue: writeback wb_workfn (flush-7:1)
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5238 [inline]
__schedule+0x1376/0x4360 kernel/sched/core.c:6551
schedule+0xbf/0x180 kernel/sched/core.c:6627
rwsem_down_write_slowpath+0xfc7/0x1490 kernel/locking/rwsem.c:1190
f2fs_down_write fs/f2fs/f2fs.h:2205 [inline]
f2fs_balance_fs+0x4fb/0x6c0 fs/f2fs/segment.c:409
f2fs_write_inode+0x4c3/0x540 fs/f2fs/inode.c:753
write_inode fs/fs-writeback.c:1440 [inline]
__writeback_single_inode+0x7f9/0x1540 fs/fs-writeback.c:1652
writeback_sb_inodes+0xc43/0x1b70 fs/fs-writeback.c:1878
__writeback_inodes_wb+0x114/0x400 fs/fs-writeback.c:1949
wb_writeback+0x4fd/0x1020 fs/fs-writeback.c:2054
wb_check_old_data_flush fs/fs-writeback.c:2154 [inline]
wb_do_writeback fs/fs-writeback.c:2207 [inline]
wb_workfn+0xca8/0x10e0 fs/fs-writeback.c:2235
process_one_work+0x8ee/0x1350 kernel/workqueue.c:2289
worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
kthread+0x268/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>

Showing all locks held in the system:
3 locks held by kworker/u4:1/11:
1 lock held by rcu_tasks_kthre/12:
#0: ffffffff8cf267f0 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x26/0xce0 kernel/rcu/tasks.h:507
1 lock held by rcu_tasks_trace/13:
#0: ffffffff8cf26ff0 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x26/0xce0 kernel/rcu/tasks.h:507
1 lock held by khungtaskd/28:
#0: ffffffff8cf26620 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/3313:
#0: ffff888027782098 (&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:2177
4 locks held by kworker/u4:6/3770:
#0: ffff888017bcd938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x77b/0x1350
#1: ffffc9000443fd20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7be/0x1350 kernel/workqueue.c:2264
#2: ffff888077e200e0 (&type->s_umount_key#57){.+.+}-{3:3}, at: trylock_super+0x1b/0xf0 fs/super.c:415
#3: ffff8880761bd140 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_down_write fs/f2fs/f2fs.h:2205 [inline]
#3: ffff8880761bd140 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_balance_fs+0x4fb/0x6c0 fs/f2fs/segment.c:409
4 locks held by kworker/u4:8/3889:
#0: ffff888017bcd938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x77b/0x1350
#1: ffffc900047e7d20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7be/0x1350 kernel/workqueue.c:2264
#2: ffff888040aee0e0 (&type->s_umount_key#57){.+.+}-{3:3}, at: trylock_super+0x1b/0xf0 fs/super.c:415
#3: ffff88807501d140 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_down_write fs/f2fs/f2fs.h:2205 [inline]
#3: ffff88807501d140 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_balance_fs+0x4fb/0x6c0 fs/f2fs/segment.c:409
2 locks held by kworker/u4:10/3983:
4 locks held by kworker/u4:11/4056:
#0: ffff888017bcd938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x77b/0x1350
#1: ffffc9000510fd20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7be/0x1350 kernel/workqueue.c:2264
#2: ffff8880741de0e0 (&type->s_umount_key#57){.+.+}-{3:3}, at: trylock_super+0x1b/0xf0 fs/super.c:415
#3: ffff888076ce1140 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_down_write fs/f2fs/f2fs.h:2205 [inline]
#3: ffff888076ce1140 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_balance_fs+0x4fb/0x6c0 fs/f2fs/segment.c:409
3 locks held by kworker/1:18/6849:
#0: ffff888012064d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x77b/0x1350
#1: ffffc900033efd20 (fqdir_free_work){+.+.}-{0:0}, at: process_one_work+0x7be/0x1350 kernel/workqueue.c:2264
#2: ffffffff8cf2ba40 (rcu_state.barrier_mutex){+.+.}-{3:3}, at: rcu_barrier+0x48/0x5f0 kernel/rcu/tree.c:3953
3 locks held by kworker/1:19/6850:
#0: ffff888012064d38 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x77b/0x1350
#1: ffffc900033ffd20 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x7be/0x1350 kernel/workqueue.c:2264
#2: ffffffff8cf2bb78 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:292 [inline]
#2: ffffffff8cf2bb78 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x3a7/0x890 kernel/rcu/tree_exp.h:946
2 locks held by syz-executor.3/8132:
2 locks held by syz-executor.1/8168:
2 locks held by syz-executor.4/8169:

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

NMI backtrace for cpu 0
CPU: 0 PID: 28 Comm: khungtaskd Not tainted 6.1.15-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/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+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+0xf68/0xfb0 kernel/hung_task.c:377
kthread+0x268/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 3983 Comm: kworker/u4:10 Not tainted 6.1.15-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Workqueue: bat_events batadv_purge_orig
RIP: 0010:cpumask_check include/linux/cpumask.h:117 [inline]
RIP: 0010:cpumask_test_cpu include/linux/cpumask.h:444 [inline]
RIP: 0010:cpu_online include/linux/cpumask.h:1030 [inline]
RIP: 0010:trace_lock_release include/trace/events/lock.h:69 [inline]
RIP: 0010:lock_release+0x88/0xa90 kernel/locking/lockdep.c:5679
Code: 03 48 b8 f1 f1 f1 f1 04 f2 00 f2 4b 89 04 3c 48 b8 f2 f2 00 f3 f3 f3 f3 f3 4b 89 44 3c 08 0f 1f 44 00 00 65 8b 1d 10 d5 97 7e <48> c7 c0 78 80 52 8e 48 c1 e8 03 42 0f b6 04 38 84 c0 0f 85 c3 06
RSP: 0018:ffffc9000488f980 EFLAGS: 00000a06
RAX: f3f3f3f3f300f2f2 RBX: 0000000000000001 RCX: ffff88807de3ba80
RDX: 0000000000000000 RSI: ffffffff8a53ade3 RDI: ffff88804a7d7118
RBP: ffffc9000488fab8 R08: dffffc0000000000 R09: 0000000000000003
R10: ffffffffffffffff R11: dffffc0000000001 R12: 1ffff92000911f3c
R13: ffffffff8a53ade3 R14: ffffffff8a53ade3 R15: dffffc0000000000
FS: 0000000000000000(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055cf985a9000 CR3: 000000004d495000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
__raw_spin_unlock_bh include/linux/spinlock_api_smp.h:165 [inline]
_raw_spin_unlock_bh+0x17/0x30 kernel/locking/spinlock.c:210
spin_unlock_bh include/linux/spinlock.h:395 [inline]
batadv_purge_orig_ref+0x1463/0x1550 net/batman-adv/originator.c:1259
batadv_purge_orig+0x15/0x60 net/batman-adv/originator.c:1272
process_one_work+0x8ee/0x1350 kernel/workqueue.c:2289
worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
kthread+0x268/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</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.

syzbot

unread,
Mar 8, 2023, 8:34:34 AM3/8/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: d9b4a0c83a2d Linux 5.15.98
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1413db7ac80000
kernel config: https://syzkaller.appspot.com/x/.config?x=2f8d9515b973b23b
dashboard link: https://syzkaller.appspot.com/bug?extid=3b1c9adc2b5043073aab
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/037cabbd3313/disk-d9b4a0c8.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/9967e551eb34/vmlinux-d9b4a0c8.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a050c7a4fd99/bzImage-d9b4a0c8.xz

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

INFO: task kworker/u4:17:14733 blocked for more than 143 seconds.
Not tainted 5.15.98-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/u4:17 state:D stack:23224 pid:14733 ppid: 2 flags:0x00004000
Workqueue: writeback wb_workfn (flush-7:1)
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5023 [inline]
__schedule+0x132d/0x45e0 kernel/sched/core.c:6369
schedule+0x11b/0x1f0 kernel/sched/core.c:6452
rwsem_down_write_slowpath+0xf36/0x1610 kernel/locking/rwsem.c:1158
__down_write_common kernel/locking/rwsem.c:1278 [inline]
__down_write kernel/locking/rwsem.c:1287 [inline]
down_write+0x164/0x170 kernel/locking/rwsem.c:1534
f2fs_balance_fs+0x4d4/0x6a0 fs/f2fs/segment.c:529
f2fs_write_inode+0x4c3/0x540 fs/f2fs/inode.c:725
write_inode fs/fs-writeback.c:1475 [inline]
__writeback_single_inode+0x7b4/0x1180 fs/fs-writeback.c:1680
writeback_sb_inodes+0xc14/0x1af0 fs/fs-writeback.c:1905
__writeback_inodes_wb+0x114/0x400 fs/fs-writeback.c:1976
wb_writeback+0x4b1/0xe60 fs/fs-writeback.c:2081
wb_check_old_data_flush fs/fs-writeback.c:2181 [inline]
wb_do_writeback fs/fs-writeback.c:2234 [inline]
wb_workfn+0xc27/0x10d0 fs/fs-writeback.c:2263
process_one_work+0x8e6/0x1230 kernel/workqueue.c:2306
worker_thread+0xaca/0x1280 kernel/workqueue.c:2453
kthread+0x3f6/0x4f0 kernel/kthread.c:319
ret_from_fork+0x1f/0x30 <unknown>:298
</TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
#0: ffffffff8c91c660 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/3273:
#0: ffff888023edc098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
#1: ffffc90002bb32e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1da0 drivers/tty/n_tty.c:2147
4 locks held by kworker/u4:17/14733:
#0: ffff888142bac138 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x78a/0x1230 kernel/workqueue.c:2279
#1: ffffc90004b2fd20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7cd/0x1230 kernel/workqueue.c:2281
#2: ffff88807f2840e0 (&type->s_umount_key#86){++++}-{3:3}, at: trylock_super+0x1b/0xf0 fs/super.c:418
#3: ffff8880491ed108 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_balance_fs+0x4d4/0x6a0 fs/f2fs/segment.c:529
2 locks held by syz-executor.1/20327:

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

NMI backtrace for cpu 1
CPU: 1 PID: 27 Comm: khungtaskd Not tainted 5.15.98-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/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+0xec6/0xf10 kernel/hung_task.c:295
kthread+0x3f6/0x4f0 kernel/kthread.c:319
ret_from_fork+0x1f/0x30 <unknown>:298
</TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 4743 Comm: kworker/0:11 Not tainted 5.15.98-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Workqueue: events nsim_dev_trap_report_work
RIP: 0010:trace_irq_enable_rcuidle+0x19/0x190 include/trace/events/preemptirq.h:40
Code: 12 94 08 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 55 41 57 41 56 53 49 89 f6 48 89 fb e8 bf 8d f9 ff 66 90 e8 b8 8d f9 ff 5b <41> 5e 41 5f 5d c3 65 8b 2d 6a 4e 7b 7e bf 07 00 00 00 89 ee e8 fe
RSP: 0018:ffffc900047e78b0 EFLAGS: 00000093
RAX: ffffffff8186c6d8 RBX: 0000000000000000 RCX: ffff888049b10000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff8a242e6b
RBP: ffffc900047e7980 R08: ffffffff8186c670 R09: fffffbfff22a9412
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: 1ffff920008fcf1c R14: 0000000000000000 R15: 0000000000000246
FS: 0000000000000000(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f37ec9001b8 CR3: 0000000044a12000 CR4: 00000000003526f0
DR0: 00000000ffff070c DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
trace_hardirqs_on+0x57/0x80 kernel/trace/trace_preemptirq.c:44
__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline]
_raw_spin_unlock_irqrestore+0x8b/0x130 kernel/locking/spinlock.c:194
__debug_check_no_obj_freed lib/debugobjects.c:1009 [inline]
debug_check_no_obj_freed+0x58d/0x610 lib/debugobjects.c:1030
slab_free_hook mm/slub.c:1680 [inline]
slab_free_freelist_hook+0x86/0x160 mm/slub.c:1731
slab_free mm/slub.c:3499 [inline]
kfree+0x10c/0x2d0 mm/slub.c:4559
skb_free_head net/core/skbuff.c:655 [inline]
skb_release_data+0x73a/0x8a0 net/core/skbuff.c:677
skb_release_all net/core/skbuff.c:742 [inline]
__kfree_skb net/core/skbuff.c:756 [inline]
consume_skb+0xa3/0x140 net/core/skbuff.c:914
nsim_dev_trap_report drivers/net/netdevsim/dev.c:740 [inline]
nsim_dev_trap_report_work+0x788/0xab0 drivers/net/netdevsim/dev.c:765
process_one_work+0x8e6/0x1230 kernel/workqueue.c:2306
worker_thread+0xaca/0x1280 kernel/workqueue.c:2453
kthread+0x3f6/0x4f0 kernel/kthread.c:319
ret_from_fork+0x1f/0x30 <unknown>:298

syzbot

unread,
May 19, 2023, 1:22:45 AM5/19/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 9d6bde853685 Linux 5.15.112
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1079c186280000
kernel config: https://syzkaller.appspot.com/x/.config?x=a61e8195d8bdf36e
dashboard link: https://syzkaller.appspot.com/bug?extid=3b1c9adc2b5043073aab
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=177a9b31280000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17a2d10e280000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/b65d6c2ec328/disk-9d6bde85.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/cf811ebac37b/vmlinux-9d6bde85.xz
kernel image: https://storage.googleapis.com/syzbot-assets/b2f32fdecf97/bzImage-9d6bde85.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/bea0764dd02c/mount_0.gz

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

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


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

syzbot

unread,
Aug 22, 2023, 11:19:50 AM8/22/23
to syzkaller...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages