#1024257 btrfs-progs: Backup fails with "multiple capabilities" at first, then "capability no data available"

Package:
btrfs-progs
Source:
btrfs-progs
Description:
Checksumming Copy on Write Filesystem utilities
Submitter:
Leszek Dubiel
Date:
2024-12-30 08:12:02 UTC
Severity:
normal
Tags:
#1024257#5
Date:
2022-11-16 13:50:28 UTC
From:
To:
Hello :) :)

I am doing regular backukps send/receive.

I get a lot of messages like this:

WARNING: capabilities set multiple times per file: /mnt/sda2/2022-11-11
23:58:02 169205882/ZK_83308/Documents/fk-2228.jpg

WARNING: capabilities set multiple times per file: /mnt/sdc2/2022-11-11
23:58:02 169205882/ZK_83308/Documents/fk-2228.jpg

WARNING: capabilities set multiple times per file: /mnt/sdc2/2022-11-12
08:57:01 386278919/ZK_83308/Documents/fk-2228.jpg


and after some time it completely fails with errors:

ERROR: lremovexattr ZK_83308/Documents/fk-2228.jpg security.capability
failed: No data available

ERROR: lremovexattr ZK_83308/Documents/fk-2228.jpg security.capability
failed: No data available

ERROR: lremovexattr ZK_83308/Documents/fk-2228.jpg security.capability
failed: No data available



I have found other people also have such problems:

       https://github.com/digint/btrbk/issues/416

https://www.kubuntuforums.net/forum/general/miscellaneous/btrfs/71629-strange-warning-on-incremental-backup



and the problem is probably back again after 2014:

       https://bugzilla.kernel.org/show_bug.cgi?id=68891




After getting warnings I have checksummed send and receiving subvolumes
with rsync and files are
identical.

But I have once found that btrfs/send receive finished without any
errors (!), subvolumes were both
read-only, and file was missing on receiving side.

#1024257#10
Date:
2024-06-24 23:25:18 UTC
From:
To:
Hi Leszek,

If you're still on bullseye (Debian 11), then Debian Backports may solve
this.  Install btrfs-progs 6.2-1~bpo11+1.  The kernel from backports may
also be required.  Note that backports support for Debian 11 (bullseye)
will probably end within the next six months, so please consider
upgrading to Debian 12 (bookworm) at your earliest convenience.

Regards,
Nicholas

#1024257#15
Date:
2024-06-25 06:25:55 UTC
From:
To:
Hello :) :)


W dniu 25.06.2024 o 01:33, Nicholas D Steeves pisze:


I have moved to Debian version 12,
errors still presisted.

I have filed a bug on btrfs github.





Finally I have modified btrfs program a little bit — changed "error" to
"warning"


Here's how.







# apt-get update
# apt-get full-upgrade



# btrfs --version
btrfs-progs v6.2



# dpkg -l | grep btrfs
ii  btrfs-progs 6.2-1                               amd64       
Checksumming Copy on Write Filesystem utilities



# sudo apt-get install build-essential
# apt-get build-dep btrfs-progs


# mkdir leszek
# cd leszek
# apt-get source btrfs-progs



# ls
btrfs-progs-6.2  btrfs-progs_6.2-1.debian.tar.xz btrfs-progs_6.2-1.dsc 
btrfs-progs_6.2.orig.tar.xz



# cd btrfs-progs-6.2


# vi ...




# diff:


btrfs.c
     217c217
     <     printf("%s\n", PACKAGE_STRING);
     ---
     >     printf("leszek-2023-12-17-%s\n", PACKAGE_STRING);



cmds/receive.c
     868,869c868,869
     <         ret = -errno;
     <         error("lremovexattr %s %s failed: %m", path, name);
     ---
     >         ret = 0;
     >         warning("leszek 2023-12-17: lremovexattr %s %s failed:
%m", path, name);






# dpkg-buildpackage -b -uc -us




# ./btrfs --version

leszek-2023-12-17-btrfs-progs v6.2




# make static

#1024257#20
Date:
2024-12-27 22:50:10 UTC
From:
To:
Leszek Dubiel <leszek@dubiel.pl> writes:
...

Please share the URL and/or set the forwarded tag to it?

At this time I don't think that we should digress from upstream on this.

Please install btrfs-progs from bookworm-backports.


Best,
Nicholas

#1024257#29
Date:
2024-12-29 17:10:36 UTC
From:
To:
#1024257#34
Date:
2024-12-29 20:20:36 UTC
From:
To:
Leszek Dubiel <leszek@dubiel.pl> writes:

Thanks!

I skimmed the reports at the links you linked to elsewhere in this
thread, and have more questions:

1. Are you piping the send stream to another system, and receiving it
there?
2. What is special about ZK_83308/Documents/fk-2228.jpg ?  Apparmor
won't do anything with it, your steps to reproduce (and others at all
provided links) don't appear to explain what's happening with this
file...  Do you use selinux or tomoyo on the sender or receiver system?
3. Are you using incremental streams, parent or clone subvols, etc?

At this time I cannot reproduce, and a minimal reproducer is required.

Best,
Nicholas

#1024257#41
Date:
2024-12-29 22:03:52 UTC
From:
To:
Yes.

This is something like this:


ssh other-server  'btrfs send -p /mnt/snaps/parent-subvol
subvol-to-send'  | btrfs receive /mnt/my-backups/

I don't use selinux.


I tried to figure out what's special about files but I didn't find any
clue.

Files are different...

Last errors of this type I have seen in October:

  lremovexattr
root/Omega/Domains/Oferty/Folders/OF_81080/Documents/81080_czok_Klucz.pdf
security.capability failed: No data available
  lremovexattr
root/Omega/Domains/Produkty_Typowe/Folders/Lustro_Joy_50x100_Black/Documents/Specyfikacja/Specyfikacja.pdf
security.capability failed: No data available
  lremovexattr
root/Omega/Domains/Produkty_Typowe/Folders/Lustro_Omega_Plus/Documents
security.capability failed: No data available
  lremovexattr
root/Omega/Domains/Produkty_Typowe/Folders/Lustro_Omega_Plus/Documents/Specyfikacja
security.capability failed: No data available
  lremovexattr
root/Omega/Domains/Zakupy/Folders/ZK_84828/Parameters/Dokumenty
security.capability failed: No data available


My current version:

# btrfs --version
btrfs-progs v6.2



# uname -a
Linux orion 6.1.0-28-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1
(2024-11-22) x86_64 GNU/Linux

Always incremental, always with parent, never with clones.

#1024257#46
Date:
2024-12-30 03:17:46 UTC
From:
To:
Leszek Dubiel <leszek@dubiel.pl> writes:

Thanks.  I was unable to reproduce the bug with a simple incremental
send like this between two Debian 12 (bookworm systems).

How can I reproduce these errors?  Are you using sending or receiving
from within a container or flatpak?

[snip]

In a week or so I'll be able to backport btrfs-progs 6.12.  If you
suspect a kernel or btrfs-progs bug you'll want to test those.  Also,
you'll want to update the upstream forwarded bug with your results at
that time.

Thanks.  I'm still not able to reproduce.  Can you think of anything
else?  What happens when you do a full send (no parent, no incremental)?

Best,
Nicholas

#1024257#51
Date:
2024-12-30 08:08:56 UTC
From:
To:
This is hard to reproduce, i have tried, but didn't suceed.

Since October I didn't have any more issues — I don't know why.
System is exactly the same.
Maybe problem stopped after kennel upgrade, or btrfs-progs upgrade.

I will have to wait for new errors to emerge.
But current settings from debian stable don't show these errors since
October.



# dpkg -l | grep -E 'btrfs-progs|linux-image'; echo; uname -a

ii  btrfs-progs                   6.2-1+deb12u1 amd64       
Checksumming Copy on Write Filesystem utilities

ii  linux-image-6.1.0-25-amd64    6.1.106-3 amd64        Linux 6.1 for
64-bit PCs (signed)
ii  linux-image-6.1.0-26-amd64    6.1.112-1 amd64        Linux 6.1 for
64-bit PCs (signed)
ii  linux-image-6.1.0-27-amd64    6.1.115-1 amd64        Linux 6.1 for
64-bit PCs (signed)
ii  linux-image-6.1.0-28-amd64    6.1.119-1 amd64        Linux 6.1 for
64-bit PCs (signed)
ii  linux-image-amd64             6.1.119-1 amd64        Linux for
64-bit PCs (meta-package)

Linux zefir 6.1.0-28-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1
(2024-11-22) x86_64 GNU/Linux

So maybe we close this bug and reopen if I hit errors again?
I will write email to you when this happens again?