AmesCornish / buttersink

Buttersink is like rsync for btrfs snapshots
GNU General Public License v3.0
195 stars 18 forks source link

stuck and eats 100% cpu #38

Closed gaetanquentin closed 6 years ago

gaetanquentin commented 7 years ago

sometimes it is stuck in infinite loop and eats 100%cpu.

Can't kill it (KILL -9 do nothing), and a strace shows nothing, so it seems it does not call sys calls at all.

AmesCornish commented 7 years ago

Hard to debug this without more context. It sounds like a hang in the btrfs subsystem, maybe during send or receive. I'd check that you have the latest btrfs-progs, and a recent kernel. It could also be due to corruption in the btrfs file system.

eugene-bright commented 6 years ago

I'm experiencing such kind of things on snapshot deletion. One old email thread fully describes my symptoms.

eugene-bright commented 6 years ago

Buttersink relies on btrfs quota feature to estimate diff sizes. If btrfs quota is disabled then it will be enabled by buttersink (but it also seems to be enabled by default on newly created FS). Snapshot deletion can cause performance issues if quote feature is enabled. https://www.reddit.com/r/btrfs/comments/4qz1qd/problems_with_btrfs_quota/

It looks to be a btrfs bug. We should workaround it by adding an option to buttersink to disable any size estimation.

eugene-bright commented 6 years ago

Quoting developers conversation https://www.spinics.net/lists/linux-btrfs/msg74737.html

Snapshot creation and backref walk (used in qgroup, relocation and extent deletion), are two conflicting workload in fact.