[v6.1] INFO: task hung in __f2fs_ioctl

8 views
Skip to first unread message

syzbot

unread,
Jul 9, 2024, 9:47:23 AM7/9/24
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 7753af06eebf Linux 6.1.97
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15ee107e980000
kernel config: https://syzkaller.appspot.com/x/.config?x=8598d0ff7c47577b
dashboard link: https://syzkaller.appspot.com/bug?extid=a7fde87832d320d1104c
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/2ba92bc446d9/disk-7753af06.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/96a956b7234b/vmlinux-7753af06.xz
kernel image: https://storage.googleapis.com/syzbot-assets/eb054c41985f/bzImage-7753af06.xz

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

INFO: task syz.0.600:5777 blocked for more than 143 seconds.
Not tainted 6.1.97-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.0.600 state:D stack:27576 pid:5777 ppid:3554 flags:0x00004004
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
inode_lock include/linux/fs.h:758 [inline]
f2fs_ioc_commit_atomic_write fs/f2fs/file.c:2172 [inline]
__f2fs_ioctl+0x3341/0xc2a0 fs/f2fs/file.c:4225
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:870 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:856
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:0x7fca39b75bd9
RSP: 002b:00007fca3a8fc048 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fca39d04110 RCX: 00007fca39b75bd9
RDX: 0000000000000000 RSI: 000000000000f502 RDI: 0000000000000004
RBP: 00007fca39be4e60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007fca39d04110 R15: 00007fff7a05f478
</TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
#0: ffffffff8d12aed0 (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: ffffffff8d12b6d0 (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: ffffffff8d12ad00 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
#0: ffffffff8d12ad00 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
#0: ffffffff8d12ad00 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6494
2 locks held by getty/3312:
#0: ffff888028b94098 (&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:2198
2 locks held by kworker/0:4/3594:
#0: ffff888012472138 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
#1: ffffc900046afd20 ((work_completion)(&rew->rew_work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
4 locks held by kworker/u4:6/3638:
#0: ffff888144647938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
#1: ffffc900048a7d20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
#2: ffff888026f520e0 (&type->s_umount_key#50){++++}-{3:3}, at: trylock_super+0x1b/0xf0 fs/super.c:415
#3: ffff8880639f5140 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_down_write fs/f2fs/f2fs.h:2176 [inline]
#3: ffff8880639f5140 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_balance_fs+0x4fb/0x6c0 fs/f2fs/segment.c:428
3 locks held by kworker/0:12/3718:
#0: ffff888012470938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
#1: ffffc90004a17d20 (key_gc_work){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
#2: ffffffff8d1302f8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:291 [inline]
#2: ffffffff8d1302f8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x4f0/0x930 kernel/rcu/tree_exp.h:962
2 locks held by syz.0.600/5774:
#0: ffff888026f52460 (sb_writers#12){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:393
#1: ffff88805d97e2f0 (&sb->s_type->i_mutex_key#25){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline]
#1: ffff88805d97e2f0 (&sb->s_type->i_mutex_key#25){+.+.}-{3:3}, at: do_truncate+0x208/0x300 fs/open.c:63
2 locks held by syz.0.600/5777:
#0: ffff888026f52460 (sb_writers#12){.+.+}-{0:0}, at: mnt_want_write_file+0x5a/0x1f0 fs/namespace.c:437
#1: ffff88805d97e2f0 (&sb->s_type->i_mutex_key#25){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline]
#1: ffff88805d97e2f0 (&sb->s_type->i_mutex_key#25){+.+.}-{3:3}, at: f2fs_ioc_commit_atomic_write fs/f2fs/file.c:2172 [inline]
#1: ffff88805d97e2f0 (&sb->s_type->i_mutex_key#25){+.+.}-{3:3}, at: __f2fs_ioctl+0x3341/0xc2a0 fs/f2fs/file.c:4225
5 locks held by syz.0.600/5779:
1 lock held by syz.3.1285/7970:
#0: ffffffff8d1301c0 (rcu_state.barrier_mutex){+.+.}-{3:3}, at: rcu_barrier+0x48/0x5f0 kernel/rcu/tree.c:4018

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

NMI backtrace for cpu 1
CPU: 1 PID: 28 Comm: khungtaskd Not tainted 6.1.97-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/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: 3988 Comm: kworker/u4:9 Not tainted 6.1.97-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Workqueue: bat_events batadv_nc_worker
RIP: 0010:check_preemption_disabled+0x63/0x110 lib/smp_processor_id.c:19
Code: 44 24 08 0f 85 c7 00 00 00 89 d8 48 83 c4 10 5b 41 5c 41 5e 41 5f c3 48 c7 04 24 00 00 00 00 9c 8f 04 24 f7 04 24 00 02 00 00 <74> c9 49 89 f6 49 89 ff 65 4c 8b 25 ed 2c 77 75 41 f6 44 24 2f 04
RSP: 0018:ffffc90009dc7a48 EFLAGS: 00000046
RAX: 0000000080000000 RBX: 0000000000000000 RCX: 1ffff920013b8efc
RDX: dffffc0000000000 RSI: ffffffff8aec13c0 RDI: ffffffff8b3d4760
RBP: ffffc90009dc7be0 R08: dffffc0000000000 R09: fffffbfff2093845
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff920013b8f58
R13: dffffc0000000000 R14: 0000000000000000 R15: 0000000000000246
FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f53160ce2d8 CR3: 000000007c8cf000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<NMI>
</NMI>
<TASK>
lockdep_recursion_finish kernel/locking/lockdep.c:467 [inline]
lock_acquire+0x208/0x5a0 kernel/locking/lockdep.c:5664
rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
rcu_read_lock include/linux/rcupdate.h:791 [inline]
batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:408 [inline]
batadv_nc_worker+0xe8/0x610 net/batman-adv/network-coding.c:719
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>


---
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

syzbot

unread,
Oct 17, 2024, 9:48:24 AM10/17/24
to syzkaller...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.

syzbot

unread,
Oct 19, 2024, 12:51:32 AM10/19/24
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 584a40a22cb9 Linux 5.15.168
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13cc1f27980000
kernel config: https://syzkaller.appspot.com/x/.config?x=afb077b44202210c
dashboard link: https://syzkaller.appspot.com/bug?extid=82b67bbee72f6aeec4eb
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/efb306d086fc/disk-584a40a2.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/4ce735bbc902/vmlinux-584a40a2.xz
kernel image: https://storage.googleapis.com/syzbot-assets/ca277f48b364/bzImage-584a40a2.xz

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

INFO: task syz.4.1739:11226 blocked for more than 143 seconds.
Not tainted 5.15.168-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.4.1739 state:D stack:27808 pid:11226 ppid: 10186 flags:0x00004004
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5027 [inline]
__schedule+0x12c4/0x45b0 kernel/sched/core.c:6373
schedule+0x11b/0x1f0 kernel/sched/core.c:6456
rwsem_down_write_slowpath+0xf0c/0x16a0 kernel/locking/rwsem.c:1165
f2fs_ioc_gc fs/f2fs/file.c:2490 [inline]
__f2fs_ioctl+0x4a8b/0xca00 fs/f2fs/file.c:4230
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f2ef5d01ff9
RSP: 002b:00007f2ef4138038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f2ef5eba130 RCX: 00007f2ef5d01ff9
RDX: 0000000020000100 RSI: 000000004004f506 RDI: 0000000000000006
RBP: 00007f2ef5d74296 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000001 R14: 00007f2ef5eba130 R15: 00007ffc98e704c8
</TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
#0: ffffffff8c91fc20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
1 lock held by udevd/3028:
2 locks held by getty/3325:
#0: ffff8880293c2098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
#1: ffffc900024a62e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1db0 drivers/tty/n_tty.c:2158
2 locks held by kworker/u4:8/3681:
#0: ffff8880b903a318 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475
#1: ffff8880b9027848 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x53d/0x810 kernel/sched/psi.c:891
2 locks held by kworker/1:9/6027:
#0: ffff888017072138 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
#1: ffffc90002dc7d20 ((work_completion)(&rew.rew_work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
4 locks held by kworker/u4:10/9756:
#0: ffff8880199d9138 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
#1: ffffc90002ea7d20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
#2: ffff8880639a60e0 (&type->s_umount_key#66){++++}-{3:3}, at: trylock_super+0x1b/0xf0 fs/super.c:418
#3: ffff88807636d1b0 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_balance_fs+0x4d4/0x6a0 fs/f2fs/segment.c:528
4 locks held by syz.4.1739/11225:
2 locks held by syz.4.1739/11226:
#0: ffff8880639a6460 (sb_writers#17){.+.+}-{0:0}, at: mnt_want_write_file+0x5a/0x1f0 fs/namespace.c:421
#1: ffff88807636d1b0 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_ioc_gc fs/f2fs/file.c:2490 [inline]
#1: ffff88807636d1b0 (&sbi->gc_lock){+.+.}-{3:3}, at: __f2fs_ioctl+0x4a8b/0xca00 fs/f2fs/file.c:4230
1 lock held by syz-executor/12487:
#0: ffffffff8c9241e8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:290 [inline]
#0: ffffffff8c9241e8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x280/0x740 kernel/rcu/tree_exp.h:845
2 locks held by syz.3.2157/13030:
#0: ffff8880208c0518 (&disk->open_mutex){+.+.}-{3:3}, at: blkdev_put+0xfb/0x790 block/bdev.c:912
#1: ffff888147ada468 (&lo->lo_mutex){+.+.}-{3:3}, at: lo_release+0x4d/0x1f0 drivers/block/loop.c:2070

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

NMI backtrace for cpu 1
CPU: 1 PID: 27 Comm: khungtaskd Not tainted 5.15.168-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2d0 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:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
</TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0 skipped: idling at native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
NMI backtrace for cpu 0 skipped: idling at arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
NMI backtrace for cpu 0 skipped: idling at acpi_safe_halt drivers/acpi/processor_idle.c:108 [inline]
NMI backtrace for cpu 0 skipped: idling at acpi_idle_do_entry+0x10f/0x340 drivers/acpi/processor_idle.c:562

syzbot

unread,
Jan 26, 2025, 11:51:17 PM1/26/25
to syzkaller...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages