Public bug reported:

Yesterday, I upgraded to Ubuntu 20.04, since  when there is a problem
with the btrfs volume it is installed on. The system hung when launching
a btrfs balance and on next boot, it hung indefinitely, when trying to
created the volatile files and dirs.

Booting from a Debian buster rescue system, I noticed that I was unable
to create or delete any files and I noticed the following in dmesg:

[Sun Aug  9 12:21:35 2020] ------------[ cut here ]------------
[Sun Aug  9 12:21:35 2020] kernel BUG at fs/btrfs/relocation.c:2626!
[Sun Aug  9 12:21:35 2020] invalid opcode: 0000 [#1] SMP PTI
[Sun Aug  9 12:21:35 2020] CPU: 1 PID: 4537 Comm: btrfs-balance Tainted: G      
     O      5.4.47 #1
[Sun Aug  9 12:21:35 2020] Hardware name: FUJITSU D3401-H1/D3401-H1, BIOS 
V5.0.0.11 R1.14.0 for D3401-H1x                    06/09/2016
[Sun Aug  9 12:21:35 2020] RIP: 0010:select_reloc_root+0x5b/0x19f [btrfs]
[Sun Aug  9 12:21:35 2020] Code: c0 c7 44 24 04 00 00 00 00 e8 8b 9d 17 e1 48 
89 df 4c 89 f6 48 8d 54 24 04 e8 9c e6 ff ff 48 8b 58 60 48 89 c5 48 85 db 75 
02 <0f> 0b 48 8b 43 20 a8 02 75 02 0f 0b 48 83 bb df 01 00 00 f8 75 45
[Sun Aug  9 12:21:35 2020] RSP: 0018:ffff8887e0b0bb20 EFLAGS: 00010246
[Sun Aug  9 12:21:35 2020] RAX: ffff8887dfab5280 RBX: 0000000000000000 RCX: 
0000000000000000
[Sun Aug  9 12:21:35 2020] RDX: ffff8887e0b0bb24 RSI: ffff8887e0b0bc10 RDI: 
ffff8887dfab52c0
[Sun Aug  9 12:21:35 2020] RBP: ffff8887dfab5280 R08: ffff8887dfab52c0 R09: 
ffffffffa0491e7e
[Sun Aug  9 12:21:35 2020] R10: ffff8887f4ba7e70 R11: ffff8888090ed158 R12: 
ffff8887dfab5280
[Sun Aug  9 12:21:35 2020] R13: ffff8887fd330800 R14: ffff8887e0b0bc10 R15: 
ffff8887e7fa66e8
[Sun Aug  9 12:21:35 2020] FS:  0000000000000000(0000) 
GS:ffff88880e240000(0000) knlGS:0000000000000000
[Sun Aug  9 12:21:35 2020] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[Sun Aug  9 12:21:35 2020] CR2: 000055b4d5b7cfe0 CR3: 000000000200a004 CR4: 
00000000003606e0
[Sun Aug  9 12:21:35 2020] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 
0000000000000000
[Sun Aug  9 12:21:35 2020] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 
0000000000000400
[Sun Aug  9 12:21:35 2020] Call Trace:
[Sun Aug  9 12:21:35 2020]  do_relocation+0xb6/0x4c2 [btrfs]
[Sun Aug  9 12:21:35 2020]  ? 
calcu_metadata_size.isra.36.constprop.42+0x9e/0xc4 [btrfs]
[Sun Aug  9 12:21:35 2020]  ? do_raw_spin_lock+0x2f/0x5a
[Sun Aug  9 12:21:35 2020]  ? btrfs_block_rsv_refill+0x4b/0x8b [btrfs]
[Sun Aug  9 12:21:35 2020]  relocate_tree_blocks+0x301/0x427 [btrfs]
[Sun Aug  9 12:21:35 2020]  ? tree_insert+0x49/0x4e [btrfs]
[Sun Aug  9 12:21:35 2020]  ? add_tree_block.isra.38+0x11e/0x144 [btrfs]
[Sun Aug  9 12:21:35 2020]  relocate_block_group+0x279/0x49e [btrfs]
[Sun Aug  9 12:21:35 2020]  btrfs_relocate_block_group+0x15e/0x23d [btrfs]
[Sun Aug  9 12:21:35 2020]  btrfs_relocate_chunk+0x25/0x8c [btrfs]
[Sun Aug  9 12:21:35 2020]  btrfs_balance+0xaf0/0xd45 [btrfs]
[Sun Aug  9 12:21:35 2020]  ? btrfs_balance+0xd45/0xd45 [btrfs]
[Sun Aug  9 12:21:35 2020]  balance_kthread+0x32/0x46 [btrfs]
[Sun Aug  9 12:21:35 2020]  kthread+0xf5/0xfa
[Sun Aug  9 12:21:35 2020]  ? kthread_associate_blkcg+0x86/0x86
[Sun Aug  9 12:21:35 2020]  ret_from_fork+0x3a/0x50
[Sun Aug  9 12:21:35 2020] Modules linked in: btrfs xor zstd_decompress 
zstd_compress lzo_compress lzo_decompress zlib_deflate raid6_pq libcrc32c 
sd_mod ipmi_devintf ipmi_msghandler sg x86_pkg_temp_thermal intel_powerclamp 
kvm_intel kvm irqbypass crc32_pclmul crc32c_intel iTCO_wdt ghash_clmulni_intel 
aesni_intel crypto_simd psmouse ahci cryptd libahci i2c_i801 serio_raw 
glue_helper intel_pch_thermal evdev video thermal acpi_pad button fan jc42 
ftsteutates nct6775 hwmon_vid coretemp ip_tables x_tables autofs4 e1000e
[Sun Aug  9 12:21:36 2020] ---[ end trace 442b443de6cecc6e ]---
[Sun Aug  9 12:21:36 2020] RIP: 0010:select_reloc_root+0x5b/0x19f [btrfs]
[Sun Aug  9 12:21:36 2020] Code: c0 c7 44 24 04 00 00 00 00 e8 8b 9d 17 e1 48 
89 df 4c 89 f6 48 8d 54 24 04 e8 9c e6 ff ff 48 8b 58 60 48 89 c5 48 85 db 75 
02 <0f> 0b 48 8b 43 20 a8 02 75 02 0f 0b 48 83 bb df 01 00 00 f8 75 45

So this is obviously a btrfs bug that got introduced by the newer btrfs
code in the newer kernel, although, booting an older kernel didn't fix
it. Apparently something about the fs is messed up now and no balance
can be run. The only temporary remedy I found was to add the
skip_balance mount option to /etc/fstab, but of course, this is a
crutch, and when you can't run balance, then the fs is bound to run out
of space at some point.

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1890951

Title:
  btrfs not writable when mounted without "skip_balance"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1890951/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to