[v6.1] INFO: task hung in start_transaction

0 views
Skip to first unread message

syzbot

unread,
Mar 31, 2024, 6:14:23 AMMar 31
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=13d22f45180000
kernel config: https://syzkaller.appspot.com/x/.config?x=99d0cbbc2b2c7cfd
dashboard link: https://syzkaller.appspot.com/bug?extid=afafcee6a1b6d4e6587a
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+afafce...@syzkaller.appspotmail.com

INFO: task kworker/u4:4:57 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:4 state:D stack:20344 pid:57 ppid:2 flags:0x00004000
Workqueue: btrfs-qgroup-rescan btrfs_work_helper
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
wait_current_trans+0x33a/0x4b0 fs/btrfs/transaction.c:515
start_transaction+0xb0f/0x1240 fs/btrfs/transaction.c:662
btrfs_qgroup_rescan_worker+0x1636/0x1ac0 fs/btrfs/qgroup.c:3437
btrfs_work_helper+0x3ae/0xcf0 fs/btrfs/async-thread.c:280
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>
INFO: task kworker/u4:7:4765 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:7 state:D stack:21528 pid:4765 ppid:2 flags:0x00004000
Workqueue: writeback wb_workfn (flush-btrfs-3)
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
wait_on_state fs/btrfs/extent-io-tree.c:709 [inline]
wait_extent_bit+0x423/0x570 fs/btrfs/extent-io-tree.c:742
lock_extent+0x17a/0x200 fs/btrfs/extent-io-tree.c:1657
btrfs_invalidate_folio+0x444/0xfa0 fs/btrfs/inode.c:8406
__extent_writepage+0x5d8/0x1730 fs/btrfs/extent_io.c:2266
extent_write_cache_pages fs/btrfs/extent_io.c:3196 [inline]
extent_writepages+0xbe0/0x17a0 fs/btrfs/extent_io.c:3318
do_writepages+0x3a2/0x670 mm/page-writeback.c:2469
__writeback_single_inode+0x15d/0x11e0 fs/fs-writeback.c:1612
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:307
</TASK>
INFO: task syz-executor.2:4936 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:syz-executor.2 state:D stack:22488 pid:4936 ppid:3577 flags:0x00004006
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
try_to_writeback_inodes_sb+0x94/0xb0 fs/fs-writeback.c:2701
btrfs_start_delalloc_flush fs/btrfs/transaction.c:2099 [inline]
btrfs_commit_transaction+0xb2f/0x3c70 fs/btrfs/transaction.c:2279
btrfs_sync_file+0xc60/0x1100 fs/btrfs/file.c:2000
generic_write_sync include/linux/fs.h:2957 [inline]
btrfs_do_write_iter+0xd74/0x12f0 fs/btrfs/file.c:1685
do_iter_write+0x6e6/0xc50 fs/read_write.c:861
vfs_writev fs/read_write.c:934 [inline]
do_pwritev+0x216/0x360 fs/read_write.c:1031
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:0x7f65f727dda9
RSP: 002b:00007f65f80220c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000148
RAX: ffffffffffffffda RBX: 00007f65f73abf80 RCX: 00007f65f727dda9
RDX: 0000000000000001 RSI: 0000000020000500 RDI: 0000000000000005
RBP: 00007f65f72ca47a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f65f73abf80 R15: 00007ffc3c86d1c8
</TASK>
INFO: task syz-executor.2:4970 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:syz-executor.2 state:D stack:25432 pid:4970 ppid:3577 flags:0x00004006
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
wait_current_trans+0x33a/0x4b0 fs/btrfs/transaction.c:515
start_transaction+0xb0f/0x1240 fs/btrfs/transaction.c:662
clone_copy_inline_extent fs/btrfs/reflink.c:290 [inline]
btrfs_clone+0x17ab/0x2a00 fs/btrfs/reflink.c:524
btrfs_clone_files+0x329/0x400 fs/btrfs/reflink.c:766
btrfs_remap_file_range+0x573/0xe80 fs/btrfs/reflink.c:904
vfs_copy_file_range+0x11b1/0x1630 fs/read_write.c:1518
__do_sys_copy_file_range fs/read_write.c:1596 [inline]
__se_sys_copy_file_range+0x3ea/0x5d0 fs/read_write.c:1559
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:0x7f65f727dda9
RSP: 002b:00007f65f80010c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000146
RAX: ffffffffffffffda RBX: 00007f65f73ac050 RCX: 00007f65f727dda9
RDX: 0000000000000005 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00007f65f72ca47a R08: 0000000000000009 R09: 0000000000000000
R10: 0000000020000640 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007f65f73ac050 R15: 00007ffc3c86d1c8
</TASK>

Showing all locks held in the system:
2 locks held by kworker/u4:1/11:
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
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:4/57:
#0: ffff888023023138 ((wq_completion)btrfs-qgroup-rescan){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
#1: ffffc90001587d20 ((work_completion)(&work->normal_work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
#2: ffff88805b8ee650 (sb_internal#3){.+.+}-{0:0}, at: btrfs_qgroup_rescan_worker+0x1636/0x1ac0 fs/btrfs/qgroup.c:3437
2 locks held by udevd/3002:
2 locks held by getty/3306:
#0: ffff8880288a2098 (&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
5 locks held by kworker/u4:5/3623:
#0: ffff888012616938 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
#1: ffffc90004ad7d20 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
#2: ffffffff8e28cf90 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0xf1/0xb60 net/core/net_namespace.c:563
#3: ffffffff8e2991e8 (rtnl_mutex){+.+.}-{3:3}, at: ip_tunnel_delete_nets+0xc9/0x330 net/ipv4/ip_tunnel.c:1148
#4: ffffffff8d12ff38 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:291 [inline]
#4: ffffffff8d12ff38 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x4f0/0x930 kernel/rcu/tree_exp.h:962
3 locks held by kworker/0:14/3827:
2 locks held by kworker/u4:7/4765:
#0: ffff888142efd138 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
#1: ffffc9000324fd20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
5 locks held by syz-executor.2/4936:
#0: ffff88805b8ee460 (sb_writers#14){.+.+}-{0:0}, at: vfs_writev fs/read_write.c:933 [inline]
#0: ffff88805b8ee460 (sb_writers#14){.+.+}-{0:0}, at: do_pwritev+0x1fa/0x360 fs/read_write.c:1031
#1: ffff88805b8ee650 (sb_internal#3){.+.+}-{0:0}, at: btrfs_sync_file+0xa56/0x1100 fs/btrfs/file.c:1919
#2: ffff88805be56328 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x193/0xd40 fs/btrfs/transaction.c:300
#3: ffff88805be56350 (btrfs_trans_num_extwriters){++++}-{0:0}, at: join_transaction+0x193/0xd40 fs/btrfs/transaction.c:300
#4: ffff88805b8ee0e0 (&type->s_umount_key#52){++++}-{3:3}, at: try_to_writeback_inodes_sb+0x1d/0xb0 fs/fs-writeback.c:2698
4 locks held by syz-executor.2/4970:
#0: ffff88805b8ee460 (sb_writers#14){.+.+}-{0:0}, at: vfs_copy_file_range+0x981/0x1630 fs/read_write.c:1502
#1: ffff888057e985e0 (&sb->s_type->i_mutex_key#22){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline]
#1: ffff888057e985e0 (&sb->s_type->i_mutex_key#22){+.+.}-{3:3}, at: btrfs_inode_lock+0x49/0xd0 fs/btrfs/inode.c:155
#2: ffff888057e98468 (&ei->i_mmap_lock){+.+.}-{3:3}, at: btrfs_inode_lock+0xc1/0xd0 fs/btrfs/inode.c:158
#3: ffff88805b8ee650 (sb_internal#3){.+.+}-{0:0}, at: clone_copy_inline_extent fs/btrfs/reflink.c:290 [inline]
#3: ffff88805b8ee650 (sb_internal#3){.+.+}-{0:0}, at: btrfs_clone+0x17ab/0x2a00 fs/btrfs/reflink.c:524
1 lock held by btrfs-transacti/4968:
#0: ffff88805be547e0 (&fs_info->transaction_kthread_mutex){+.+.}-{3:3}, at: transaction_kthread+0x100/0x4c0 fs/btrfs/disk-io.c:1898
1 lock held by syz-executor.2/5091:
2 locks held by kworker/u4:10/7430:
#0: ffff888012479138 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
#1: ffffc9000e75fd20 ((reaper_work).work){+.+.}-{0:0}, at: process_one_work+0x7a9/0x11d0 kernel/workqueue.c:2267
1 lock held by udevadm/8756:
6 locks held by syz-executor.1/8758:
2 locks held by syz-executor.4/8775:

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

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 03/27/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: 8775 Comm: syz-executor.4 Not tainted 6.1.83-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:io_serial_out+0x7a/0xb0 drivers/tty/serial/8250/8250_port.c:468
Code: fc 89 e9 41 d3 e7 48 83 c3 40 48 89 d8 48 c1 e8 03 42 80 3c 20 00 74 08 48 89 df e8 d0 02 31 fd 44 03 3b 44 89 f0 44 89 fa ee <5b> 41 5c 41 5e 41 5f 5d c3 89 e9 80 e1 07 38 c1 7c ab 48 89 ef e8
RSP: 0018:ffffc90012b2ea30 EFLAGS: 00000002
RAX: 000000000000005b RBX: ffffffff920184a0 RCX: 0000000000000000
RDX: 00000000000003f8 RSI: 0000000000012044 RDI: 0000000000012045
RBP: 0000000000000000 R08: ffffffff84b0f767 R09: ffffed1003ea8047
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: 0000000000000001 R14: 000000000000005b R15: 00000000000003f8
FS: 00007fdb558926c0(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fdb4b23e000 CR3: 000000005b2da000 CR4: 00000000003526e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<NMI>
</NMI>
<TASK>
serial8250_console_write+0x11d2/0x1750 drivers/tty/serial/8250/8250_port.c:3451
call_console_driver kernel/printk/printk.c:1971 [inline]
console_emit_next_record+0xbb4/0x1000 kernel/printk/printk.c:2771
console_unlock+0x278/0x7c0 kernel/printk/printk.c:2900
vprintk_emit+0x523/0x740 kernel/printk/printk.c:2297
_printk+0xd1/0x111 kernel/printk/printk.c:2322
set_capacity_and_notify+0x2b0/0x340 block/genhd.c:91
loop_set_size+0x44/0xa0 drivers/block/loop.c:235
loop_configure+0xd1d/0x1270 drivers/block/loop.c:1098
lo_ioctl+0x882/0x2010
blkdev_ioctl+0x3a9/0x760 block/ioctl.c:618
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+0x3d/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fdb54a7db0b
Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00
RSP: 002b:00007fdb55891e50 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007fdb54a7db0b
RDX: 0000000000000003 RSI: 0000000000004c00 RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000000000000 R09: 000000000000046c
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003
R13: 00007fdb55891f80 R14: 00007fdb55891f40 R15: 00007fdb4b1ff000
</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