syzbot


INFO: task hung in bch2_print_allocator_stuck

Status: auto-obsoleted due to no activity on 2025/01/01 22:53
Subsystems: bcachefs
[Documentation on labels]
First crash: 121d, last: 109d

Sample crash report:
INFO: task syz-executor:6408 blocked for more than 144 seconds.
      Not tainted 6.11.0-rc7-syzkaller-g5f5673607153 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor    state:D stack:0     pid:6408  tgid:6408  ppid:1      flags:0x0000000d
Call trace:
 __switch_to+0x420/0x6dc arch/arm64/kernel/process.c:603
 context_switch kernel/sched/core.c:5188 [inline]
 __schedule+0x13d4/0x2418 kernel/sched/core.c:6529
 __schedule_loop kernel/sched/core.c:6606 [inline]
 schedule+0xbc/0x238 kernel/sched/core.c:6621
 schedule_timeout+0xb8/0x33c kernel/time/timer.c:2557
 ___down_common+0x2a4/0x4e0 kernel/locking/semaphore.c:225
 __down_common+0xbc/0x454 kernel/locking/semaphore.c:246
 __down+0x18/0x24 kernel/locking/semaphore.c:254
 down+0x94/0xe8 kernel/locking/semaphore.c:63
 console_lock+0x16c/0x1f4 kernel/printk/printk.c:2735
 __bch2_print_string_as_lines fs/bcachefs/util.c:267 [inline]
 bch2_print_string_as_lines+0x2c/0xd4 fs/bcachefs/util.c:286
 bch2_print_allocator_stuck+0xc60/0xcf0 fs/bcachefs/alloc_foreground.c:1793
 __bch2_wait_on_allocator+0x174/0x23c fs/bcachefs/alloc_foreground.c:1812
 bch2_wait_on_allocator fs/bcachefs/alloc_foreground.h:238 [inline]
 bch2_btree_update_start+0x11a8/0x15ac fs/bcachefs/btree_update_interior.c:1269
 bch2_btree_split_leaf+0x11c/0x734 fs/bcachefs/btree_update_interior.c:1845
 bch2_trans_commit_error+0x2a8/0x1150 fs/bcachefs/btree_trans_commit.c:903
 __bch2_trans_commit+0x3144/0x5eb8 fs/bcachefs/btree_trans_commit.c:1135
 bch2_trans_commit fs/bcachefs/btree_update.h:184 [inline]
 bch2_inode_delete_keys+0x6d0/0xc78 fs/bcachefs/inode.c:833
 bch2_inode_rm+0x16c/0x698 fs/bcachefs/inode.c:862
 bch2_evict_inode+0x1d8/0x350 fs/bcachefs/fs.c:1604
 evict+0x418/0x894 fs/inode.c:704
 iput_final fs/inode.c:1838 [inline]
 iput+0x74c/0x830 fs/inode.c:1864
 do_unlinkat+0x528/0x700 fs/namei.c:4493
 __do_sys_unlinkat fs/namei.c:4529 [inline]
 __se_sys_unlinkat fs/namei.c:4522 [inline]
 __arm64_sys_unlinkat+0xc8/0xf8 fs/namei.c:4522
 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151
 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:712
 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598

Showing all locks held in the system:
1 lock held by kthreadd/2:
3 locks held by kworker/u8:0/11:
 #0: ffff0000c2068948 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x624/0x15b8 kernel/workqueue.c:3205
 #1: ffff8000975b7c20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x6a0/0x15b8 kernel/workqueue.c:3205
 #2: ffff0000d91680e0 (&type->s_umount_key#86){++++}-{3:3}, at: super_trylock_shared+0x28/0xe4 fs/super.c:562
3 locks held by kworker/u8:1/13:
2 locks held by kworker/1:0/25:
1 lock held by khungtaskd/31:
 #0: ffff80008f74dfa0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0xc/0x44 include/linux/rcupdate.h:325
3 locks held by kworker/u8:2/43:
4 locks held by kworker/u8:3/44:
 #0: ffff0000c0031948 ((wq_completion)events_power_efficient){+.+.}-{0:0}, at: process_one_work+0x624/0x15b8 kernel/workqueue.c:3205
 #1: ffff800097cc7c20 ((reg_check_chans).work){+.+.}-{0:0}, at: process_one_work+0x6a0/0x15b8 kernel/workqueue.c:3205
 #2: ffff800092437ee8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock+0x20/0x2c net/core/rtnetlink.c:79
 #3: ffff0000e2c20768 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: wiphy_lock include/net/cfg80211.h:6014 [inline]
 #3: ffff0000e2c20768 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: reg_leave_invalid_chans net/wireless/reg.c:2468 [inline]
 #3: ffff0000e2c20768 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: reg_check_chans_work+0x13c/0xe20 net/wireless/reg.c:2483
3 locks held by kworker/u8:4/223:
3 locks held by kworker/u8:5/257:
6 locks held by kworker/u8:6/311:
3 locks held by kworker/R-ipv6_/4059:
 #0: ffff0000d1a8d148 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: process_one_work+0x624/0x15b8 kernel/workqueue.c:3205
 #1: ffff8000a2847bc0 ((work_completion)(&(&net->ipv6.addr_chk_work)->work)){+.+.}-{0:0}, at: process_one_work+0x6a0/0x15b8 kernel/workqueue.c:3205
 #2: ffff800092437ee8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock+0x20/0x2c net/core/rtnetlink.c:79
3 locks held by kworker/u8:7/4237:
3 locks held by udevd/6025:
2 locks held by dhcpcd/6078:
1 lock held by dhcpcd/6079:
2 locks held by getty/6175:
 #0: ffff0000cc69b0a0 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x3c/0x4c drivers/tty/tty_ldsem.c:340
 #1: ffff80009b50e2f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x41c/0x1228 drivers/tty/n_tty.c:2211
2 locks held by udevd/6399:
3 locks held by syz-executor/6408:
 #0: ffff0000d9168420 (sb_writers#24){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:515
 #1: ffff0000e7b042c0 (&c->btree_trans_barrier){.+.+}-{0:0}, at: srcu_lock_acquire+0x18/0x54 include/linux/srcu.h:150
 #2: ffff0000e7b26690 (&c->gc_lock){++++}-{3:3}, at: bch2_btree_update_start+0x588/0x15ac fs/bcachefs/btree_update_interior.c:1197
1 lock held by syz-executor/6407:
1 lock held by kworker/R-wg-cr/6443:
 #0: ffff80008f5fa8e8 (wq_pool_attach_mutex){+.+.}-{3:3}, at: worker_detach_from_pool kernel/workqueue.c:2730 [inline]
 #0: ffff80008f5fa8e8 (wq_pool_attach_mutex){+.+.}-{3:3}, at: rescuer_thread+0x9e0/0xf2c kernel/workqueue.c:3524
1 lock held by kworker/R-wg-cr/6444:
 #0: ffff80008f5fa8e8 (wq_pool_attach_mutex){+.+.}-{3:3}, at: worker_detach_from_pool kernel/workqueue.c:2730 [inline]
 #0: ffff80008f5fa8e8 (wq_pool_attach_mutex){+.+.}-{3:3}, at: rescuer_thread+0x9e0/0xf2c kernel/workqueue.c:3524
1 lock held by kworker/R-wg-cr/6452:
1 lock held by kworker/R-wg-cr/6453:
 #0: ffff80008f5fa8e8 (wq_pool_attach_mutex){+.+.}-{3:3}, at: worker_detach_from_pool kernel/workqueue.c:2730 [inline]
 #0: ffff80008f5fa8e8 (wq_pool_attach_mutex){+.+.}-{3:3}, at: rescuer_thread+0x9e0/0xf2c kernel/workqueue.c:3524
2 locks held by kworker/R-wg-cr/6456:
3 locks held by kworker/1:4/6460:
 #0: ffff0000c0028948 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x624/0x15b8 kernel/workqueue.c:3205
 #1: ffff8000a3b27c20 (deferred_process_work){+.+.}-{0:0}, at: process_one_work+0x6a0/0x15b8 kernel/workqueue.c:3205
 #2: ffff800092437ee8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock+0x20/0x2c net/core/rtnetlink.c:79
3 locks held by kworker/0:4/6461:
3 locks held by kworker/u8:8/6732:
3 locks held by kworker/u8:9/6972:
4 locks held by syz-executor/7094:
1 lock held by kworker/R-wg-cr/7127:
 #0: ffff80008f5fa8e8 (wq_pool_attach_mutex){+.+.}-{3:3}, at: worker_detach_from_pool kernel/workqueue.c:2730 [inline]
 #0: ffff80008f5fa8e8 (wq_pool_attach_mutex){+.+.}-{3:3}, at: rescuer_thread+0x9e0/0xf2c kernel/workqueue.c:3524
2 locks held by kworker/u8:10/7469:
1 lock held by syz-executor/7598:
3 locks held by kworker/u8:11/7623:
1 lock held by kworker/R-wg-cr/7662:
 #0: ffff80008f5fa8e8 (wq_pool_attach_mutex){+.+.}-{3:3}, at: worker_detach_from_pool kernel/workqueue.c:2730 [inline]
 #0: ffff80008f5fa8e8 (wq_pool_attach_mutex){+.+.}-{3:3}, at: rescuer_thread+0x9e0/0xf2c kernel/workqueue.c:3524
1 lock held by kworker/R-wg-cr/7664:
 #0: ffff80008f5fa8e8 (wq_pool_attach_mutex){+.+.}-{3:3}, at: worker_detach_from_pool kernel/workqueue.c:2730 [inline]
 #0: ffff80008f5fa8e8 (wq_pool_attach_mutex){+.+.}-{3:3}, at: rescuer_thread+0x9e0/0xf2c kernel/workqueue.c:3524
2 locks held by bch-copygc/loop/7718:
1 lock held by syz-executor/7854:
 #0: ffff800092437ee8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:79 [inline]
 #0: ffff800092437ee8 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x5e8/0xa9c net/core/rtnetlink.c:6644
3 locks held by kworker/u8:12/7884:
2 locks held by kworker/u8:13/7888:
1 lock held by syz.1.244/8071:
 #0: ffff0000da4d20e0 (&type->s_umount_key#49/1){+.+.}-{3:3}, at: alloc_super+0x1b0/0x83c fs/super.c:344
2 locks held by udevadm/8082:
1 lock held by kworker/R-btrfs/8084:
 #0: ffff80008f5fa8e8 (wq_pool_attach_mutex){+.+.}-{3:3}, at: set_pf_worker kernel/workqueue.c:3318 [inline]
 #0: ffff80008f5fa8e8 (wq_pool_attach_mutex){+.+.}-{3:3}, at: rescuer_thread+0xe50/0xf2c kernel/workqueue.c:3533
2 locks held by kworker/u8:14/8107:
4 locks held by kworker/u8:15/8108:
2 locks held by syz-executor/8110:
2 locks held by kworker/u8:16/8111:
 #0: ffff0000c0031148 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x624/0x15b8 kernel/workqueue.c:3205
 #1: ffff80009d637c20 ((quota_release_work).work){+.+.}-{0:0}, at: process_one_work+0x6a0/0x15b8 kernel/workqueue.c:3205
4 locks held by kworker/0:8/8112:

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


Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/03 22:48 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 5f5673607153 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 INFO: task hung in bch2_print_allocator_stuck
2024/09/21 21:49 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 5f5673607153 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 INFO: task hung in bch2_print_allocator_stuck
* Struck through repros no longer work on HEAD.