Skip to contentSkip to conversation

btrfs_commit_transaction error -11 on ZONED device

BUG Qiyu Yan 1 participant 4 messages Feb 8 Btrfs file system

lore
Share & tools
lore

Qiyu Yan

author
#0 lore raw

Hi all,

I am facing another issue with btrfs on zoned device, the filesystem goes ro when writing several TBs of files to it (6.18.7-200.fc43.x86_64 kernel)

BTRFS: error (device sdg) in btrfs_commit_transaction:2536: errno=-11 unknown (Error while writing out transaction) BTRFS info (device sdg state E): forced readonly
BTRFS warning (device sdg state E): Skipping commit of aborted transaction.

------------[ cut here ]------------
BTRFS: Transaction aborted (error -11)
WARNING: CPU: 4 PID: 44149 at fs/btrfs/transaction.c:2021 cleanup_transaction+0xd0/0xe0
Modules linked in: nft_flow_offload nf_flow_table_inet nf_flow_table nft_nat nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib veth bridge cfg80211 vfio_pci vfio_pci_core vfio_iommu_type1 vfio iommufd macvlan wireguard libcurve25519 ip6_udp_tunnel udp_tunnel 8021q garp mrp stp llc rfkill nf_conntrack_netbios_ns nf_conntrack_broadcast nft_redir nft_masq nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_chain_nat nf_nat nft_socket nf_socket_ipv4 nf_socket_ipv6 nft_ct nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables nct6775 nct6775_core hwmon_vid binfmt_misc vfat fat intel_rapl_msr intel_rapl_common edac_mce_amd ipmi_ssif kvm_amd snd_hda_codec_nvhdmi xfs snd_hda_codec_hdmi snd_hda_intel kvm snd_hda_codec snd_hda_core snd_intel_dspcfg snd_intel_sdw_acpi irqbypass snd_hwdep rapl acpi_cpufreq snd_seq pcspkr snd_seq_device acpi_ipmi snd_pcm ipmi_si snd_timer ipmi_devintf snd i2c_piix4 ipmi_msghandler ptdma k10temp i2c_smbus soundcore mlx5_ib mlx5_fwctl macsec fwctl nfsd auth_rpcgss nfs_acl tcp_bbr
 lockd grace nfs_localio nvidia_drm(OE) nvidia_uvm(OE) nvidia_modeset(OE) drivetemp drm_ttm_helper nvidia(OE) ttm tun video wmi loop zram lz4hc_compress lz4_compress overlay erofs netfs mlx5_core nvme_tcp nvme nvme_fabrics polyval_clmulni nvme_core ghash_clmulni_intel ast mlxfw igb nvme_keyring psample nvme_auth dca hkdf i2c_algo_bit sp5100_tco be2iscsi bnx2i cnic uio cxgb4i cxgb4 tls cxgb3i cxgb3 rpcrdma mdio libcxgbi libcxgb qla4xxx iscsi_boot_sysfs sunrpc iscsi_tcp libiscsi_tcp rdma_ucm ib_uverbs ib_srpt ib_isert iscsi_target_mod target_core_mod ib_iser libiscsi scsi_transport_iscsi ib_umad rdma_cm ib_ipoib scsi_dh_rdac iw_cm scsi_dh_emc scsi_dh_alua ib_cm fuse ib_core dm_multipath nfnetlink
CPU: 4 UID: 0 PID: 44149 Comm: btrfs-transacti Tainted: G     U  OE       6.18.7-200.fc43.x86_64 #1 PREEMPT(lazy)
Tainted: [U]=USER, [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./EPYCD8, BIOS L2.52 11/25/2020
RIP: 0010:cleanup_transaction+0xd0/0xe0
Code: be 00 48 8b 45 28 48 8d 4d 28 49 89 cf 48 39 c1 0f 85 a5 22 87 ff e9 9f 23 87 ff 44 89 ee 48 c7 c7 20 55 44 bd e8 a0 b3 9e ff <0f> 0b eb a8 0f 0b e9 5f ff ff ff 0f 1f 44 00 00 90 90 90 90 90 90
RSP: 0018:ffffcde5f977fda8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff8d06c4fb7000 RCX: 0000000000000000
RDX: ffff8d2588a2b308 RSI: 0000000000000001 RDI: ffff8d2588a1cfc0
RBP: ffff8d06fbeef600 R08: 0000000000000000 R09: ffffcde5f977fc50
R10: ffff8d2586c7ffa8 R11: 00000000fffeffff R12: ffff8d070f6dea80
R13: 00000000fffffff5 R14: 00000000fffffff5 R15: ffff8d06c4fb7320
FS:  0000000000000000(0000) GS:ffff8d25c8429000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f09ffd76000 CR3: 0000000134139000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 btrfs_commit_transaction+0xb2e/0xd20
 transaction_kthread+0x157/0x1c0
 ? __pfx_transaction_kthread+0x10/0x10
 kthread+0xfc/0x240
 ? __pfx_kthread+0x10/0x10
 ret_from_fork+0xf4/0x110
 ? __pfx_kthread+0x10/0x10
 ret_from_fork_asm+0x1a/0x30
 </TASK>
---[ end trace 0000000000000000 ]---

BTRFS: error (device sdg state EA) in cleanup_transaction:2021: errno=-11 unknown
BTRFS error (device sdg state EA): cow_file_range failed, root=257 inode=3206 start=341311488 len=524288 cur_offset=341311488 cur_alloc_size=0: -30 BTRFS error (device sdg state EA): submit_uncompressed_range failed, root=257 inode=3206 start=341311488 len=524288: -30 BTRFS error (device sdg state EA): cow_file_range failed, root=257 inode=3204 start=513343488 len=524288 cur_offset=513343488 cur_alloc_size=0: -30 BTRFS error (device sdg state EA): submit_uncompressed_range failed, root=257 inode=3204 start=513343488 len=524288: -30 BTRFS error (device sdg state EA): cow_file_range failed, root=257 inode=3203 start=588185600 len=163840 cur_offset=588185600 cur_alloc_size=0: -30 BTRFS error (device sdg state EA): submit_uncompressed_range failed, root=257 inode=3203 start=588185600 len=163840: -30 BTRFS error (device sdg state EA): cow_file_range failed, root=257 inode=3203 start=655785984 len=524288 cur_offset=655785984 cur_alloc_size=0: -30 BTRFS error (device sdg state EA): submit_uncompressed_range failed, root=257 inode=3203 start=655785984 len=524288: -30 BTRFS error (device sdg state EA): cow_file_range failed, root=257 inode=3203 start=730791936 len=524288 cur_offset=730791936 cur_alloc_size=0: -30 BTRFS error (device sdg state EA): submit_uncompressed_range failed, root=257 inode=3203 start=730791936 len=524288: -30 BTRFS error (device sdg state EA): cow_file_range failed, root=257 inode=3205 start=805634048 len=163840 cur_offset=805634048 cur_alloc_size=0: -30 BTRFS error (device sdg state EA): submit_uncompressed_range failed, root=257 inode=3205 start=805634048 len=163840: -30 BTRFS error (device sdg state EA): cow_file_range failed, root=257 inode=3205 start=880115712 len=524288 cur_offset=880115712 cur_alloc_size=0: -30 BTRFS error (device sdg state EA): submit_uncompressed_range failed, root=257 inode=3205 start=880115712 len=524288: -30 BTRFS error (device sdg state EA): cow_file_range failed, root=257 inode=3205 start=954957824 len=163840 cur_offset=954957824 cur_alloc_size=0: -30 BTRFS error (device sdg state EA): submit_uncompressed_range failed, root=257 inode=3205 start=954957824 len=163840: -30 BTRFS error (device sdg state EA): cow_file_range failed, root=257 inode=3205 start=1029439488 len=524288 cur_offset=1029439488 cur_alloc_size=0: -30 BTRFS error (device sdg state EA): submit_uncompressed_range failed, root=257 inode=3205 start=1029439488 len=524288: -30 BTRFS error (device sdg state EA): cow_file_range failed, root=257 inode=3205 start=1104281600 len=163840 cur_offset=1104281600 cur_alloc_size=0: -30 BTRFS error (device sdg state EA): submit_uncompressed_range failed, root=257 inode=3205 start=1104281600 len=163840: -30 BTRFS error (device sdg state EA): cow_file_range failed, root=257 inode=3204 start=1284046848 len=524288 cur_offset=1284046848 cur_alloc_size=0: -30 BTRFS error (device sdg state EA): cow_file_range failed, root=257 inode=3205 start=1293680640 len=524288 cur_offset=1293680640 cur_alloc_size=0: -30
submit_uncompressed_range: 1 callbacks suppressed
BTRFS error (device sdg state EA): submit_uncompressed_range failed, root=257 inode=3205 start=1293680640 len=524288: -30

Remount on git latest kernel also show similar error:

BTRFS: error (device vda) in btrfs_commit_transaction:2555: errno=-11 unknown (Error while writing out transaction) BTRFS info (device vda state E): forced readonly
BTRFS warning (device vda state E): Skipping commit of aborted transaction.

------------[ cut here ]------------
BTRFS: Transaction aborted (error -11)
WARNING: fs/btrfs/transaction.c:2037 at btrfs_commit_transaction+0xe24/0xef0, CPU#0: btrfs-transacti/588
CPU: 0 UID: 0 PID: 588 Comm: btrfs-transacti Not tainted 6.19.0-rc8-00216-ge98f34af6116 #7 PREEMPT(voluntary)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS edk2-20251119-3.fc43 11/19/2025
RIP: 0010:btrfs_commit_transaction+0xe2c/0xef0
Code: 48 81 c7 50 03 00 00 e8 b2 9e 86 ff e9 7a fb ff ff 0f 1f 44 00 00 e9 7d fb ff ff 48 8d 3d dc 39 b5 01 4c 8b 64 24 10 44 89 e6 <67> 48 0f b9 3a 48 8b 1c 24 e9 c9 fc ff ff e8 a1 0e d7 00 90 0f 0b
RSP: 0018:ffff9edd02247e20 EFLAGS: 00010296
RAX: 0000000000000013 RBX: ffff9211c6f68000 RCX: 0000000002040001
RDX: 0000000000000000 RSI: 00000000fffffff5 RDI: ffffffffa218e190
RBP: ffff9211c2cda300 R08: 0000000000001fff R09: ffffffffa1e5c870
R10: 0000000000005ffd R11: 00000000ffffdfff R12: 00000000fffffff5
R13: ffff9211c2832600 R14: ffff9211c28ab000 R15: ffff9211c2832600
FS:  0000000000000000(0000) GS:ffff921d6ceb3000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f04aa9d8ae0 CR3: 000000010571f000 CR4: 0000000000350eb0
Call Trace:
 <TASK>
 transaction_kthread+0xe1/0x160
 ? __pfx_transaction_kthread+0x10/0x10
 kthread+0x20b/0x240
 ? __pfx_kthread+0x10/0x10
 ret_from_fork+0xad/0x160
 ? __pfx_kthread+0x10/0x10
 ret_from_fork_asm+0x1a/0x30
 </TASK>
---[ end trace 0000000000000000 ]---

BTRFS: error (device vda state EA) in cleanup_transaction:2037: errno=-11 unknown

Best,
Qiyu

author
#1 lore raw

The same issue did not happen with kernel 6.16 (mainline, I tried 6.17 and the issue happens), I tried to mount with the 6.16 kernel and can observe that at least one commit made it through

cat /sys/fs/btrfs/02b4934e-9807-43d3-b28b-f9ca7d055391/commit_stats commits 1
last_commit_ms 70
max_commit_ms 70
total_commit_ms 70

And I am trying to copy file via rsync and check what happens. But anyway, this issue looks like a regression since 6.17

author
#2 lore raw

failed with different reason after some writing

[  624.632595] I/O error, dev vda, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 0 prio class 0
[  624.642790] BTRFS error (device vda): bdev /dev/vda errs: wr 0, rd 0, flush 1, corrupt 0, gen 0
[  624.645172] BTRFS warning (device vda): chunk 536870912 missing 1 devices, max tolerance is 0 for writable mount
[  624.645189] BTRFS: error (device vda) in write_all_supers:4037: errno=-5 IO failure (errors while submitting device barriers.) [  624.648010] BTRFS info (device vda state E): forced readonly
[  624.648016] BTRFS warning (device vda state E): Skipping commit of aborted transaction.
[  624.648019] BTRFS error (device vda state EA): Transaction aborted (error -5)
[  624.649789] BTRFS: error (device vda state EA) in cleanup_transaction:2021: errno=-5 IO failure
[  626.360832] BTRFS error (device vda state EA): failed to run delalloc range, root=257 ino=3248 folio=0 submit_bitmap=0 start=0 len=4096: -30 [  626.362794] BTRFS error (device vda state EA): failed to run delalloc range, root=257 ino=3249 folio=0 submit_bitmap=0 start=0 len=4096: -30 [  626.364833] BTRFS error (device vda state EA): failed to run delalloc range, root=257 ino=3250 folio=0 submit_bitmap=0 start=0 len=4096: -30 [  626.366758] BTRFS error (device vda state EA): failed to run delalloc range, root=257 ino=3251 folio=0 submit_bitmap=0 start=0 len=4096: -30 [  626.370235] BTRFS error (device vda state EA): failed to run delalloc range, root=257 ino=3254 folio=0 submit_bitmap=0 start=0 len=4096: -30 [  626.372178] BTRFS error (device vda state EA): failed to run delalloc range, root=257 ino=3255 folio=0 submit_bitmap=0 start=0 len=4096: -30 [  626.374828] BTRFS error (device vda state EA): failed to run delalloc range, root=257 ino=3257 folio=0 submit_bitmap=0 start=0 len=4096: -30 [  626.377104] BTRFS error (device vda state EA): failed to run delalloc range, root=257 ino=3258 folio=0 submit_bitmap=0 start=0 len=4096: -30 [  626.379755] BTRFS error (device vda state EA): failed to run delalloc range, root=257 ino=3260 folio=0 submit_bitmap=0 start=0 len=4096: -30 [  626.382389] BTRFS error (device vda state EA): failed to run delalloc range, root=257 ino=3262 folio=0 submit_bitmap=0 start=0 len=4096: -30

cat /sys/fs/btrfs/02b4934e-9807-43d3-b28b-f9ca7d055391/commit_stats commits 5
last_commit_ms 34011
max_commit_ms 34011
total_commit_ms 45217

Quoted 9 lines · Qiyu Yan

The same issue did not happen with kernel 6.16 (mainline, I tried 6.17 and the issue happens), I tried to mount with the 6.16 kernel and can observe that at least one commit made it through

cat /sys/fs/btrfs/02b4934e-9807-43d3-b28b-f9ca7d055391/commit_stats commits 1
last_commit_ms 70
max_commit_ms 70
total_commit_ms 70

And I am trying to copy file via rsync and check what happens. But anyway, this issue looks like a regression since 6.17

author
#3 lore raw

Those errors in vm seems to be due to configuration issue, but after those test, the filesystem now mounts and can properly be written to on 6.18.7-200.fc43.x86_64 host. I suspect the modification done during the test made some difference. And the issue is related to some modification between 6.17 - 6.17

A recap of the story:
 1. On 6.18.7-200.fc43.x86_64, I copy files to the zoned device, triggers -11 from btrfs_commit_transaction
 2. Unmount and re-mount rw, same error happens after leaving the system alone (both 6.18.7-200.fc43.x86_64 and git latest)
 3. Tried mount in vm with various version, 6.17 gets same result as host (6.18.7-200.fc43.x86_64), 6.16 mount and writes succeed, starting copying files in VM
 4. Write in VM failed, but might be related to the cache mode set in QEMU, I am seeing
            Buffer I/O error on dev sdg, logical block 1509206440, lost async page write
        on host.
 5. Confused, I mount again on the host, and now I can again, write to it.

Now doing more tests (the files on the filesystem have backup so I am not afraid of making it worse.

Quoted 38 lines · Qiyu Yan

failed with different reason after some writing

[  624.632595] I/O error, dev vda, sector 0 op 0x1:(WRITE) flags 0x800 phys_seg 0 prio class 0
[  624.642790] BTRFS error (device vda): bdev /dev/vda errs: wr 0, rd 0, flush 1, corrupt 0, gen 0
[  624.645172] BTRFS warning (device vda): chunk 536870912 missing 1 devices, max tolerance is 0 for writable mount
[  624.645189] BTRFS: error (device vda) in write_all_supers:4037: errno=-5 IO failure (errors while submitting device barriers.) [  624.648010] BTRFS info (device vda state E): forced readonly
[  624.648016] BTRFS warning (device vda state E): Skipping commit of aborted transaction.
[  624.648019] BTRFS error (device vda state EA): Transaction aborted (error -5)
[  624.649789] BTRFS: error (device vda state EA) in cleanup_transaction:2021: errno=-5 IO failure
[  626.360832] BTRFS error (device vda state EA): failed to run delalloc range, root=257 ino=3248 folio=0 submit_bitmap=0 start=0 len=4096: -30 [  626.362794] BTRFS error (device vda state EA): failed to run delalloc range, root=257 ino=3249 folio=0 submit_bitmap=0 start=0 len=4096: -30 [  626.364833] BTRFS error (device vda state EA): failed to run delalloc range, root=257 ino=3250 folio=0 submit_bitmap=0 start=0 len=4096: -30 [  626.366758] BTRFS error (device vda state EA): failed to run delalloc range, root=257 ino=3251 folio=0 submit_bitmap=0 start=0 len=4096: -30 [  626.370235] BTRFS error (device vda state EA): failed to run delalloc range, root=257 ino=3254 folio=0 submit_bitmap=0 start=0 len=4096: -30 [  626.372178] BTRFS error (device vda state EA): failed to run delalloc range, root=257 ino=3255 folio=0 submit_bitmap=0 start=0 len=4096: -30 [  626.374828] BTRFS error (device vda state EA): failed to run delalloc range, root=257 ino=3257 folio=0 submit_bitmap=0 start=0 len=4096: -30 [  626.377104] BTRFS error (device vda state EA): failed to run delalloc range, root=257 ino=3258 folio=0 submit_bitmap=0 start=0 len=4096: -30 [  626.379755] BTRFS error (device vda state EA): failed to run delalloc range, root=257 ino=3260 folio=0 submit_bitmap=0 start=0 len=4096: -30 [  626.382389] BTRFS error (device vda state EA): failed to run delalloc range, root=257 ino=3262 folio=0 submit_bitmap=0 start=0 len=4096: -30

cat /sys/fs/btrfs/02b4934e-9807-43d3-b28b-f9ca7d055391/commit_stats commits 5
last_commit_ms 34011
max_commit_ms 34011
total_commit_ms 45217

Quoted 9 lines · Qiyu Yan

The same issue did not happen with kernel 6.16 (mainline, I tried 6.17 and the issue happens), I tried to mount with the 6.16 kernel and can observe that at least one commit made it through

cat /sys/fs/btrfs/02b4934e-9807-43d3-b28b-f9ca7d055391/commit_stats commits 1
last_commit_ms 70
max_commit_ms 70
total_commit_ms 70

And I am trying to copy file via rsync and check what happens. But anyway, this issue looks like a regression since 6.17