* error in btrfs_create_pending_block_groups:2788: errno=-17 Object already exists
@ 2026-01-08 14:53 Dimitrios Apostolou
2026-01-08 22:52 ` Boris Burkov
0 siblings, 1 reply; 4+ messages in thread
From: Dimitrios Apostolou @ 2026-01-08 14:53 UTC (permalink / raw)
To: linux-btrfs
Hello list,
I got an error while copying recursively (cp -a) several TBs of GB-sized
files, from an old zstd:3 compressed btrfs filesystem, to a newly
created same-settings (zstd:3 compressed) btrfs filesystem. Error
happened after many hours of copying, without any issues or log messages
before that. No hardware errors were logged either.
OS: Ubuntu 24.04 with HWE kernel 6.14.0-37-generic.
The kernel source code should be about this one here:
https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/noble/tree/fs/btrfs/block-group.c?h=hwe-6.14-next#n2788
Mkfs output:
# mkfs.btrfs /dev/sde
btrfs-progs v6.6.3
See https://btrfs.readthedocs.io for more information.
Performing full device TRIM /dev/sde (10.00TiB) ...
NOTE: several default settings have changed in version 5.15, please make
sure
this does not affect your deployments:
- DUP for metadata (-m dup)
- enabled no-holes (-O no-holes)
- enabled free-space-tree (-R free-space-tree)
Label: (null)
UUID: ff746273-9a0d-419c-9cc0-efe1c85b5857
Node size: 16384
Sector size: 4096
Filesystem size: 10.00TiB
Block group profiles:
Data: single 8.00MiB
Metadata: DUP 1.00GiB
System: DUP 8.00MiB
SSD detected: yes
Zoned device: no
Incompat features: extref, skinny-metadata, no-holes, free-space-tree
Runtime features: free-space-tree
Checksum: crc32c
Number of devices: 1
Devices:
ID SIZE PATH
1 10.00TiB /dev/sde
Kernel stacktrace:
[Jan 7 21:02] ------------[ cut here ]------------
[ +0.000005] BTRFS: Transaction aborted (error -17)
[ +0.000039] WARNING: CPU: 9 PID: 5589 at fs/btrfs/block-group.c:2788 btrfs_create_pending_block_groups+0x525/0x5a0 [btrfs]
[ +0.000071] Modules linked in: tls udp_diag tcp_diag inet_diag qrtr vsock_loopback vmw_vsock_virtio_transport_common vmw_vsock_vmci_transport vsock cfg80211 binfmt_misc intel_rapl_msr intel_rapl_common intel_uncore_frequency_common isst_if_common skx_edac_common nfit rapl vmw_balloon vmwgfx i2c_piix>
[ +0.000036] CPU: 9 UID: 0 PID: 5589 Comm: btrfs-transacti Not tainted 6.14.0-37-generic #37~24.04.1-Ubuntu
[ +0.000003] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 11/12/2020
[ +0.000002] RIP: 0010:btrfs_create_pending_block_groups+0x525/0x5a0 [btrfs]
[ +0.000049] Code: 48 8b 7d 98 e8 ac 9a f6 ff e9 45 fd ff ff 4c 89 ef e8 7f 23 3a f9 e9 ff fc ff ff 44 89 e6 48 c7 c7 d8 07 67 c0 e8 7b 19 ff f8 <0f> 0b e9 5e fe ff ff 44 89 e6 48 c7 c7 d8 07 67 c0 e8 65 19 ff f8
[ +0.000001] RSP: 0018:ffffcf0b0469fd58 EFLAGS: 00010246
[ +0.000002] RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000
[ +0.000002] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[ +0.000000] RBP: ffffcf0b0469fde8 R08: 0000000000000000 R09: 0000000000000000
[ +0.000001] R10: 0000000000000000 R11: 0000000000000000 R12: 00000000ffffffef
[ +0.000001] R13: ffff8a86290e2840 R14: ffff8a8bb2f8c118 R15: ffff8a82c07cf2a0
[ +0.000001] FS: 0000000000000000(0000) GS:ffff8a91bfa80000(0000) knlGS:0000000000000000
[ +0.000001] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ +0.000001] CR2: 000074cdbd8053e8 CR3: 0000000caf7c0003 CR4: 0000000000770ef0
[ +0.000025] PKRU: 55555554
[ +0.000002] Call Trace:
[ +0.000001] <TASK>
[ +0.000003] btrfs_commit_transaction+0x7d/0xc50 [btrfs]
[ +0.000051] ? hrtimers_cpu_dying+0x130/0x1f0
[ +0.000004] transaction_kthread+0x167/0x1d0 [btrfs]
[ +0.000042] ? __pfx_transaction_kthread+0x10/0x10 [btrfs]
[ +0.000038] kthread+0xfb/0x230
[ +0.000003] ? __pfx_kthread+0x10/0x10
[ +0.000002] ret_from_fork+0x47/0x70
[ +0.000003] ? __pfx_kthread+0x10/0x10
[ +0.000001] ret_from_fork_asm+0x1a/0x30
[ +0.000004] </TASK>
[ +0.000001] ---[ end trace 0000000000000000 ]---
[ +0.000002] BTRFS: error (device sde state A) in btrfs_create_pending_block_groups:2788: errno=-17 Object already exists
[ +0.000014] BTRFS info (device sde state EA): forced readonly
[ +0.000603] BTRFS warning (device sde state EA): Skipping commit of aborted transaction.
Any ideas?
Thank you in advance,
Dimitris
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: error in btrfs_create_pending_block_groups:2788: errno=-17 Object already exists
2026-01-08 14:53 error in btrfs_create_pending_block_groups:2788: errno=-17 Object already exists Dimitrios Apostolou
@ 2026-01-08 22:52 ` Boris Burkov
2026-01-09 11:18 ` Dimitrios Apostolou
0 siblings, 1 reply; 4+ messages in thread
From: Boris Burkov @ 2026-01-08 22:52 UTC (permalink / raw)
To: Dimitrios Apostolou; +Cc: linux-btrfs
On Thu, Jan 08, 2026 at 03:53:17PM +0100, Dimitrios Apostolou wrote:
> Hello list,
>
> I got an error while copying recursively (cp -a) several TBs of GB-sized
> files, from an old zstd:3 compressed btrfs filesystem, to a newly created
> same-settings (zstd:3 compressed) btrfs filesystem. Error happened after
> many hours of copying, without any issues or log messages before that. No
> hardware errors were logged either.
>
> OS: Ubuntu 24.04 with HWE kernel 6.14.0-37-generic.
>
> The kernel source code should be about this one here:
> https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/noble/tree/fs/btrfs/block-group.c?h=hwe-6.14-next#n2788
>
>
> Mkfs output:
>
> # mkfs.btrfs /dev/sde
> btrfs-progs v6.6.3
> See https://btrfs.readthedocs.io for more information.
>
> Performing full device TRIM /dev/sde (10.00TiB) ...
> NOTE: several default settings have changed in version 5.15, please make
> sure
> this does not affect your deployments:
> - DUP for metadata (-m dup)
> - enabled no-holes (-O no-holes)
> - enabled free-space-tree (-R free-space-tree)
>
> Label: (null)
> UUID: ff746273-9a0d-419c-9cc0-efe1c85b5857
> Node size: 16384
> Sector size: 4096
> Filesystem size: 10.00TiB
> Block group profiles:
> Data: single 8.00MiB
> Metadata: DUP 1.00GiB
> System: DUP 8.00MiB
> SSD detected: yes
> Zoned device: no
> Incompat features: extref, skinny-metadata, no-holes, free-space-tree
> Runtime features: free-space-tree
> Checksum: crc32c
> Number of devices: 1
> Devices:
> ID SIZE PATH
> 1 10.00TiB /dev/sde
>
>
> Kernel stacktrace:
>
> [Jan 7 21:02] ------------[ cut here ]------------
> [ +0.000005] BTRFS: Transaction aborted (error -17)
> [ +0.000039] WARNING: CPU: 9 PID: 5589 at fs/btrfs/block-group.c:2788 btrfs_create_pending_block_groups+0x525/0x5a0 [btrfs]
> [ +0.000071] Modules linked in: tls udp_diag tcp_diag inet_diag qrtr vsock_loopback vmw_vsock_virtio_transport_common vmw_vsock_vmci_transport vsock cfg80211 binfmt_misc intel_rapl_msr intel_rapl_common intel_uncore_frequency_common isst_if_common skx_edac_common nfit rapl vmw_balloon vmwgfx i2c_piix>
> [ +0.000036] CPU: 9 UID: 0 PID: 5589 Comm: btrfs-transacti Not tainted 6.14.0-37-generic #37~24.04.1-Ubuntu
> [ +0.000003] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 11/12/2020
> [ +0.000002] RIP: 0010:btrfs_create_pending_block_groups+0x525/0x5a0 [btrfs]
> [ +0.000049] Code: 48 8b 7d 98 e8 ac 9a f6 ff e9 45 fd ff ff 4c 89 ef e8 7f 23 3a f9 e9 ff fc ff ff 44 89 e6 48 c7 c7 d8 07 67 c0 e8 7b 19 ff f8 <0f> 0b e9 5e fe ff ff 44 89 e6 48 c7 c7 d8 07 67 c0 e8 65 19 ff f8
> [ +0.000001] RSP: 0018:ffffcf0b0469fd58 EFLAGS: 00010246
> [ +0.000002] RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000
> [ +0.000002] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
> [ +0.000000] RBP: ffffcf0b0469fde8 R08: 0000000000000000 R09: 0000000000000000
> [ +0.000001] R10: 0000000000000000 R11: 0000000000000000 R12: 00000000ffffffef
> [ +0.000001] R13: ffff8a86290e2840 R14: ffff8a8bb2f8c118 R15: ffff8a82c07cf2a0
> [ +0.000001] FS: 0000000000000000(0000) GS:ffff8a91bfa80000(0000) knlGS:0000000000000000
> [ +0.000001] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [ +0.000001] CR2: 000074cdbd8053e8 CR3: 0000000caf7c0003 CR4: 0000000000770ef0
> [ +0.000025] PKRU: 55555554
> [ +0.000002] Call Trace:
> [ +0.000001] <TASK>
> [ +0.000003] btrfs_commit_transaction+0x7d/0xc50 [btrfs]
> [ +0.000051] ? hrtimers_cpu_dying+0x130/0x1f0
> [ +0.000004] transaction_kthread+0x167/0x1d0 [btrfs]
> [ +0.000042] ? __pfx_transaction_kthread+0x10/0x10 [btrfs]
> [ +0.000038] kthread+0xfb/0x230
> [ +0.000003] ? __pfx_kthread+0x10/0x10
> [ +0.000002] ret_from_fork+0x47/0x70
> [ +0.000003] ? __pfx_kthread+0x10/0x10
> [ +0.000001] ret_from_fork_asm+0x1a/0x30
> [ +0.000004] </TASK>
> [ +0.000001] ---[ end trace 0000000000000000 ]---
> [ +0.000002] BTRFS: error (device sde state A) in btrfs_create_pending_block_groups:2788: errno=-17 Object already exists
> [ +0.000014] BTRFS info (device sde state EA): forced readonly
> [ +0.000603] BTRFS warning (device sde state EA): Skipping commit of aborted transaction.
>
>
>
> Any ideas?
Not yet, but I have seen it at Meta as well and am investigating.
Are you able to reproduce it or did it happen just once?
Hopefully something for you soon.
>
> Thank you in advance,
> Dimitris
>
Thanks,
Boris
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: error in btrfs_create_pending_block_groups:2788: errno=-17 Object already exists
2026-01-08 22:52 ` Boris Burkov
@ 2026-01-09 11:18 ` Dimitrios Apostolou
2026-01-09 18:06 ` Boris Burkov
0 siblings, 1 reply; 4+ messages in thread
From: Dimitrios Apostolou @ 2026-01-09 11:18 UTC (permalink / raw)
To: Boris Burkov; +Cc: linux-btrfs
On Thursday 2026-01-08 23:52, Boris Burkov wrote:
> Are you able to reproduce it or did it happen just once?
It only happened once. I didn't try to recover the fs, was worried about
future data integrity.
So I decided to follow a different strategy, copying the block device
containing the btrfs instead of cp'ing the contents to a new btrfs.
If I see it again, are there any debug operations to get more info?
Dimitris
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: error in btrfs_create_pending_block_groups:2788: errno=-17 Object already exists
2026-01-09 11:18 ` Dimitrios Apostolou
@ 2026-01-09 18:06 ` Boris Burkov
0 siblings, 0 replies; 4+ messages in thread
From: Boris Burkov @ 2026-01-09 18:06 UTC (permalink / raw)
To: Dimitrios Apostolou; +Cc: linux-btrfs
On Fri, Jan 09, 2026 at 12:18:43PM +0100, Dimitrios Apostolou wrote:
> On Thursday 2026-01-08 23:52, Boris Burkov wrote:
>
> > Are you able to reproduce it or did it happen just once?
>
> It only happened once. I didn't try to recover the fs, was worried about
> future data integrity.
No problem, I'll just work on reproducing it.
>
> So I decided to follow a different strategy, copying the block device
> containing the btrfs instead of cp'ing the contents to a new btrfs.
>
> If I see it again, are there any debug operations to get more info?
>
No, I was more hoping to instrument a reproducer. I have plenty of
examples to dig into.
Thanks,
Boris
>
> Dimitris
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-09 18:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-08 14:53 error in btrfs_create_pending_block_groups:2788: errno=-17 Object already exists Dimitrios Apostolou
2026-01-08 22:52 ` Boris Burkov
2026-01-09 11:18 ` Dimitrios Apostolou
2026-01-09 18:06 ` Boris Burkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox