On Fri, Aug 23, 2019 at 12:44:11AM +0200, Leszek Dubiel wrote: > Package: btrfs-progs > Version: 4.20.1-2
> I was told some time ago to file a bug on this. When checking btrfs file > system I get below error. I have only one such faulty disk formatted with > BTRFS, so I don't have > any more details about this bug. > root@gamma# btrfs check /dev/sda1 [...] > [2/7] checking extents > check/main.c:4728: add_data_backref: BUG_ON `!back` triggered, value 1 > Przerwane > root@gamma# btrfs check /dev/sda1 --repair > [2/7] checking extents > memory allocation failed The only way for this BUG_ON to happen is to exhaust available memory. The message should be more graceful, indeed. Could you please try --mode=lowmem ? Besides requiring drastically less memory, it's also a cleanish rewrite of the code, and seems quite mature already. Thus, it's likely it can succeed where --mode=original fails. Meow! -- ⢀⣴⠾⠻⢶⣦⠀ Pesymista widzi ciemny tunel. ⣾⠁⢠⠒⠀⣿⡁ Optymista widzi światełko w tunelu. ⢿⡄⠘⠷⠚⠋⠀ Realista widzi że jedzie pociąg. ⠈⠳⣄⠀⠀⠀⠀ Maszynista widzi trzech idiotów na torach.