Hi. Yesterday when powering off my PC systemd's umount service run in a timeout. Today linux couldn't boot anymore, instead I suddenly found myself in the kernel's rescue shell. Seems like btrfs is broken on my root partition.
# mount -t btrfs -o ro /dev/nvme0n1p3 /mnt ...produces a kernel oops. I attached the dmesg output. # mount -t btrfs -o ro,recovery /dev/nvme0n1p3 /mnt Killed I'm afraid of calling btrfsck, because of the warnings in the btrfs wiki, that this tool might make the situation worse. Any suggestions how to proceed? Thorsten Hirsch [ 223.023202] BTRFS warning (device nvme0n1p3): 'recovery' is deprecated, use 'usebackuproot' instead [ 223.023204] BTRFS info (device nvme0n1p3): trying to use backup root at mount time [ 223.023206] BTRFS info (device nvme0n1p3): disk space caching is enabled [ 223.023207] BTRFS info (device nvme0n1p3): has skinny extents [ 223.052188] BTRFS info (device nvme0n1p3): enabling ssd optimizations [ 223.054170] init_special_inode: bogus i_mode (0) for inode nvme0n1p3:882 [ 223.054184] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000 [ 223.054187] PGD 0 P4D 0 [ 223.054190] Oops: 0010 [#1] PREEMPT SMP NOPTI [ 223.054193] CPU: 6 PID: 2841 Comm: mount Not tainted 4.19.28-1-MANJARO #1 [ 223.054194] Hardware name: Gigabyte Technology Co., Ltd. AB350M-DS3H/AB350M-DS3H-CF, BIOS F24 12/25/2018 [ 223.054196] RIP: 0010: (null) [ 223.054199] Code: Bad RIP value. [ 223.054200] RSP: 0018:ffffb36dcaa570b8 EFLAGS: 00010246 [ 223.054202] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 223.054203] RDX: 0000000000000006 RSI: fffff00c0dd2fb40 RDI: 0000000000000000 [ 223.054204] RBP: ffffb36dcaa57140 R08: 0000000000000000 R09: fffff00c0dd2fb40 [ 223.054205] R10: ffff9ea7ee5846a8 R11: 0000000000000000 R12: ffff9ea7ee584698 [ 223.054207] R13: ffffb36dcaa57190 R14: fffff00c0dd2fb48 R15: fffff00c0dd2fb40 [ 223.054208] FS: 00007fbe1d015780(0000) GS:ffff9ea88eb80000(0000) knlGS:0000000000000000 [ 223.054210] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 223.054211] CR2: ffffffffffffffd6 CR3: 000000038c148000 CR4: 00000000003406e0 [ 223.054212] Call Trace: [ 223.054217] ? read_pages+0x116/0x180 [ 223.054221] ? __do_page_cache_readahead+0x1a5/0x1c0 [ 223.054224] ? ondemand_readahead+0x211/0x2e0 [ 223.054227] ? kmem_cache_alloc_trace+0x176/0x1d0 [ 223.054245] ? __load_free_space_cache+0x1c4/0x5d0 [btrfs] [ 223.054261] ? load_free_space_cache+0xb6/0x190 [btrfs] [ 223.054271] ? cache_block_group+0x73/0x3e0 [btrfs] [ 223.054281] ? cache_block_group+0x1c1/0x3e0 [btrfs] [ 223.054284] ? wait_woken+0x80/0x80 [ 223.054295] ? find_free_extent+0x87e/0x1110 [btrfs] [ 223.054298] ? syscall_return_via_sysret+0x14/0x83 [ 223.054301] ? __switch_to_asm+0x34/0x70 [ 223.054302] ? __switch_to_asm+0x40/0x70 [ 223.054314] ? btrfs_reserve_extent+0x9b/0x180 [btrfs] [ 223.054325] ? btrfs_alloc_tree_block+0x1ab/0x5b0 [btrfs] [ 223.054335] ? alloc_tree_block_no_bg_flush+0x47/0x50 [btrfs] [ 223.054345] ? __btrfs_cow_block+0x11b/0x500 [btrfs] [ 223.054355] ? btrfs_cow_block+0xdc/0x1a0 [btrfs] [ 223.054365] ? btrfs_search_slot+0x22e/0x9f0 [btrfs] [ 223.054375] ? btrfs_search_slot+0x858/0x9f0 [btrfs] [ 223.054385] ? btrfs_insert_empty_items+0x67/0xc0 [btrfs] [ 223.054399] ? overwrite_item+0xfb/0x5e0 [btrfs] [ 223.054413] ? replay_one_buffer+0x6af/0x870 [btrfs] [ 223.054427] ? walk_down_log_tree+0x76/0x3b0 [btrfs] [ 223.054441] ? walk_log_tree+0xce/0x1d0 [btrfs] [ 223.054453] ? btrfs_recover_log_trees+0x221/0x420 [btrfs] [ 223.054466] ? replay_one_dir_item+0x170/0x170 [btrfs] [ 223.054478] ? open_ctree+0x1a21/0x1b60 [btrfs] [ 223.054489] ? btrfs_mount_root+0x656/0x720 [btrfs] [ 223.054491] ? pcpu_block_update_hint_alloc+0x18a/0x1d0 [ 223.054495] ? cpumask_next+0x16/0x20 [ 223.054496] ? pcpu_alloc+0x1cb/0x670 [ 223.054499] ? mount_fs+0x3b/0x167 [ 223.054502] ? vfs_kern_mount.part.11+0x54/0x110 [ 223.054512] ? btrfs_mount+0x16f/0x860 [btrfs] [ 223.054514] ? path_lookupat.isra.13+0xa6/0x230 [ 223.054515] ? legitimize_path.isra.9+0x2d/0x60 [ 223.054518] ? pcpu_alloc_area+0xe2/0x130 [ 223.054519] ? pcpu_next_unpop+0x37/0x50 [ 223.054521] ? cpumask_next+0x16/0x20 [ 223.054523] ? pcpu_alloc+0x1cb/0x670 [ 223.054525] ? mount_fs+0x3b/0x167 [ 223.054526] ? mount_fs+0x3b/0x167 [ 223.054529] ? vfs_kern_mount.part.11+0x54/0x110 [ 223.054531] ? do_mount+0x1fd/0xc80 [ 223.054533] ? _copy_from_user+0x37/0x60 [ 223.054535] ? kmem_cache_alloc_trace+0x176/0x1d0 [ 223.054537] ? copy_mount_options+0x28/0x210 [ 223.054539] ? ksys_mount+0xba/0xd0 [ 223.054540] ? __x64_sys_mount+0x21/0x30 [ 223.054543] ? do_syscall_64+0x65/0x180 [ 223.054545] ? entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 223.054547] Modules linked in: fuse sg st mousedev joydev input_leds amdkfd amd_iommu_v2 amdgpu snd_hda_codec_ca0110 snd_hda_codec_generic chash snd_hda_codec_hdmi gpu_sched i2c_algo_bit snd_hda_intel snd_hda_codec ttm snd_hda_core edac_mce_amd drm_kms_helper sp5100_tco snd_hwdep kvm_amd snd_pcm drm snd_timer i2c_piix4 kvm snd agpgart syscopyarea sysfillrect ccp soundcore sysimgblt irqbypass fb_sys_fops pcc_cpufreq rng_core evdev k10temp pcspkr crct10dif_pclmul ghash_clmulni_intel acpi_cpufreq pinctrl_amd gpio_amdpt mac_hid wmi_bmof uinput crypto_user ip_tables x_tables overlay squashfs isofs sr_mod cdrom sd_mod uas usb_storage btrfs libcrc32c crc32c_generic xor hid_generic usbhid hid serio_raw atkbd crc32_pclmul crc32c_intel libps2 raid6_pq ahci libahci libata aesni_intel aes_x86_64 crypto_simd [ 223.054580] r8169 xhci_pci cryptd realtek glue_helper scsi_mod xhci_hcd libphy wmi i8042 serio dm_snapshot dm_bufio dm_mod loop [ 223.054588] CR2: 0000000000000000 [ 223.054590] ---[ end trace e933e8be13130720 ]--- [ 223.054592] RIP: 0010: (null) [ 223.054594] Code: Bad RIP value. [ 223.054595] RSP: 0018:ffffb36dcaa570b8 EFLAGS: 00010246 [ 223.054596] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 223.054598] RDX: 0000000000000006 RSI: fffff00c0dd2fb40 RDI: 0000000000000000 [ 223.054599] RBP: ffffb36dcaa57140 R08: 0000000000000000 R09: fffff00c0dd2fb40 [ 223.054600] R10: ffff9ea7ee5846a8 R11: 0000000000000000 R12: ffff9ea7ee584698 [ 223.054601] R13: ffffb36dcaa57190 R14: fffff00c0dd2fb48 R15: fffff00c0dd2fb40 [ 223.054603] FS: 00007fbe1d015780(0000) GS:ffff9ea88eb80000(0000) knlGS:0000000000000000 [ 223.054604] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 223.054605] CR2: ffffffffffffffd6 CR3: 000000038c148000 CR4: 00000000003406e0