kdave / btrfs-progs

Development of userspace BTRFS tools
GNU General Public License v2.0
527 stars 239 forks source link

`btrfs check --repair` core dumps with `IOT instruction` on disk with corruption #735

Open alexwh opened 5 months ago

alexwh commented 5 months ago

I made the mistake of mounting a btrfs disk in two places at once - in a VM and on the host (libvirt with LVM). The system was in this state for around a day, though the host didn't write anything in that time. After seeing my mistake, I unmounted on the host and ran a scrub in the guest, which returned 90 or so uncorrectable errors. I then booted into a livecd and ran btrfs check. I was fairly sure my data was hosed at this point, but I had nothing to lose as I had backups, so I ran btrfs check with --repair, which coredumped and seemed like a bug.

btrfs-progs version: 6.7 static logs: kmsg.log scrub.log check.log check_repair.log coredump (2GB): https://mega.nz/file/BihyDSRJ#VF1koGKi5H_pICf5Rsc5He9WyWQe4_Gtya1Y6_SQu_k