syzbot


INFO: task hung in btrfs_commit_transaction (2)

Status: auto-obsoleted due to no activity on 2025/04/17 20:17
Subsystems: btrfs
[Documentation on labels]
First crash: 181d, last: 181d
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in btrfs_commit_transaction btrfs 1 6 434d 596d 0/29 auto-obsoleted due to no activity on 2024/08/07 22:30

Sample crash report:
INFO: task syz.5.176:10049 blocked for more than 143 seconds.
      Not tainted 6.13.0-rc7-syzkaller-00149-g9bffa1ad25b8 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.5.176       state:D stack:24128 pid:10049 tgid:10049 ppid:5977   flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5369 [inline]
 __schedule+0x17fb/0x4be0 kernel/sched/core.c:6756
 __schedule_loop kernel/sched/core.c:6833 [inline]
 schedule+0x14b/0x320 kernel/sched/core.c:6848
 btrfs_commit_transaction+0x9b8/0x3720 fs/btrfs/transaction.c:2322
 flush_space+0x19c/0xcf0 fs/btrfs/space-info.c:835
 priority_reclaim_metadata_space+0xe6/0x5b0 fs/btrfs/space-info.c:1428
 __reserve_bytes+0xbd3/0x1950 fs/btrfs/space-info.c:1772
 btrfs_reserve_metadata_bytes+0x2e/0x110 fs/btrfs/space-info.c:1798
 btrfs_block_rsv_refill+0xd8/0x1b0 fs/btrfs/block-rsv.c:264
 evict_refill_and_join+0xcf/0x210 fs/btrfs/inode.c:5244
 btrfs_evict_inode+0xa47/0x1080 fs/btrfs/inode.c:5339
 evict+0x4e8/0x9a0 fs/inode.c:796
 __dentry_kill+0x20d/0x630 fs/dcache.c:625
 dput+0x19f/0x2b0 fs/dcache.c:867
 __fput+0x5ba/0xa50 fs/file_table.c:458
 task_work_run+0x24f/0x310 kernel/task_work.c:239
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0x13f/0x340 kernel/entry/common.c:218
 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fd758785d29
RSP: 002b:00007ffd6fd8a918 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00007fd758977ba0 RCX: 00007fd758785d29
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 00007fd758977ba0 R08: 000000000000009c R09: 00007ffd6fd8ac0f
R10: 00007fd758977ac0 R11: 0000000000000246 R12: 000000000002cad4
R13: 00007ffd6fd8aa20 R14: 0000000000000032 R15: ffffffffffffffff
 </TASK>
INFO: task syz.5.176:10136 blocked for more than 144 seconds.
      Not tainted 6.13.0-rc7-syzkaller-00149-g9bffa1ad25b8 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.5.176       state:D stack:21984 pid:10136 tgid:10049 ppid:5977   flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5369 [inline]
 __schedule+0x17fb/0x4be0 kernel/sched/core.c:6756
 __schedule_loop kernel/sched/core.c:6833 [inline]
 schedule+0x14b/0x320 kernel/sched/core.c:6848
 __wait_on_freeing_inode+0x1c7/0x2f0 fs/inode.c:2502
 find_inode+0x29e/0x480 fs/inode.c:1062
 iget5_locked_rcu+0xa0/0x1c0 fs/inode.c:1435
 btrfs_iget_locked fs/btrfs/inode.c:5571 [inline]
 btrfs_iget+0x167/0x2b0 fs/btrfs/inode.c:5611
 btrfs_iget_logging fs/btrfs/tree-log.c:154 [inline]
 add_conflicting_inode fs/btrfs/tree-log.c:5680 [inline]
 copy_inode_items_to_log fs/btrfs/tree-log.c:5950 [inline]
 btrfs_log_inode+0x22bb/0x4700 fs/btrfs/tree-log.c:6612
 log_conflicting_inodes fs/btrfs/tree-log.c:5866 [inline]
 btrfs_log_inode+0xf5b/0x4700 fs/btrfs/tree-log.c:6734
 btrfs_log_inode_parent+0xb3e/0x1160 fs/btrfs/tree-log.c:7105
 btrfs_log_new_name+0x6f9/0xb30 fs/btrfs/tree-log.c:7629
 btrfs_rename_exchange fs/btrfs/inode.c:8092 [inline]
 btrfs_rename2+0x1382/0x2b90 fs/btrfs/inode.c:8374
 vfs_rename+0xbdb/0xf00 fs/namei.c:5067
 do_renameat2+0xd94/0x13f0 fs/namei.c:5224
 __do_sys_renameat2 fs/namei.c:5258 [inline]
 __se_sys_renameat2 fs/namei.c:5255 [inline]
 __x64_sys_renameat2+0xce/0xe0 fs/namei.c:5255
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fd758785d29
RSP: 002b:00007fd759578038 EFLAGS: 00000246 ORIG_RAX: 000000000000013c
RAX: ffffffffffffffda RBX: 00007fd758976080 RCX: 00007fd758785d29
RDX: ffffffffffffff9c RSI: 0000000020000080 RDI: ffffffffffffff9c
RBP: 00007fd758801b08 R08: 0000000000000002 R09: 0000000000000000
R10: 0000000020001240 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000001 R14: 00007fd758976080 R15: 00007ffd6fd8a7b8
 </TASK>
INFO: task btrfs-transacti:10121 blocked for more than 144 seconds.
      Not tainted 6.13.0-rc7-syzkaller-00149-g9bffa1ad25b8 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:btrfs-transacti state:D stack:28816 pid:10121 tgid:10121 ppid:2      flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5369 [inline]
 __schedule+0x17fb/0x4be0 kernel/sched/core.c:6756
 __schedule_loop kernel/sched/core.c:6833 [inline]
 schedule+0x14b/0x320 kernel/sched/core.c:6848
 wait_current_trans+0x343/0x4b0 fs/btrfs/transaction.c:524
 start_transaction+0xb15/0x1670 fs/btrfs/transaction.c:699
 transaction_kthread+0x231/0x500 fs/btrfs/disk-io.c:1594
 kthread+0x2f0/0x390 kernel/kthread.c:389
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>

Showing all locks held in the system:
3 locks held by kworker/u8:1/12:
 #0: ffff88814d4fd148 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3211 [inline]
 #0: ffff88814d4fd148 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3317
 #1: ffffc90000117d00 ((work_completion)(&(&ifa->dad_work)->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3212 [inline]
 #1: ffffc90000117d00 ((work_completion)(&(&ifa->dad_work)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3317
 #2: ffffffff8fca0c88 (rtnl_mutex){+.+.}-{4:4}, at: addrconf_dad_work+0xd0/0x16f0 net/ipv6/addrconf.c:4215
1 lock held by khungtaskd/30:
 #0: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
 #0: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
 #0: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6744
2 locks held by kworker/u8:2/35:
 #0: ffff88801ac89148 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3211 [inline]
 #0: ffff88801ac89148 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3317
 #1: ffffc90000ab7d00 (connector_reaper_work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3212 [inline]
 #1: ffffc90000ab7d00 (connector_reaper_work){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3317
2 locks held by kworker/u8:3/53:
 #0: ffff88801ac89148 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3211 [inline]
 #0: ffff88801ac89148 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3317
 #1: ffffc90000bd7d00 ((reaper_work).work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3212 [inline]
 #1: ffffc90000bd7d00 ((reaper_work).work){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3317
2 locks held by getty/5571:
 #0: ffff888031d8d0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: ffffc90002ff62f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x6a6/0x1e00 drivers/tty/n_tty.c:2211
3 locks held by kworker/u8:8/5882:
 #0: ffff88801ac89148 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3211 [inline]
 #0: ffff88801ac89148 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_scheduled_works+0x93b/0x1840 kernel/workqueue.c:3317
 #1: ffffc900042a7d00 ((linkwatch_work).work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3212 [inline]
 #1: ffffc900042a7d00 ((linkwatch_work).work){+.+.}-{0:0}, at: process_scheduled_works+0x976/0x1840 kernel/workqueue.c:3317
 #2: ffffffff8fca0c88 (rtnl_mutex){+.+.}-{4:4}, at: linkwatch_event+0xe/0x60 net/core/link_watch.c:285
2 locks held by kworker/u8:9/5883:
1 lock held by syz.5.176/10049:
 #0: ffff888070ffe470 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x405/0xda0 fs/btrfs/transaction.c:288
10 locks held by syz.5.176/10136:
 #0: ffff8880342b6420 (sb_writers#13){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:516
 #1: ffff8880342b6730 (&type->s_vfs_rename_key#2){+.+.}-{4:4}, at: lock_rename fs/namei.c:3219 [inline]
 #1: ffff8880342b6730 (&type->s_vfs_rename_key#2){+.+.}-{4:4}, at: do_renameat2+0x5cf/0x13f0 fs/namei.c:5159
 #2: ffff888059484a28 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:853 [inline]
 #2: ffff888059484a28 (&type->i_mutex_dir_key#8/1){+.+.}-{4:4}, at: lock_two_directories+0x1a8/0x220 fs/namei.c:3195
 #3: ffff888059483030 (&type->i_mutex_dir_key#8/5){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:853 [inline]
 #3: ffff888059483030 (&type->i_mutex_dir_key#8/5){+.+.}-{4:4}, at: lock_two_directories+0x1d1/0x220 fs/namei.c:3196
 #4: ffff888059481638 (&sb->s_type->i_mutex_key#31){++++}-{4:4}, at: inode_lock include/linux/fs.h:818 [inline]
 #4: ffff888059481638 (&sb->s_type->i_mutex_key#31){++++}-{4:4}, at: lock_two_nondirectories+0xe1/0x170 fs/inode.c:1281
 #5: ffff88805ab5ecc8 (&sb->s_type->i_mutex_key#31/4){+.+.}-{4:4}, at: vfs_rename+0x6a2/0xf00 fs/namei.c:5038
 #6: ffff8880342b6610 (sb_internal#2){.+.+}-{0:0}, at: btrfs_rename_exchange fs/btrfs/inode.c:7959 [inline]
 #6: ffff8880342b6610 (sb_internal#2){.+.+}-{0:0}, at: btrfs_rename2+0x722/0x2b90 fs/btrfs/inode.c:8374
 #7: ffff888070ffe470 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x405/0xda0 fs/btrfs/transaction.c:288
 #8: ffff888070ffe498 (btrfs_trans_num_extwriters){++++}-{0:0}, at: join_transaction+0x405/0xda0 fs/btrfs/transaction.c:288
 #9: ffff8880594812c0 (&ei->log_mutex){+.+.}-{4:4}, at: btrfs_log_inode+0x4cd/0x4700 fs/btrfs/tree-log.c:6501
1 lock held by btrfs-transacti/10121:
 #0: ffff888070ffc7c0 (&fs_info->transaction_kthread_mutex){+.+.}-{4:4}, at: transaction_kthread+0x100/0x500 fs/btrfs/disk-io.c:1571
1 lock held by syz.7.208/11200:
 #0: ffff8880342b60e0 (&type->s_umount_key#51){++++}-{4:4}, at: __super_lock fs/super.c:58 [inline]
 #0: ffff8880342b60e0 (&type->s_umount_key#51){++++}-{4:4}, at: super_lock+0x27c/0x400 fs/super.c:120
1 lock held by syz.9.309/13321:
 #0: ffff8880342b60e0 (&type->s_umount_key#51){++++}-{4:4}, at: __super_lock fs/super.c:58 [inline]
 #0: ffff8880342b60e0 (&type->s_umount_key#51){++++}-{4:4}, at: super_lock+0x27c/0x400 fs/super.c:120
1 lock held by syz.9.309/13326:
 #0: ffff8880342b60e0 (&type->s_umount_key#51){++++}-{4:4}, at: __super_lock fs/super.c:58 [inline]
 #0: ffff8880342b60e0 (&type->s_umount_key#51){++++}-{4:4}, at: super_lock+0x27c/0x400 fs/super.c:120
1 lock held by syz.6.388/15601:
 #0: ffff8880342b60e0 (&type->s_umount_key#51){++++}-{4:4}, at: __super_lock fs/super.c:58 [inline]
 #0: ffff8880342b60e0 (&type->s_umount_key#51){++++}-{4:4}, at: super_lock+0x27c/0x400 fs/super.c:120
1 lock held by syz.6.388/15602:
 #0: ffff8880342b60e0 (&type->s_umount_key#51){++++}-{4:4}, at: __super_lock fs/super.c:58 [inline]
 #0: ffff8880342b60e0 (&type->s_umount_key#51){++++}-{4:4}, at: super_lock+0x27c/0x400 fs/super.c:120
1 lock held by syz-executor/15905:
 #0: ffffffff8fca0c88 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_net_lock include/linux/rtnetlink.h:128 [inline]
 #0: ffffffff8fca0c88 (rtnl_mutex){+.+.}-{4:4}, at: inet_rtm_newaddr+0x47e/0x1bd0 net/ipv4/devinet.c:987
8 locks held by syz-executor/15918:
 #0: ffff888035ba4420 (sb_writers#8){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2964 [inline]
 #0: ffff888035ba4420 (sb_writers#8){.+.+}-{0:0}, at: vfs_write+0x225/0xd30 fs/read_write.c:675
 #1: ffff8880618c5088 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x1ea/0x500 fs/kernfs/file.c:325
 #2: ffff888027b3da58 (kn->active#49){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x20e/0x500 fs/kernfs/file.c:326
 #3: ffffffff8f54c6c8 (nsim_bus_dev_list_lock){+.+.}-{4:4}, at: del_device_store+0xfc/0x480 drivers/net/netdevsim/bus.c:216
 #4: ffff888070de10e8 (&dev->mutex){....}-{4:4}, at: device_lock include/linux/device.h:1014 [inline]
 #4: ffff888070de10e8 (&dev->mutex){....}-{4:4}, at: __device_driver_lock drivers/base/dd.c:1095 [inline]
 #4: ffff888070de10e8 (&dev->mutex){....}-{4:4}, at: device_release_driver_internal+0xce/0x7c0 drivers/base/dd.c:1293
 #5: ffff888070de0250 (&devlink->lock_key#8){+.+.}-{4:4}, at: nsim_drv_remove+0x50/0x160 drivers/net/netdevsim/dev.c:1675
 #6: ffffffff8fca0c88 (rtnl_mutex){+.+.}-{4:4}, at: nsim_destroy+0x71/0x5c0 drivers/net/netdevsim/netdev.c:816
 #7: ffffffff8e93cff8 (rcu_state.exp_mutex){+.+.}-{4:4}, at: exp_funnel_lock kernel/rcu/tree_exp.h:297 [inline]
 #7: ffffffff8e93cff8 (rcu_state.exp_mutex){+.+.}-{4:4}, at: synchronize_rcu_expedited+0x381/0x830 kernel/rcu/tree_exp.h:976
5 locks held by syz.4.457/17159:

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

NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 30 Comm: khungtaskd Not tainted 6.13.0-rc7-syzkaller-00149-g9bffa1ad25b8 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
 nmi_cpu_backtrace+0x49c/0x4d0 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x198/0x320 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:162 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:234 [inline]
 watchdog+0xff6/0x1040 kernel/hung_task.c:397
 kthread+0x2f0/0x390 kernel/kthread.c:389
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 24 Comm: ksoftirqd/1 Not tainted 6.13.0-rc7-syzkaller-00149-g9bffa1ad25b8 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
RIP: 0010:stack_trace_consume_entry+0x6a/0x280 kernel/stacktrace.c:89
Code: 89 ec 49 c1 ec 03 41 0f b6 04 14 84 c0 0f 85 1a 01 00 00 44 3b 45 00 73 3c 48 8d 7b 0c 49 89 fd 49 c1 ed 03 41 0f b6 44 15 00 <84> c0 0f 85 36 01 00 00 44 8b 37 45 85 f6 74 22 41 ff ce 41 0f b6
RSP: 0018:ffffc900001e7590 EFLAGS: 00000a03
RAX: 0000000000000000 RBX: ffffc900001e76c0 RCX: ffffffff91774000
RDX: dffffc0000000000 RSI: ffffffff8186e06a RDI: ffffc900001e76cc
RBP: ffffc900001e76c8 R08: 0000000000000004 R09: ffffc900001e76d0
R10: ffffc900001e7630 R11: ffffffff818b3aa0 R12: 1ffff9200003ced9
R13: 1ffff9200003ced9 R14: ffffc900001e76c0 R15: 1ffff9200003ceda
FS:  0000000000000000(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000110c2b2f99 CR3: 0000000047942000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 arch_stack_walk+0x10e/0x150 arch/x86/kernel/stacktrace.c:27
 stack_trace_save+0x118/0x1d0 kernel/stacktrace.c:122
 kasan_save_stack mm/kasan/common.c:47 [inline]
 kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:582
 poison_slab_object mm/kasan/common.c:247 [inline]
 __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264
 kasan_slab_free include/linux/kasan.h:233 [inline]
 slab_free_hook mm/slub.c:2353 [inline]
 slab_free mm/slub.c:4613 [inline]
 kmem_cache_free+0x195/0x410 mm/slub.c:4715
 rcu_do_batch kernel/rcu/tree.c:2567 [inline]
 rcu_core+0xaaa/0x17a0 kernel/rcu/tree.c:2823
 handle_softirqs+0x2d4/0x9b0 kernel/softirq.c:561
 run_ksoftirqd+0xca/0x130 kernel/softirq.c:950
 smpboot_thread_fn+0x544/0xa30 kernel/smpboot.c:164
 kthread+0x2f0/0x390 kernel/kthread.c:389
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/17 20:13 upstream 9bffa1ad25b8 953d1c45 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in btrfs_commit_transaction
* Struck through repros no longer work on HEAD.