public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Pieter P <pieter.p.dev@outlook.com>, linux-btrfs@vger.kernel.org
Subject: Re: Errors found in extent allocation tree (single bit flipped)
Date: Tue, 27 Aug 2024 08:48:46 +0930	[thread overview]
Message-ID: <012717c6-4e7e-44e9-9906-5f13e4273c35@gmx.com> (raw)
In-Reply-To: <AS8P250MB08869C932AF99C5C087F1B408F8B2@AS8P250MB0886.EURP250.PROD.OUTLOOK.COM>



在 2024/8/27 08:34, Pieter P 写道:
> Thanks for the help!
>
> On 21/08/2024 00:55, Qu Wenruo wrote:
>
>> And in that case, "btrfs check --mode=lowmem" output may help a little
>> more, and the same for "btrfs check --repair --mode=lowmem".
>
> I've attached the output from both commands, unfortunately, that didn't
> fix the issue.
>
> Subvolume 257 is my /home directory, and the broken inode is a temporary
> file in a Chromium cache folder. I've tried deleting and overwriting
> that file, but this causes the file system to go read-only a couple of
> seconds later, and after re-mounting, the file re-appears. Reading the
> file is not possible (input/output error).
>
> Is there a way to restore the file system by simply deleting this
> inode+data entirely?

After your latest --repair try, the fs should be more or less fine, you
can try remove the offending file.

Just a minor problem left with the superblock used bytes, that can be
fixed by another "btrfs check --repair" run very safely.

>
>> If above lowmem mode still doesn't work, I can craft a tool for your
>> specific corruption if really needed.
>>
>> But that will need the dump of your subvolume 257 inode 50058751.
>
> Which data would you need specifically? How do I get such a dump?

No need anymore, the latest result contains the all the info I need.

>
>> Unless the system is using ECC memories, I doubt if that diagnostic tool
>> makes any difference.
>>
>> If there is already a strong indication of bitflip (and yes, it is), a
>> full memtest is highly recommended.
>
> No ECC memory, but I did perform the "thorough" memory test using the
> Dell diagnostic tool multiple times. It included data bus stress tests,
> march C- tests, ground bounce tests, random pattern tests, and some
> others; all passed without issues. Since I haven't noticed any other
> problems (the system works fine when booting from another drive), I'm
> blaming an unfortunate cosmic ray for now :)

Unfortunately it's indeed a bitflip, from your latest lowmem repair
result (which mostly solves the problem).

 > ERROR: extent[2216718336, 4096] referencer count mismatch (root: 257,
owner: 50058751, offset: 0) wanted: 1, have: 0

This is the original extent item, which looks sane to me.

 > Add one extent data backref [576460754520141824 4096]

This is the one to be added according to the subvoluem tree. The huge
value itself is already a little concerning.

Furthermore:

hex(576460754520141824) = 0x800000084207000
hex(2216718336)         = 0x000000084207000

It's an obvious bitflip.

Another possibility is, the fs is old and you just migrated the drive/fs
to the current platform, but I doubt about the case considering the file
is some browser cache, which shouldn't be that old.

Just in case, mind to try something like memtest86+ (UEFI payload) or
memtester (inside the OS) to rule out the hardware problem?

Hope it's really a cosmic ray, not a persistent hardware problem.

Thanks,
Qu
>
> Thank you!
> Pieter

  reply	other threads:[~2024-08-26 23:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-12 14:57 Errors found in extent allocation tree (single bit flipped) Pieter P
2024-08-20 14:01 ` Pieter P
2024-08-20 22:55   ` Qu Wenruo
2024-08-20 23:02 ` Qu Wenruo
2024-08-26 23:04   ` Pieter P
2024-08-26 23:18     ` Qu Wenruo [this message]
2024-08-27  0:47       ` Pieter P
2024-08-27  5:19         ` Qu Wenruo
2024-08-27  6:51           ` Qu Wenruo
2024-08-27  9:33             ` Qu Wenruo
2024-08-28  8:49               ` Pieter P
2024-08-28  9:06                 ` Qu Wenruo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=012717c6-4e7e-44e9-9906-5f13e4273c35@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=pieter.p.dev@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox