Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bcachefs hangs when doing lots of writes to a nocow folder #680

Open
raldone01 opened this issue May 17, 2024 · 10 comments
Open

Bcachefs hangs when doing lots of writes to a nocow folder #680

raldone01 opened this issue May 17, 2024 · 10 comments

Comments

@raldone01
Copy link

raldone01 commented May 17, 2024

I noticed the whole fs was stuck and checked dmesg:

[  +0.047757] bcachefs (e43f8378-5cca-49c5-83c7-db8a8d09b09f): mounting version 1.4: member_seq opts=metadata_replicas_required=2,data_replicas_required=2,compression=lz4,background_compression=zstd:7,foreground_target=ssd,background_target=hdd,promote_target=ssd
[  +0.000034] bcachefs (e43f8378-5cca-49c5-83c7-db8a8d09b09f): recovering from clean shutdown, journal seq 185724
[  +0.112675] bcachefs (e43f8378-5cca-49c5-83c7-db8a8d09b09f): alloc_read... done
[  +0.154783] bcachefs (e43f8378-5cca-49c5-83c7-db8a8d09b09f): stripes_read... done
[  +0.000011] bcachefs (e43f8378-5cca-49c5-83c7-db8a8d09b09f): snapshots_read... done
[  +0.362068] bcachefs (e43f8378-5cca-49c5-83c7-db8a8d09b09f): journal_replay... done
[  +0.000011] bcachefs (e43f8378-5cca-49c5-83c7-db8a8d09b09f): resume_logged_ops... done
[  +0.000016] bcachefs (e43f8378-5cca-49c5-83c7-db8a8d09b09f): going read-write
[Mai14 07:25] bcachefs (e43f8378-5cca-49c5-83c7-db8a8d09b09f): initializing freespace
[ +10.088770] bcachefs (e43f8378-5cca-49c5-83c7-db8a8d09b09f): initializing freespace
[Mai16 12:22] bcachefs (e43f8378-5cca-49c5-83c7-db8a8d09b09f): initializing freespace
[Mai17 07:13] INFO: task kworker/u146:25:850152 blocked for more than 122 seconds.
[  +0.000014]       Tainted: P           OE      6.8.9-arch1-2 #1
[  +0.000005] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  +0.000002] task:kworker/u146:25 state:D stack:0     pid:850152 tgid:850152 ppid:2      flags:0x00004000
[  +0.000012] Workqueue: writeback wb_workfn (flush-bcachefs-4)
[  +0.000015] Call Trace:
[  +0.000002]  <TASK>
[  +0.000007]  __schedule+0x3db/0x1520
[  +0.000017]  schedule+0x32/0xd0
[  +0.000006]  __closure_sync+0x82/0x150
[  +0.000011]  bch2_nocow_write+0x52f/0x11b0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000237]  ? __bch2_write+0xee8/0x1580 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000248]  __bch2_write+0xee8/0x1580 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000167]  ? bch2_inode_peek_nowarn.isra.0+0xbe/0x140 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000161]  ? bch2_btree_iter_peek_slot+0x24f/0x700 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000127]  ? dm_submit_bio+0x1c5/0x570 [dm_mod 6ffd57ab526bbb59c91473fcb15781120ebcd536]
[  +0.000054]  ? kmem_cache_alloc+0x133/0x310
[  +0.000011]  ? bch2_inode_unpack_v3+0x7be/0x8c0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000160]  ? mempool_alloc+0x87/0x1b0
[  +0.000007]  ? __lruvec_stat_mod_folio+0x68/0xa0
[  +0.000010]  ? __folio_start_writeback+0xb1/0x250
[  +0.000012]  ? __bch2_increment_clock+0x2d/0x140 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000144]  ? __bch2_writepage+0x35c/0x720 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000155]  __bch2_writepage+0x35c/0x720 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000161]  write_cache_pages+0x14a/0x430
[  +0.000009]  ? __pfx___bch2_writepage+0x10/0x10 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000166]  bch2_writepages+0x8e/0xf0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000160]  do_writepages+0x72/0x1e0
[  +0.000009]  __writeback_single_inode+0x41/0x350
[  +0.000007]  writeback_sb_inodes+0x1ed/0x4c0
[  +0.000008]  __writeback_inodes_wb+0x4c/0xf0
[  +0.000007]  wb_writeback+0x298/0x310
[  +0.000007]  wb_workfn+0x368/0x520
[  +0.000008]  process_one_work+0x177/0x340
[  +0.000010]  worker_thread+0x309/0x450
[  +0.000007]  ? __pfx_worker_thread+0x10/0x10
[  +0.000006]  kthread+0xe8/0x120
[  +0.000010]  ? __pfx_kthread+0x10/0x10
[  +0.000007]  ret_from_fork+0x34/0x50
[  +0.000012]  ? __pfx_kthread+0x10/0x10
[  +0.000006]  ret_from_fork_asm+0x1b/0x30
[  +0.000011]  </TASK>
[Mai17 07:15] INFO: task kworker/u146:25:850152 blocked for more than 245 seconds.
[  +0.000014]       Tainted: P           OE      6.8.9-arch1-2 #1
[  +0.000004] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  +0.000003] task:kworker/u146:25 state:D stack:0     pid:850152 tgid:850152 ppid:2      flags:0x00004000
[  +0.000012] Workqueue: writeback wb_workfn (flush-bcachefs-4)
[  +0.000015] Call Trace:
[  +0.000004]  <TASK>
[  +0.000006]  __schedule+0x3db/0x1520
[  +0.000017]  schedule+0x32/0xd0
[  +0.000007]  __closure_sync+0x82/0x150
[  +0.000010]  bch2_nocow_write+0x52f/0x11b0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000334]  ? __bch2_write+0xee8/0x1580 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000173]  __bch2_write+0xee8/0x1580 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000156]  ? bch2_inode_peek_nowarn.isra.0+0xbe/0x140 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000166]  ? bch2_btree_iter_peek_slot+0x24f/0x700 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000133]  ? dm_submit_bio+0x1c5/0x570 [dm_mod 6ffd57ab526bbb59c91473fcb15781120ebcd536]
[  +0.000047]  ? kmem_cache_alloc+0x133/0x310
[  +0.000009]  ? bch2_inode_unpack_v3+0x7be/0x8c0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000162]  ? mempool_alloc+0x87/0x1b0
[  +0.000007]  ? __lruvec_stat_mod_folio+0x68/0xa0
[  +0.000011]  ? __folio_start_writeback+0xb1/0x250
[  +0.000013]  ? __bch2_increment_clock+0x2d/0x140 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000146]  ? __bch2_writepage+0x35c/0x720 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000161]  __bch2_writepage+0x35c/0x720 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000162]  write_cache_pages+0x14a/0x430
[  +0.000009]  ? __pfx___bch2_writepage+0x10/0x10 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000166]  bch2_writepages+0x8e/0xf0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000163]  do_writepages+0x72/0x1e0
[  +0.000009]  __writeback_single_inode+0x41/0x350
[  +0.000007]  writeback_sb_inodes+0x1ed/0x4c0
[  +0.000008]  __writeback_inodes_wb+0x4c/0xf0
[  +0.000007]  wb_writeback+0x298/0x310
[  +0.000006]  wb_workfn+0x368/0x520
[  +0.000008]  process_one_work+0x177/0x340
[  +0.000010]  worker_thread+0x309/0x450
[  +0.000008]  ? __pfx_worker_thread+0x10/0x10
[  +0.000005]  kthread+0xe8/0x120
[  +0.000010]  ? __pfx_kthread+0x10/0x10
[  +0.000008]  ret_from_fork+0x34/0x50
[  +0.000011]  ? __pfx_kthread+0x10/0x10
[  +0.000006]  ret_from_fork_asm+0x1b/0x30
[  +0.000011]  </TASK>
[Mai17 07:17] INFO: task kworker/u146:25:850152 blocked for more than 368 seconds.
[  +0.000012]       Tainted: P           OE      6.8.9-arch1-2 #1
[  +0.000003] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  +0.000003] task:kworker/u146:25 state:D stack:0     pid:850152 tgid:850152 ppid:2      flags:0x00004000
[  +0.000011] Workqueue: writeback wb_workfn (flush-bcachefs-4)
[  +0.000014] Call Trace:
[  +0.000004]  <TASK>
[  +0.000007]  __schedule+0x3db/0x1520
[  +0.000017]  schedule+0x32/0xd0
[  +0.000006]  __closure_sync+0x82/0x150
[  +0.000011]  bch2_nocow_write+0x52f/0x11b0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000231]  ? __bch2_write+0xee8/0x1580 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000150]  __bch2_write+0xee8/0x1580 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000161]  ? bch2_inode_peek_nowarn.isra.0+0xbe/0x140 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000168]  ? bch2_btree_iter_peek_slot+0x24f/0x700 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000124]  ? dm_submit_bio+0x1c5/0x570 [dm_mod 6ffd57ab526bbb59c91473fcb15781120ebcd536]
[  +0.000053]  ? kmem_cache_alloc+0x133/0x310
[  +0.000010]  ? bch2_inode_unpack_v3+0x7be/0x8c0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000160]  ? mempool_alloc+0x87/0x1b0
[  +0.000006]  ? __lruvec_stat_mod_folio+0x68/0xa0
[  +0.000011]  ? __folio_start_writeback+0xb1/0x250
[  +0.000013]  ? __bch2_increment_clock+0x2d/0x140 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000141]  ? __bch2_writepage+0x35c/0x720 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000154]  __bch2_writepage+0x35c/0x720 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000157]  write_cache_pages+0x14a/0x430
[  +0.000009]  ? __pfx___bch2_writepage+0x10/0x10 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000160]  bch2_writepages+0x8e/0xf0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000156]  do_writepages+0x72/0x1e0
[  +0.000009]  __writeback_single_inode+0x41/0x350
[  +0.000007]  writeback_sb_inodes+0x1ed/0x4c0
[  +0.000009]  __writeback_inodes_wb+0x4c/0xf0
[  +0.000006]  wb_writeback+0x298/0x310
[  +0.000007]  wb_workfn+0x368/0x520
[  +0.000008]  process_one_work+0x177/0x340
[  +0.000010]  worker_thread+0x309/0x450
[  +0.000007]  ? __pfx_worker_thread+0x10/0x10
[  +0.000005]  kthread+0xe8/0x120
[  +0.000010]  ? __pfx_kthread+0x10/0x10
[  +0.000008]  ret_from_fork+0x34/0x50
[  +0.000011]  ? __pfx_kthread+0x10/0x10
[  +0.000006]  ret_from_fork_asm+0x1b/0x30
[  +0.000009]  </TASK>
[Mai17 07:19] INFO: task kworker/u146:25:850152 blocked for more than 491 seconds.
[  +0.000014]       Tainted: P           OE      6.8.9-arch1-2 #1
[  +0.000004] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  +0.000003] task:kworker/u146:25 state:D stack:0     pid:850152 tgid:850152 ppid:2      flags:0x00004000
[  +0.000012] Workqueue: writeback wb_workfn (flush-bcachefs-4)
[  +0.000016] Call Trace:
[  +0.000003]  <TASK>
[  +0.000009]  __schedule+0x3db/0x1520
[  +0.000017]  schedule+0x32/0xd0
[  +0.000006]  __closure_sync+0x82/0x150
[  +0.000027]  bch2_nocow_write+0x52f/0x11b0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000240]  ? __bch2_write+0xee8/0x1580 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000152]  __bch2_write+0xee8/0x1580 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000149]  ? bch2_inode_peek_nowarn.isra.0+0xbe/0x140 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000151]  ? bch2_btree_iter_peek_slot+0x24f/0x700 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000130]  ? dm_submit_bio+0x1c5/0x570 [dm_mod 6ffd57ab526bbb59c91473fcb15781120ebcd536]
[  +0.000054]  ? kmem_cache_alloc+0x133/0x310
[  +0.000011]  ? bch2_inode_unpack_v3+0x7be/0x8c0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000149]  ? mempool_alloc+0x87/0x1b0
[  +0.000007]  ? __lruvec_stat_mod_folio+0x68/0xa0
[  +0.000010]  ? __folio_start_writeback+0xb1/0x250
[  +0.000011]  ? __bch2_increment_clock+0x2d/0x140 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000142]  ? __bch2_writepage+0x35c/0x720 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000151]  __bch2_writepage+0x35c/0x720 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000166]  write_cache_pages+0x14a/0x430
[  +0.000010]  ? __pfx___bch2_writepage+0x10/0x10 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000168]  bch2_writepages+0x8e/0xf0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000165]  do_writepages+0x72/0x1e0
[  +0.000010]  __writeback_single_inode+0x41/0x350
[  +0.000007]  writeback_sb_inodes+0x1ed/0x4c0
[  +0.000009]  __writeback_inodes_wb+0x4c/0xf0
[  +0.000007]  wb_writeback+0x298/0x310
[  +0.000006]  wb_workfn+0x368/0x520
[  +0.000009]  process_one_work+0x177/0x340
[  +0.000010]  worker_thread+0x309/0x450
[  +0.000008]  ? __pfx_worker_thread+0x10/0x10
[  +0.000005]  kthread+0xe8/0x120
[  +0.000011]  ? __pfx_kthread+0x10/0x10
[  +0.000007]  ret_from_fork+0x34/0x50
[  +0.000012]  ? __pfx_kthread+0x10/0x10
[  +0.000006]  ret_from_fork_asm+0x1b/0x30
[  +0.000011]  </TASK>
[Mai17 07:21] veth357e7a6: renamed from eth0
[  +0.050108] br-f1fcb20a044e: port 2(vetheae8913) entered disabled state
[  +0.098400] br-f1fcb20a044e: port 2(vetheae8913) entered disabled state
[  +0.005095] vetheae8913 (unregistering): left allmulticast mode
[  +0.000010] vetheae8913 (unregistering): left promiscuous mode
[  +0.000008] br-f1fcb20a044e: port 2(vetheae8913) entered disabled state
[  +0.562179] br-f1fcb20a044e: port 2(veth987a70e) entered blocking state
[  +0.000058] br-f1fcb20a044e: port 2(veth987a70e) entered disabled state
[  +0.000116] veth987a70e: entered allmulticast mode
[  +0.000249] veth987a70e: entered promiscuous mode
[  +0.647126] eth0: renamed from vethae8f51b
[  +0.044686] br-f1fcb20a044e: port 2(veth987a70e) entered blocking state
[  +0.000011] br-f1fcb20a044e: port 2(veth987a70e) entered forwarding state
[ +34.120434] INFO: task kworker/u146:25:850152 blocked for more than 614 seconds.
[  +0.000013]       Tainted: P           OE      6.8.9-arch1-2 #1
[  +0.000004] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  +0.000002] task:kworker/u146:25 state:D stack:0     pid:850152 tgid:850152 ppid:2      flags:0x00004000
[  +0.000011] Workqueue: writeback wb_workfn (flush-bcachefs-4)
[  +0.000013] Call Trace:
[  +0.000003]  <TASK>
[  +0.000005]  __schedule+0x3db/0x1520
[  +0.000015]  schedule+0x32/0xd0
[  +0.000006]  __closure_sync+0x82/0x150
[  +0.000009]  bch2_nocow_write+0x52f/0x11b0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000190]  ? __bch2_write+0xee8/0x1580 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000133]  __bch2_write+0xee8/0x1580 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000173]  ? bch2_inode_peek_nowarn.isra.0+0xbe/0x140 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000130]  ? bch2_btree_iter_peek_slot+0x24f/0x700 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000109]  ? dm_submit_bio+0x1c5/0x570 [dm_mod 6ffd57ab526bbb59c91473fcb15781120ebcd536]
[  +0.000077]  ? kmem_cache_alloc+0x133/0x310
[  +0.000012]  ? bch2_inode_unpack_v3+0x7be/0x8c0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000133]  ? mempool_alloc+0x87/0x1b0
[  +0.000006]  ? __lruvec_stat_mod_folio+0x68/0xa0
[  +0.000008]  ? __folio_start_writeback+0xb1/0x250
[  +0.000008]  ? __bch2_increment_clock+0x2d/0x140 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000122]  ? __bch2_writepage+0x35c/0x720 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000136]  __bch2_writepage+0x35c/0x720 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000146]  write_cache_pages+0x14a/0x430
[  +0.000009]  ? __pfx___bch2_writepage+0x10/0x10 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000148]  bch2_writepages+0x8e/0xf0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000144]  do_writepages+0x72/0x1e0
[  +0.000008]  __writeback_single_inode+0x41/0x350
[  +0.000007]  writeback_sb_inodes+0x1ed/0x4c0
[  +0.000008]  __writeback_inodes_wb+0x4c/0xf0
[  +0.000006]  wb_writeback+0x298/0x310
[  +0.000006]  wb_workfn+0x368/0x520
[  +0.000008]  process_one_work+0x177/0x340
[  +0.000013]  worker_thread+0x309/0x450
[  +0.000007]  ? __pfx_worker_thread+0x10/0x10
[  +0.000006]  kthread+0xe8/0x120
[  +0.000008]  ? __pfx_kthread+0x10/0x10
[  +0.000008]  ret_from_fork+0x34/0x50
[  +0.000008]  ? __pfx_kthread+0x10/0x10
[  +0.000007]  ret_from_fork_asm+0x1b/0x30
[  +0.000009]  </TASK>
[Mai17 07:23] INFO: task kworker/u146:25:850152 blocked for more than 737 seconds.
[  +0.000013]       Tainted: P           OE      6.8.9-arch1-2 #1
[  +0.000004] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  +0.000003] task:kworker/u146:25 state:D stack:0     pid:850152 tgid:850152 ppid:2      flags:0x00004000
[  +0.000012] Workqueue: writeback wb_workfn (flush-bcachefs-4)
[  +0.000014] Call Trace:
[  +0.000003]  <TASK>
[  +0.000006]  __schedule+0x3db/0x1520
[  +0.000017]  schedule+0x32/0xd0
[  +0.000006]  __closure_sync+0x82/0x150
[  +0.000011]  bch2_nocow_write+0x52f/0x11b0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000226]  ? __bch2_write+0xee8/0x1580 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000170]  __bch2_write+0xee8/0x1580 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000145]  ? bch2_inode_peek_nowarn.isra.0+0xbe/0x140 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000147]  ? bch2_btree_iter_peek_slot+0x24f/0x700 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000122]  ? dm_submit_bio+0x1c5/0x570 [dm_mod 6ffd57ab526bbb59c91473fcb15781120ebcd536]
[  +0.000049]  ? kmem_cache_alloc+0x133/0x310
[  +0.000010]  ? bch2_inode_unpack_v3+0x7be/0x8c0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000153]  ? mempool_alloc+0x87/0x1b0
[  +0.000007]  ? __lruvec_stat_mod_folio+0x68/0xa0
[  +0.000011]  ? __folio_start_writeback+0xb1/0x250
[  +0.000012]  ? __bch2_increment_clock+0x2d/0x140 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000144]  ? __bch2_writepage+0x35c/0x720 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000155]  __bch2_writepage+0x35c/0x720 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000159]  write_cache_pages+0x14a/0x430
[  +0.000009]  ? __pfx___bch2_writepage+0x10/0x10 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000162]  bch2_writepages+0x8e/0xf0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000158]  do_writepages+0x72/0x1e0
[  +0.000009]  __writeback_single_inode+0x41/0x350
[  +0.000007]  writeback_sb_inodes+0x1ed/0x4c0
[  +0.000009]  __writeback_inodes_wb+0x4c/0xf0
[  +0.000006]  wb_writeback+0x298/0x310
[  +0.000007]  wb_workfn+0x368/0x520
[  +0.000008]  process_one_work+0x177/0x340
[  +0.000010]  worker_thread+0x309/0x450
[  +0.000007]  ? __pfx_worker_thread+0x10/0x10
[  +0.000006]  kthread+0xe8/0x120
[  +0.000010]  ? __pfx_kthread+0x10/0x10
[  +0.000007]  ret_from_fork+0x34/0x50
[  +0.000011]  ? __pfx_kthread+0x10/0x10
[  +0.000007]  ret_from_fork_asm+0x1b/0x30
[  +0.000010]  </TASK>
[Mai17 07:25] INFO: task borg:824617 blocked for more than 122 seconds.
[  +0.000010]       Tainted: P           OE      6.8.9-arch1-2 #1
[  +0.000003] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  +0.000002] task:borg            state:D stack:0     pid:824617 tgid:824617 ppid:173649 flags:0x00004002
[  +0.000007] Call Trace:
[  +0.000003]  <TASK>
[  +0.000005]  __schedule+0x3db/0x1520
[  +0.000012]  ? __mem_cgroup_threshold+0x15/0x150
[  +0.000005]  ? __call_rcu_common+0xf4/0x700
[  +0.000005]  schedule+0x32/0xd0
[  +0.000004]  io_schedule+0x46/0x70
[  +0.000004]  folio_wait_bit_common+0x13b/0x350
[  +0.000007]  ? __pfx_wake_page_function+0x10/0x10
[  +0.000006]  folio_wait_writeback+0x2b/0x90
[  +0.000008]  truncate_inode_pages_range+0x2d2/0x400
[  +0.000009]  truncate_pagecache+0x47/0x60
[  +0.000006]  bchfs_truncate+0x15b/0x3c0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000163]  notify_change+0x2ec/0x490
[  +0.000007]  ? do_truncate+0x95/0xe0
[  +0.000005]  do_truncate+0x95/0xe0
[  +0.000005]  path_openat+0xecb/0x1110
[  +0.000006]  ? switch_fpu_return+0x4f/0xe0
[  +0.000005]  do_filp_open+0xb3/0x160
[  +0.000006]  do_sys_openat2+0xae/0xe0
[  +0.000004]  __x64_sys_open+0x53/0xa0
[  +0.000004]  do_syscall_64+0x83/0x170
[  +0.000006]  ? exc_page_fault+0x7f/0x180
[  +0.000006]  entry_SYSCALL_64_after_hwframe+0x78/0x80
[  +0.000007] RIP: 0033:0x76e9abd9c862
[  +0.000052] RSP: 002b:00007ffde1113dd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
[  +0.000004] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 000076e9abd9c862
[  +0.000003] RDX: 00000000000001b6 RSI: 0000000000088241 RDI: 000076e987490950
[  +0.000001] RBP: 000076e9abddfb08 R08: 0000000000000000 R09: 0000000000000000
[  +0.000003] R10: 0000000000000000 R11: 0000000000000246 R12: 000076e9abddfb3c
[  +0.000002] R13: 00000000ffffffff R14: 000076e980bea5e0 R15: 0000000000000001
[  +0.000003]  </TASK>
[  +0.000006] INFO: task kworker/u146:25:850152 blocked for more than 860 seconds.
[  +0.000003]       Tainted: P           OE      6.8.9-arch1-2 #1
[  +0.000002] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  +0.000001] task:kworker/u146:25 state:D stack:0     pid:850152 tgid:850152 ppid:2      flags:0x00004000
[  +0.000006] Workqueue: writeback wb_workfn (flush-bcachefs-4)
[  +0.000008] Call Trace:
[  +0.000002]  <TASK>
[  +0.000002]  __schedule+0x3db/0x1520
[  +0.000006]  schedule+0x32/0xd0
[  +0.000003]  __closure_sync+0x82/0x150
[  +0.000005]  bch2_nocow_write+0x52f/0x11b0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000097]  ? __bch2_write+0xee8/0x1580 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000087]  __bch2_write+0xee8/0x1580 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000094]  ? bch2_inode_peek_nowarn.isra.0+0xbe/0x140 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000092]  ? bch2_btree_iter_peek_slot+0x24f/0x700 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000081]  ? dm_submit_bio+0x1c5/0x570 [dm_mod 6ffd57ab526bbb59c91473fcb15781120ebcd536]
[  +0.000031]  ? kmem_cache_alloc+0x133/0x310
[  +0.000006]  ? bch2_inode_unpack_v3+0x7be/0x8c0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000089]  ? mempool_alloc+0x87/0x1b0
[  +0.000004]  ? __lruvec_stat_mod_folio+0x68/0xa0
[  +0.000005]  ? __folio_start_writeback+0xb1/0x250
[  +0.000006]  ? __bch2_increment_clock+0x2d/0x140 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000083]  ? __bch2_writepage+0x35c/0x720 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000088]  __bch2_writepage+0x35c/0x720 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000092]  write_cache_pages+0x14a/0x430
[  +0.000005]  ? __pfx___bch2_writepage+0x10/0x10 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000092]  bch2_writepages+0x8e/0xf0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000091]  do_writepages+0x72/0x1e0
[  +0.000005]  __writeback_single_inode+0x41/0x350
[  +0.000005]  writeback_sb_inodes+0x1ed/0x4c0
[  +0.000004]  __writeback_inodes_wb+0x4c/0xf0
[  +0.000004]  wb_writeback+0x298/0x310
[  +0.000004]  wb_workfn+0x368/0x520
[  +0.000004]  process_one_work+0x177/0x340
[  +0.000007]  worker_thread+0x309/0x450
[  +0.000004]  ? __pfx_worker_thread+0x10/0x10
[  +0.000004]  kthread+0xe8/0x120
[  +0.000006]  ? __pfx_kthread+0x10/0x10
[  +0.000004]  ret_from_fork+0x34/0x50
[  +0.000006]  ? __pfx_kthread+0x10/0x10
[  +0.000004]  ret_from_fork_asm+0x1b/0x30
[  +0.000006]  </TASK>
[Mai17 07:28] INFO: task borg:824617 blocked for more than 245 seconds.
[  +0.000013]       Tainted: P           OE      6.8.9-arch1-2 #1
[  +0.000004] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  +0.000003] task:borg            state:D stack:0     pid:824617 tgid:824617 ppid:173649 flags:0x00004002
[  +0.000010] Call Trace:
[  +0.000004]  <TASK>
[  +0.000005]  __schedule+0x3db/0x1520
[  +0.000017]  ? __mem_cgroup_threshold+0x15/0x150
[  +0.000007]  ? __call_rcu_common+0xf4/0x700
[  +0.000008]  schedule+0x32/0xd0
[  +0.000006]  io_schedule+0x46/0x70
[  +0.000007]  folio_wait_bit_common+0x13b/0x350
[  +0.000011]  ? __pfx_wake_page_function+0x10/0x10
[  +0.000009]  folio_wait_writeback+0x2b/0x90
[  +0.000012]  truncate_inode_pages_range+0x2d2/0x400
[  +0.000016]  truncate_pagecache+0x47/0x60
[  +0.000010]  bchfs_truncate+0x15b/0x3c0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000217]  notify_change+0x2ec/0x490
[  +0.000011]  ? do_truncate+0x95/0xe0
[  +0.000010]  do_truncate+0x95/0xe0
[  +0.000009]  path_openat+0xecb/0x1110
[  +0.000009]  ? switch_fpu_return+0x4f/0xe0
[  +0.000008]  do_filp_open+0xb3/0x160
[  +0.000010]  do_sys_openat2+0xae/0xe0
[  +0.000007]  __x64_sys_open+0x53/0xa0
[  +0.000006]  do_syscall_64+0x83/0x170
[  +0.000010]  ? exc_page_fault+0x7f/0x180
[  +0.000012]  entry_SYSCALL_64_after_hwframe+0x78/0x80
[  +0.000009] RIP: 0033:0x76e9abd9c862
[  +0.000050] RSP: 002b:00007ffde1113dd8 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
[  +0.000007] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 000076e9abd9c862
[  +0.000004] RDX: 00000000000001b6 RSI: 0000000000088241 RDI: 000076e987490950
[  +0.000004] RBP: 000076e9abddfb08 R08: 0000000000000000 R09: 0000000000000000
[  +0.000003] R10: 0000000000000000 R11: 0000000000000246 R12: 000076e9abddfb3c
[  +0.000003] R13: 00000000ffffffff R14: 000076e980bea5e0 R15: 0000000000000001
[  +0.000006]  </TASK>
[  +0.000021] INFO: task kworker/u146:25:850152 blocked for more than 983 seconds.
[  +0.000005]       Tainted: P           OE      6.8.9-arch1-2 #1
[  +0.000003] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  +0.000008] task:kworker/u146:25 state:D stack:0     pid:850152 tgid:850152 ppid:2      flags:0x00004000
[  +0.000009] Workqueue: writeback wb_workfn (flush-bcachefs-4)
[  +0.000012] Call Trace:
[  +0.000002]  <TASK>
[  +0.000003]  __schedule+0x3db/0x1520
[  +0.000010]  schedule+0x32/0xd0
[  +0.000006]  __closure_sync+0x82/0x150
[  +0.000009]  bch2_nocow_write+0x52f/0x11b0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000168]  ? __bch2_write+0xee8/0x1580 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000149]  __bch2_write+0xee8/0x1580 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000143]  ? bch2_inode_peek_nowarn.isra.0+0xbe/0x140 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000146]  ? bch2_btree_iter_peek_slot+0x24f/0x700 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000123]  ? dm_submit_bio+0x1c5/0x570 [dm_mod 6ffd57ab526bbb59c91473fcb15781120ebcd536]
[  +0.000052]  ? kmem_cache_alloc+0x133/0x310
[  +0.000016]  ? bch2_inode_unpack_v3+0x7be/0x8c0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000162]  ? mempool_alloc+0x87/0x1b0
[  +0.000007]  ? __lruvec_stat_mod_folio+0x68/0xa0
[  +0.000016]  ? __folio_start_writeback+0xb1/0x250
[  +0.000010]  ? __bch2_increment_clock+0x2d/0x140 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000142]  ? __bch2_writepage+0x35c/0x720 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000160]  __bch2_writepage+0x35c/0x720 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000159]  write_cache_pages+0x14a/0x430
[  +0.000009]  ? __pfx___bch2_writepage+0x10/0x10 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000206]  bch2_writepages+0x8e/0xf0 [bcachefs d106f8f003fb99665c1eff0be7bd662893d62582]
[  +0.000206]  do_writepages+0x72/0x1e0
[  +0.000010]  __writeback_single_inode+0x41/0x350
[  +0.000010]  writeback_sb_inodes+0x1ed/0x4c0
[  +0.000012]  __writeback_inodes_wb+0x4c/0xf0
[  +0.000009]  wb_writeback+0x298/0x310
[  +0.000009]  wb_workfn+0x368/0x520
[  +0.000011]  process_one_work+0x177/0x340
[  +0.000012]  worker_thread+0x309/0x450
[  +0.000009]  ? __pfx_worker_thread+0x10/0x10
[  +0.000012]  kthread+0xe8/0x120
[  +0.000011]  ? __pfx_kthread+0x10/0x10
[  +0.000010]  ret_from_fork+0x34/0x50
[  +0.000008]  ? __pfx_kthread+0x10/0x10
[  +0.000007]  ret_from_fork_asm+0x1b/0x30
[  +0.000009]  </TASK>
[  +0.000002] Future hung task reports are suppressed, see sysctl kernel.hung_task_warnings

Bcachefs show-super:

Device:                                     (unknown device)
External UUID:                              e43f8378-5cca-49c5-83c7-db8a8d09b09f
Internal UUID:                              983434f7-32f4-4334-ba4f-99e96280c572
Magic number:                               c68573f6-66ce-90a9-d96a-60cf803df7ef
Device index:                               0
Label:                                      argon_bfs
Version:                                    1.4: member_seq
Version upgrade complete:                   1.4: member_seq
Oldest version on disk:                     1.4: member_seq
Created:                                    Sun May 12 18:06:38 2024
Sequence number:                            51
Time of last write:                         Fri May 17 09:06:05 2024
Superblock size:                            7.28 KiB/1.00 MiB
Clean:                                      0
Devices:                                    7
Sections:                                   members_v1,replicas_v0,disk_groups,clean,journal_seq_blacklist,journal_v2,counters,members_v2,errors,ext,downgrade
Features:                                   lz4,zstd,journal_seq_blacklist_v3,reflink,new_siphash,inline_data,new_extent_overwrite,btree_ptr_v2,extents_above_btree_updates,btree_updates_journalled,new_varint,journal_no_flush,alloc_v2,extents_across_btree_nodes
Compat features:                            alloc_info,alloc_metadata,extents_above_btree_updates_done,bformat_overflow_done

Options:
  block_size:                               4.00 KiB
  btree_node_size:                          256 KiB
  errors:                                   continue [ro] panic 
  metadata_replicas:                        1
  data_replicas:                            1
  metadata_replicas_required:               2
  data_replicas_required:                   2
  encoded_extent_max:                       64.0 KiB
  metadata_checksum:                        none [crc32c] crc64 xxhash 
  data_checksum:                            none [crc32c] crc64 xxhash 
  compression:                              lz4
  background_compression:                   zstd:7
  str_hash:                                 crc32c crc64 [siphash] 
  metadata_target:                          none
  foreground_target:                        ssd
  background_target:                        hdd
  promote_target:                           ssd
  erasure_code:                             0
  inodes_32bit:                             1
  shard_inode_numbers:                      1
  inodes_use_key_cache:                     1
  gc_reserve_percent:                       8
  gc_reserve_bytes:                         0 B
  root_reserve_percent:                     0
  wide_macs:                                0
  acl:                                      1
  usrquota:                                 0
  grpquota:                                 0
  prjquota:                                 0
  journal_flush_delay:                      1000
  journal_flush_disabled:                   0
  journal_reclaim_delay:                    100
  journal_transaction_names:                1
  version_upgrade:                          [compatible] incompatible none 
  nocow:                                    0

members_v2 (size 968):
Device:                                     0
  Label:                                    3tb1 (2)
  UUID:                                     9a4d4248-5260-4877-b835-46fa8840031f
  Size:                                     2.73 TiB
  read errors:                              0
  write errors:                             0
  checksum errors:                          0
  seqread iops:                             0
  seqwrite iops:                            0
  randread iops:                            0
  randwrite iops:                           0
  Bucket size:                              512 KiB
  First bucket:                             0
  Buckets:                                  5723142
  Last mount:                               Fri May 17 09:04:59 2024
  Last superblock write:                    51
  State:                                    rw
  Data allowed:                             journal,btree,user
  Has data:                                 journal,btree,user,cached
  Durability:                               1
  Discard:                                  1
  Freespace initialized:                    1
Device:                                     1
  Label:                                    3tb2 (3)
  UUID:                                     a546376e-bce2-4468-b92b-66b4c20b05e2
  Size:                                     2.73 TiB
  read errors:                              0
  write errors:                             0
  checksum errors:                          0
  seqread iops:                             0
  seqwrite iops:                            0
  randread iops:                            0
  randwrite iops:                           0
  Bucket size:                              512 KiB
  First bucket:                             0
  Buckets:                                  5723142
  Last mount:                               Fri May 17 09:04:59 2024
  Last superblock write:                    51
  State:                                    rw
  Data allowed:                             journal,btree,user
  Has data:                                 journal,btree,user,cached
  Durability:                               1
  Discard:                                  1
  Freespace initialized:                    1
Device:                                     2
  Label:                                    1tb1 (6)
  UUID:                                     7fc17da9-cb17-43fe-9c5a-858527b2a5b4
  Size:                                     921 GiB
  read errors:                              0
  write errors:                             0
  checksum errors:                          0
  seqread iops:                             0
  seqwrite iops:                            0
  randread iops:                            0
  randwrite iops:                           0
  Bucket size:                              512 KiB
  First bucket:                             0
  Buckets:                                  1887225
  Last mount:                               Fri May 17 09:04:59 2024
  Last superblock write:                    51
  State:                                    rw
  Data allowed:                             journal,btree,user
  Has data:                                 journal,btree,user,cached
  Durability:                               1
  Discard:                                  0
  Freespace initialized:                    1
Device:                                     3
  Label:                                    1tb2 (7)
  UUID:                                     5e3a4dec-eb5e-4ba2-bb20-379300c4efd9
  Size:                                     921 GiB
  read errors:                              0
  write errors:                             0
  checksum errors:                          0
  seqread iops:                             0
  seqwrite iops:                            0
  randread iops:                            0
  randwrite iops:                           0
  Bucket size:                              512 KiB
  First bucket:                             0
  Buckets:                                  1887225
  Last mount:                               Fri May 17 09:04:59 2024
  Last superblock write:                    51
  State:                                    rw
  Data allowed:                             journal,btree,user
  Has data:                                 journal,btree,user,cached
  Durability:                               1
  Discard:                                  0
  Freespace initialized:                    1
Device:                                     4
  Label:                                    4tb1 (9)
  UUID:                                     4ae56eb2-9d58-411b-9179-bb7566cf77a4
  Size:                                     3.64 TiB
  read errors:                              0
  write errors:                             0
  checksum errors:                          0
  seqread iops:                             0
  seqwrite iops:                            0
  randread iops:                            0
  randwrite iops:                           0
  Bucket size:                              1.00 MiB
  First bucket:                             0
  Buckets:                                  3815430
  Last mount:                               Fri May 17 09:04:59 2024
  Last superblock write:                    51
  State:                                    rw
  Data allowed:                             journal,btree,user
  Has data:                                 journal,user,cached
  Durability:                               1
  Discard:                                  0
  Freespace initialized:                    1
Device:                                     5
  Label:                                    4tb2 (10)
  UUID:                                     52263edb-fb8e-43b6-8322-43ca05283785
  Size:                                     3.64 TiB
  read errors:                              0
  write errors:                             0
  checksum errors:                          0
  seqread iops:                             0
  seqwrite iops:                            0
  randread iops:                            0
  randwrite iops:                           0
  Bucket size:                              1.00 MiB
  First bucket:                             0
  Buckets:                                  3815430
  Last mount:                               Fri May 17 09:04:59 2024
  Last superblock write:                    51
  State:                                    rw
  Data allowed:                             journal,btree,user
  Has data:                                 journal,user,cached
  Durability:                               1
  Discard:                                  0
  Freespace initialized:                    1
Device:                                     6
  Label:                                    512gb (12)
  UUID:                                     c04b4cbf-2882-4587-975f-a1f221cb5b67
  Size:                                     447 GiB
  read errors:                              0
  write errors:                             0
  checksum errors:                          0
  seqread iops:                             0
  seqwrite iops:                            0
  randread iops:                            0
  randwrite iops:                           0
  Bucket size:                              512 KiB
  First bucket:                             0
  Buckets:                                  915690
  Last mount:                               Fri May 17 09:04:59 2024
  Last superblock write:                    51
  State:                                    rw
  Data allowed:                             journal,btree,user
  Has data:                                 journal,btree,user,cached
  Durability:                               1
  Discard:                                  0
  Freespace initialized:                    1

errors (size 8):

Bcachefs fs usage:

Filesystem: e43f8378-5cca-49c5-83c7-db8a8d09b09f
Size:                       13.8 TiB
Used:                       7.59 TiB
Online reserved:             407 MiB

Data type       Required/total  Durability    Devices
btree:          1/1             1             [dm-5]              4.97 GiB
btree:          1/1             1             [dm-10]             85.3 MiB
btree:          1/1             1             [dm-8]              6.16 GiB
btree:          1/1             1             [dm-9]              4.93 GiB
btree:          1/1             1             [dm-4]              6.18 GiB
user:           1/1             1             [dm-4]              1.69 MiB
user:           1/1             1             [dm-9]              2.07 TiB
user:           1/1             1             [dm-11]             1.66 TiB
user:           1/1             1             [dm-5]              2.07 TiB
user:           1/1             1             [dm-8]               204 KiB
user:           1/1             1             [dm-12]             1.66 TiB
user:           1/1             1             [dm-10]             73.8 GiB
cached:         1/1             1             [dm-4]               220 GiB
cached:         1/1             1             [dm-5]              44.3 GiB
cached:         1/1             1             [dm-11]             29.3 GiB
cached:         1/1             1             [dm-8]               220 GiB
cached:         1/1             1             [dm-12]             29.3 GiB
cached:         1/1             1             [dm-10]              867 MiB
cached:         1/1             1             [dm-9]              44.3 GiB

hdd.sas.4tb1 (device 4):       dm-12              rw
                                data         buckets    fragmented
  free:                     1.92 TiB         2016268
  sb:                       3.00 MiB               4      1020 KiB
  journal:                  8.00 GiB            8192
  btree:                         0 B               0
  user:                     1.66 TiB         1786673      48.8 GiB
  cached:                   29.3 GiB            4293
  parity:                        0 B               0
  stripe:                        0 B               0
  need_gc_gens:                  0 B               0
  need_discard:                  0 B               0
  capacity:                 3.64 TiB         3815430

hdd.sas.4tb2 (device 5):       dm-11              rw
                                data         buckets    fragmented
  free:                     1.92 TiB         2016635
  sb:                       3.00 MiB               4      1020 KiB
  journal:                  8.00 GiB            8192
  btree:                         0 B               0
  user:                     1.66 TiB         1786283      48.5 GiB
  cached:                   29.3 GiB            4316
  parity:                        0 B               0
  stripe:                        0 B               0
  need_gc_gens:                  0 B               0
  need_discard:                  0 B               0
  capacity:                 3.64 TiB         3815430

hdd.sata.3tb1 (device 0):       dm-5              rw
                                data         buckets    fragmented
  free:                      577 GiB         1180858
  sb:                       3.00 MiB               7       508 KiB
  journal:                  4.00 GiB            8192
  btree:                    4.97 GiB           19817      4.71 GiB
  user:                     2.07 TiB         4495469      72.4 GiB
  cached:                   44.3 GiB           18798
  parity:                        0 B               0
  stripe:                        0 B               0
  need_gc_gens:                  0 B               0
  need_discard:              512 KiB               1
  capacity:                 2.73 TiB         5723142

hdd.sata.3tb2 (device 1):       dm-9              rw
                                data         buckets    fragmented
  free:                      577 GiB         1180950
  sb:                       3.00 MiB               7       508 KiB
  journal:                  4.00 GiB            8192
  btree:                    4.93 GiB           19679      4.68 GiB
  user:                     2.07 TiB         4495372      72.3 GiB
  cached:                   44.3 GiB           18942
  parity:                        0 B               0
  stripe:                        0 B               0
  need_gc_gens:                  0 B               0
  need_discard:                  0 B               0
  capacity:                 2.73 TiB         5723142

ssd.nvme.1tb1 (device 2):       dm-8              rw
                                data         buckets    fragmented
  free:                      681 GiB         1394014
  sb:                       3.00 MiB               7       508 KiB
  journal:                  4.00 GiB            8192
  btree:                    6.16 GiB           22733      4.94 GiB
  user:                      204 KiB               2       820 KiB
  cached:                    220 GiB          462272
  parity:                        0 B               0
  stripe:                        0 B               0
  need_gc_gens:                  0 B               0
  need_discard:             2.50 MiB               5
  capacity:                  921 GiB         1887225

ssd.nvme.1tb2 (device 3):       dm-4              rw
                                data         buckets    fragmented
  free:                      681 GiB         1394096
  sb:                       3.00 MiB               7       508 KiB
  journal:                  4.00 GiB            8192
  btree:                    6.18 GiB           22901      5.00 GiB
  user:                     1.69 MiB               4       340 KiB
  cached:                    220 GiB          462024
  parity:                        0 B               0
  stripe:                        0 B               0
  need_gc_gens:                  0 B               0
  need_discard:              512 KiB               1
  capacity:                  921 GiB         1887225

ssd.sata.512gb (device 6):     dm-10              rw
                                data         buckets    fragmented
  free:                      369 GiB          755046
  sb:                       3.00 MiB               7       508 KiB
  journal:                  3.49 GiB            7153
  btree:                    85.3 MiB             230      29.8 MiB
  user:                     73.8 GiB          153169      1.01 GiB
  cached:                    867 MiB              85
  parity:                        0 B               0
  stripe:                        0 B               0
  need_gc_gens:                  0 B               0
  need_discard:                  0 B               0
  capacity:                  447 GiB          915690

It recovered fine after a forced reboot.
Sadly the kernel is tainted due to nvidia.

@raldone01 raldone01 changed the title Bcachefs hangs when doing lots of write to a nocow folder Bcachefs hangs when doing lots of writes to a nocow folder May 17, 2024
@ramonacat
Copy link

ramonacat commented May 18, 2024

I'm seeing what seems to be the same issue, even though I'm not using nocow. There's a lot of both reads and writes happening to the drive, but interestingly minio is barely doing anything.
I'm happy to provide more information as needed, but not quite sure which information is useful here.

[ 9462.931559] INFO: task minio:14020 blocked for more than 1228 seconds.
[ 9462.931587]       Tainted: G        W          6.9.0 #1-NixOS
[ 9462.931595] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 9462.931606] task:minio           state:D stack:0     pid:14020 tgid:14014 ppid:1      flags:0x00000000
[ 9462.931609] Call Trace:
[ 9462.931611]  <TASK>
[ 9462.931613]  __schedule+0x3ec/0x1540
[ 9462.931619]  ? bch2_btree_path_traverse_one+0x47d/0xb60 [bcachefs]
[ 9462.931674]  ? bch2_btree_key_cache_find+0x181/0x1b0 [bcachefs]
[ 9462.931716]  schedule+0x27/0xf0
[ 9462.931719]  io_schedule+0x46/0x70
[ 9462.931720]  folio_wait_bit_common+0x13f/0x340
[ 9462.931724]  ? __pfx_wake_page_function+0x10/0x10
[ 9462.931728]  folio_wait_writeback+0x2b/0x80
[ 9462.931730]  truncate_inode_partial_folio+0x5b/0x190
[ 9462.931733]  truncate_inode_pages_range+0x1de/0x400
[ 9462.931740]  truncate_pagecache+0x47/0x60
[ 9462.931742]  bchfs_truncate+0x159/0x3c0 [bcachefs]
[ 9462.931793]  notify_change+0x1f2/0x4c0
[ 9462.931796]  ? do_truncate+0x98/0xf0
[ 9462.931799]  do_truncate+0x98/0xf0
[ 9462.931802]  path_openat+0xf96/0x1150
[ 9462.931806]  do_filp_open+0xc4/0x170
[ 9462.931810]  do_sys_openat2+0xab/0xe0
[ 9462.931812]  ? __x64_sys_epoll_pwait+0x95/0x140
[ 9462.931817]  __x64_sys_openat+0x57/0xa0
[ 9462.931819]  do_syscall_64+0xb8/0x200
[ 9462.931821]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[ 9462.931825] RIP: 0033:0x40708e
[ 9462.931841] RSP: 002b:000000c0020ceae8 EFLAGS: 00000206 ORIG_RAX: 0000000000000101
[ 9462.931843] RAX: ffffffffffffffda RBX: ffffffffffffff9c RCX: 000000000040708e
[ 9462.931844] RDX: 0000000000081241 RSI: 000000c08d3bd4f0 RDI: ffffffffffffff9c
[ 9462.931845] RBP: 000000c0020ceb28 R08: 0000000000000000 R09: 0000000000000000
[ 9462.931846] R10: 00000000000001b6 R11: 0000000000000206 R12: 000000c08d3bd4f0
[ 9462.931847] R13: 0000000000000000 R14: 000000c002169340 R15: 0fffffffffffffff
[ 9462.931850]  </TASK>

EDIT(2024-05-19): I tried a couple things - did mount -t bcachefs -ofsck,fix_errors ... on kernel 6.8.10, and downgraded the machine down to that kernel - the hangs are still present. The other thing I've done recently was adding the 3rd HDD, so I think this might be some balancing issues (I have data_replicas=2,metadata_replicas=2, so I assume some rebalancing needs to happen on writes)?

bcachefs fs usage /mnt/nas3:

Filesystem: 8f552709-24e3-4387-8183-23878c94d00b
Size:                 46521872338432
Used:                 37175092178432
Online reserved:             3448832

Data type       Required/total  Durability    Devices
btree:          1/2             2             [nvme1n1 nvme0n1] 257802371072
user:           1/2             2             [nvme0n1 sdb]        9871360
user:           1/2             2             [sdh sda]      1936855717376
user:           1/2             2             [sdg nvme0n1]      689984512
user:           1/2             2             [nvme1n1 sdb]       13164544
user:           1/2             2             [sdf sdi]          797582336
user:           1/2             2             [sdg sdi]     30356595159552
user:           1/2             2             [nvme1n1 sdf]        7528448
user:           1/2             2             [nvme0n1 sdf]        3940352
user:           1/2             2             [sdf sda]         1139384320
user:           1/2             2             [sda sdi]        12542515712
user:           1/2             2             [sdg sdh]      1108064192512
user:           1/2             2             [sdg sda]         9071634432
user:           1/2             2             [sdh nvme0n1]    37839261184
user:           1/2             2             [sdh sdi]      1100391740928
user:           1/2             2             [nvme1n1 sda]        7716864
user:           1/2             2             [nvme1n1 sdi]      331915776
user:           1/2             2             [nvme0n1 sda]        5980160
user:           1/2             2             [nvme0n1 sdi]      333169664
user:           1/2             2             [sdf sdb]            6447104
user:           1/2             2             [sda sdb]          903544832
user:           1/2             2             [sdb sdi]        13918672896
user:           1/2             2             [sdg nvme1n1]      685217792
user:           1/2             2             [sdg sdf]          764903936
user:           1/2             2             [sdg sdb]         9017686016
user:           1/2             2             [sdh nvme1n1]    37822008320
user:           1/2             2             [sdh sdf]       122288275456
user:           1/2             2             [sdh sdb]      1936656927744
user:           1/2             2             [nvme1n1 nvme0n1] 191724323840
cached:         1/1             1             [sdh]          1716577348096

hdd.hdd1 (device 0):             sdg              rw
                                data         buckets    fragmented
  free:                 250023510016          238441
  sb:                        3149824               4       1044480
  journal:                8589934592            8192
  btree:                           0               0
  user:               15742445061632        15013011
  cached:                          0               0
  parity:                          0               0
  stripe:                          0               0
  need_gc_gens:                    0               0
  need_discard:                    0               0
  capacity:           16000900661248        15259648

hdd.hdd2 (device 1):             sdh              rw
                                data         buckets    fragmented
  free:               10990322188288        10481188
  sb:                        3149824               4       1044480
  journal:                8589934592            8192
  btree:                           0               0
  user:                3139965637120         2994506       1855488
  cached:              1716577348096         1775750
  parity:                          0               0
  stripe:                          0               0
  need_gc_gens:                    0               0
  need_discard:              8388608               8
  capacity:           16000900661248        15259648

hdd.hdd4 (device 8):             sdi              rw
                                data         buckets    fragmented
  free:                 250021412864          238439
  sb:                        3149824               4       1044480
  journal:                8589934592            8192
  btree:                           0               0
  user:               15742447779328        15013013        290816
  cached:                          0               0
  parity:                          0               0
  stripe:                          0               0
  need_gc_gens:                    0               0
  need_discard:                    0               0
  capacity:           16000900661248        15259648

nvme.nvme1 (device 3):       nvme1n1              rw
                                data         buckets    fragmented
  free:                   3899654144            7438
  sb:                        3149824               7        520192
  journal:                1953497088            3726
  btree:                128901185536          245870       5505024
  user:                 115295932928          219909
  cached:                          0               0
  parity:                          0               0
  stripe:                          0               0
  need_gc_gens:                    0               0
  need_discard:                    0               0
  capacity:             250059161600          476950

nvme.nvme2 (device 4):       nvme0n1              rw
                                data         buckets    fragmented
  free:                   3892314112            7424
  sb:                        3149824               7        520192
  journal:                1953497088            3726
  btree:                128901185536          245870       5505024
  user:                 115303263744          219923
  cached:                          0               0
  parity:                          0               0
  stripe:                          0               0
  need_gc_gens:                    0               0
  need_discard:                    0               0
  capacity:             250059161600          476950

ssd.ssd1 (device 7):             sdb              rw
                                data         buckets    fragmented
  free:                  15642656768           29836
  sb:                        3149824               7        520192
  journal:                4294967296            8192
  btree:                           0               0
  user:                 980263374848         1869704
  cached:                          0               0
  parity:                          0               0
  stripe:                          0               0
  need_gc_gens:                    0               0
  need_discard:                    0               0
  capacity:            1000204664832         1907739

ssd.ssd2 (device 6):             sda              rw
                                data         buckets    fragmented
  free:                  15642656768           29836
  sb:                        3149824               7        520192
  journal:                4294967296            8192
  btree:                           0               0
  user:                 980263375872         1869704
  cached:                          0               0
  parity:                          0               0
  stripe:                          0               0
  need_gc_gens:                    0               0
  need_discard:                    0               0
  capacity:            1000204664832         1907739

ssd.ssd3 (device 5):             sdf              rw
                                data         buckets    fragmented
  free:                   1015021568            1936
  sb:                        3149824               7        520192
  journal:                 500170752             954
  btree:                           0               0
  user:                  62504042496          119217
  cached:                          0               0
  parity:                          0               0
  stripe:                          0               0
  need_gc_gens:                    0               0
  need_discard:                    0               0
  capacity:              64022904832          122114

sudo bcachefs show-super /dev/sda:

Device:                                     Samsung SSD 860
External UUID:                              8f552709-24e3-4387-8183-23878c94d00b
Internal UUID:                              51b7fa13-7ca1-44dc-9203-27fa8a2dc39f
Magic number:                               c68573f6-66ce-90a9-d96a-60cf803df7ef
Device index:                               6
Label:
Version:                                    1.4: member_seq
Version upgrade complete:                   1.4: member_seq
Oldest version on disk:                     0.29: snapshot_trees
Created:                                    Wed Nov  8 08:23:40 2023
Sequence number:                            457
Time of last write:                         Sun May 19 15:42:14 2024
Superblock size:                            9.70 KiB/1.00 MiB
Clean:                                      0
Devices:                                    8
Sections:                                   members_v1,replicas_v0,disk_groups,clean,journal_seq_blacklist,journal_v2,counters,members_v2,errors,ext,downgrade
Features:                                   zstd,journal_seq_blacklist_v3,reflink,new_siphash,inline_data,new_extent_overwrite,btree_ptr_v2,extents_above_btree_updates,btree_updates_journalled,reflink_inline_data,new_varint,journal_no_flush,alloc_v2,extents_across_btree_nodes
Compat features:                            alloc_info,alloc_metadata,extents_above_btree_updates_done,bformat_overflow_done

Options:
  block_size:                               4.00 KiB
  btree_node_size:                          256 KiB
  errors:                                   continue [ro] panic
  metadata_replicas:                        2
  data_replicas:                            2
  metadata_replicas_required:               1
  data_replicas_required:                   1
  encoded_extent_max:                       64.0 KiB
  metadata_checksum:                        none [crc32c] crc64 xxhash
  data_checksum:                            none [crc32c] crc64 xxhash
  compression:                              zstd
  background_compression:                   none
  str_hash:                                 crc32c crc64 [siphash]
  metadata_target:                          nvme
  foreground_target:                        nvme
  background_target:                        hdd
  promote_target:                           ssd
  erasure_code:                             0
  inodes_32bit:                             1
  shard_inode_numbers:                      1
  inodes_use_key_cache:                     1
  gc_reserve_percent:                       8
  gc_reserve_bytes:                         0 B
  root_reserve_percent:                     0
  wide_macs:                                0
  acl:                                      1
  usrquota:                                 0
  grpquota:                                 0
  prjquota:                                 0
  journal_flush_delay:                      1000
  journal_flush_disabled:                   0
  journal_reclaim_delay:                    100
  journal_transaction_names:                1
  version_upgrade:                          [compatible] incompatible none
  nocow:                                    0

members_v2 (size 1240):
Device:                                     0
  Label:                                    hdd1 (1)
  UUID:                                     521ccb40-ec62-4884-a0d9-1794b4e147f9
  Size:                                     14.6 TiB
  read errors:                              96369047
  write errors:                             122672560
  checksum errors:                          259
  seqread iops:                             0
  seqwrite iops:                            0
  randread iops:                            0
  randwrite iops:                           0
  Bucket size:                              1.00 MiB
  First bucket:                             0
  Buckets:                                  15259648
  Last mount:                               Sun May 19 15:41:41 2024
  Last superblock write:                    457
  State:                                    rw
  Data allowed:                             journal,btree,user
  Has data:                                 journal,user,cached
  Durability:                               1
  Discard:                                  0
  Freespace initialized:                    1
Device:                                     1
  Label:                                    hdd2 (2)
  UUID:                                     0329232d-9462-4a3b-b8c9-3f5f53cb55b0
  Size:                                     14.6 TiB
  read errors:                              0
  write errors:                             0
  checksum errors:                          0
  seqread iops:                             0
  seqwrite iops:                            0
  randread iops:                            0
  randwrite iops:                           0
  Bucket size:                              1.00 MiB
  First bucket:                             0
  Buckets:                                  15259648
  Last mount:                               Sun May 19 15:41:41 2024
  Last superblock write:                    457
  State:                                    rw
  Data allowed:                             journal,btree,user
  Has data:                                 journal,user,cached
  Durability:                               1
  Discard:                                  0
  Freespace initialized:                    1
Device:                                     3
  Label:                                    nvme1 (5)
  UUID:                                     1649225b-4920-48c1-90e6-494a7c6136f1
  Size:                                     233 GiB
  read errors:                              0
  write errors:                             0
  checksum errors:                          108
  seqread iops:                             0
  seqwrite iops:                            0
  randread iops:                            0
  randwrite iops:                           0
  Bucket size:                              512 KiB
  First bucket:                             0
  Buckets:                                  476950
  Last mount:                               Sun May 19 15:41:41 2024
  Last superblock write:                    457
  State:                                    rw
  Data allowed:                             journal,btree,user
  Has data:                                 journal,btree,user,cached
  Durability:                               1
  Discard:                                  0
  Freespace initialized:                    1
Device:                                     4
  Label:                                    nvme2 (6)
  UUID:                                     3d764a09-f6a3-49b4-b649-e4b05102d6e3
  Size:                                     233 GiB
  read errors:                              0
  write errors:                             0
  checksum errors:                          84
  seqread iops:                             0
  seqwrite iops:                            0
  randread iops:                            0
  randwrite iops:                           0
  Bucket size:                              512 KiB
  First bucket:                             0
  Buckets:                                  476950
  Last mount:                               Sun May 19 15:41:41 2024
  Last superblock write:                    457
  State:                                    rw
  Data allowed:                             journal,btree,user
  Has data:                                 journal,btree,user,cached
  Durability:                               1
  Discard:                                  0
  Freespace initialized:                    1
Device:                                     5
  Label:                                    ssd3 (8)
  UUID:                                     992ca2ac-c9f7-4843-b4ae-10b90494486e
  Size:                                     59.6 GiB
  read errors:                              0
  write errors:                             0
  checksum errors:                          502
  seqread iops:                             0
  seqwrite iops:                            0
  randread iops:                            0
  randwrite iops:                           0
  Bucket size:                              512 KiB
  First bucket:                             0
  Buckets:                                  122114
  Last mount:                               Sun May 19 15:41:41 2024
  Last superblock write:                    457
  State:                                    rw
  Data allowed:                             journal,btree,user
  Has data:                                 user,cached
  Durability:                               1
  Discard:                                  0
  Freespace initialized:                    1
Device:                                     6
  Label:                                    ssd2 (9)
  UUID:                                     2d7e9ae0-ded9-4dab-9d72-91e7bf0b23a9
  Size:                                     932 GiB
  read errors:                              0
  write errors:                             0
  checksum errors:                          860
  seqread iops:                             0
  seqwrite iops:                            0
  randread iops:                            0
  randwrite iops:                           0
  Bucket size:                              512 KiB
  First bucket:                             0
  Buckets:                                  1907739
  Last mount:                               Sun May 19 15:41:41 2024
  Last superblock write:                    457
  State:                                    rw
  Data allowed:                             journal,btree,user
  Has data:                                 user,cached
  Durability:                               1
  Discard:                                  0
  Freespace initialized:                    1
Device:                                     7
  Label:                                    ssd1 (10)
  UUID:                                     b83f5c9c-867f-49e3-a98b-c54efb1546d6
  Size:                                     932 GiB
  read errors:                              0
  write errors:                             0
  checksum errors:                          1738
  seqread iops:                             0
  seqwrite iops:                            0
  randread iops:                            0
  randwrite iops:                           0
  Bucket size:                              512 KiB
  First bucket:                             0
  Buckets:                                  1907739
  Last mount:                               Sun May 19 15:41:41 2024
  Last superblock write:                    457
  State:                                    rw
  Data allowed:                             journal,btree,user
  Has data:                                 user,cached
  Durability:                               1
  Discard:                                  0
  Freespace initialized:                    1
Device:                                     8
  Label:                                    hdd4 (11)
  UUID:                                     e6dcdef9-a550-45c9-9b15-bc70c966749d
  Size:                                     14.6 TiB
  read errors:                              0
  write errors:                             0
  checksum errors:                          17076
  seqread iops:                             0
  seqwrite iops:                            0
  randread iops:                            0
  randwrite iops:                           0
  Bucket size:                              1.00 MiB
  First bucket:                             0
  Buckets:                                  15259648
  Last mount:                               Sun May 19 15:41:41 2024
  Last superblock write:                    457
  State:                                    rw
  Data allowed:                             journal,btree,user
  Has data:                                 journal,user,cached
  Durability:                               1
  Discard:                                  0
  Freespace initialized:                    1

errors (size 40):
deleted_inode_missing                       3               Sat May 18 13:58:05 2024
unlinked_inode_not_on_deleted_list          5               Sun May 19 13:02:06 2024

EDIT(2024-05-19): I did an experiment and deleted a big file - the processes that were stuck got unstuck. I suspect they will come back to being stuck again, but hopefully this provides some fuel for investigation.

ramonacat added a commit to ramonacat/monorepo that referenced this issue May 19, 2024
6.9 seems to be causing issues with stablity, wait till
koverstreet/bcachefs#680 is resolved to return
to newer kernels.
@raldone01
Copy link
Author

raldone01 commented May 19, 2024

It just happened again.
This time it failed to mount.
I just added fsck,fix_errors to hopefully recover the data and mount it again.

I am running:

❯ uname -a
Linux argon 6.8.9-arch1-2 #1 SMP PREEMPT_DYNAMIC Tue, 07 May 2024 21:35:54 +0000 x86_64 GNU/Linux
❯ cat /proc/cmdline 
root=UUID=43650f9d-2143-4de8-b163-e0df92c6ebf0 rootflags=rw,noatime,compress=zstd:3,ssd,discard=async,space_cache=v2,autodefrag,subvolid=258,subvol=/@ rw loglevel=3 bgrt_disable quiet nvidia_drm.modeset=1 lsm=landlock,lockdown,yama,integrity,apparmor,bpf intel_iommu=on iommu=pt

My rootfs thankfully is btrfs so the machine booted fine. I will have to pause my heavy writes until this is fixed. :(

@ramonacat which kernel version did you downgrade to? Did you encounter any more hangs? I will try to remove the nocow attribute and see if that helps a bit.

@ramonacat
Copy link

I downgraded to 6.8.10 (from 6.9.0). But it does not seem to have changed the situation. The issue in my case seems to be that the filesystem gets stuck instead of moving buckets around to use the free space.

@EvilDragon
Copy link

This seems to be very similar or the same I have with #677

I've only posted that on IRC already.

Regardless whether the filesystem / a folder is cow or nocow, regardless whether I'm using compression or not: As soon as I write something to the bcachefs drives, it goes slower and slower and eventually stalls.

In my case, whenever this happens, all writes to other filesystems are slow as well (around 70 - 300kB/s), so whatever bcachefs does, it's affecting the whole system.

It happened both on kernel 6.8 and 6.9. And I've now let it run for 5 days without writing to it, which works fine, so it definitely has something to do with writing.

As can be seen #677, it also happened to me after adding a new drive, and rebalancing has the same hangs, so this could be a pointer in the right direction.

@ramonacat
Copy link

I managed to temporarily work around this by adding a couple drives I had lying around to the array.,

@EvilDragon
Copy link

I managed to temporarily work around this by adding a couple drives I had lying around to the array.,

Could you elaborate some more info?
What drives? SSD? HDD? How many? Did you remove them afterwards again?

I can add some temporary external drives, but would like to remove them again after the issue is gone, that's why I'm asking :)

@ramonacat
Copy link

One SSD and one HDD, tho I don't think it matters. I don't think I can remove them, I think there's just some problem with allocations.

@EvilDragon
Copy link

Quick update: I added a second 2TB SSD to my setup and it also resolved the issue.
Weird :)

@darkskiez
Copy link

I don't have any nocow data, but I did try enabling compression attribute on a folder with replicas=1 and then upping replicas to 2, I don't know if that plays into it

With bcachefs-for-upstream v6.10-rc2-4-ga9cf489be39f I get this frequently.

[ 1330.210841] INFO: task bch-rebalance/3:1481 blocked for more than 1208 seconds.
[ 1330.211609] Tainted: G OE 6.10.0-rc2+ #2
[ 1330.212373] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 1330.213153] task:bch-rebalance/3 state:D stack:0 pid:1481 tgid:1481 ppid:2 flags:0x00004000
[ 1330.213956] Call Trace:
[ 1330.214745]
[ 1330.215533] __schedule+0x3eb/0xb40
[ 1330.216314] schedule+0x27/0xf0
[ 1330.217088] __closure_sync+0x7e/0x140
[ 1330.217868] __bch2_bucket_nocow_lock+0xb7/0x120 [bcachefs]
[ 1330.218779] ? __pfx_closure_sync_fn+0x10/0x10
[ 1330.219576] bch2_data_update_init+0xdf8/0x13e0 [bcachefs]
[ 1330.220473] ? bch2_btree_iter_peek_slot+0x2a1/0x740 [bcachefs]
[ 1330.221347] ? __pfx_autoremove_wake_function+0x10/0x10
[ 1330.222147] ? bch2_move_extent+0x3d9/0xac0 [bcachefs]
[ 1330.223081] bch2_move_extent+0x3d9/0xac0 [bcachefs]
[ 1330.223947] ? do_rebalance_extent+0x2fb/0x7b0 [bcachefs]
[ 1330.224839] do_rebalance_extent+0x2fb/0x7b0 [bcachefs]
[ 1330.225715] do_rebalance+0x312/0x8b0 [bcachefs]
[ 1330.226570] ? lruvec_stat_mod_folio.constprop.0+0x1c/0x30
[ 1330.227351] ? __kmalloc_large_node+0x9f/0x110
[ 1330.228133] ? local_clock_noinstr+0xd/0xc0
[ 1330.228909] ? local_clock+0x15/0x30
[ 1330.229669] ? __bch2_trans_get+0x18a/0x290 [bcachefs]
[ 1330.230567] ? mutex_lock+0x12/0x30
[ 1330.231327] ? __pfx_bch2_rebalance_thread+0x10/0x10 [bcachefs]
[ 1330.232185] bch2_rebalance_thread+0x66/0xb0 [bcachefs]
[ 1330.233044] ? bch2_rebalance_thread+0x5c/0xb0 [bcachefs]
[ 1330.233901] ? __pfx_closure_sync_fn+0x10/0x10
[ 1330.234668] kthread+0xcf/0x100
[ 1330.235428] ? __pfx_kthread+0x10/0x10
[ 1330.236180] ret_from_fork+0x31/0x50
[ 1330.236923] ? __pfx_kthread+0x10/0x10
[ 1330.237658] ret_from_fork_asm+0x1a/0x30
[ 1330.238395]

@raldone01
Copy link
Author

I had a borg cache directory on the bcachefs and a backup consistently triggered kernel thread timeouts (hung threads). Nocow did not seem to make a difference. I moved the cache to a different drive for now.

PS: Is there a way to remove nocow with bcachefs setattr?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants