From: Kent Overstreet <kent.overstreet@linux.dev>
To: Brian Foster <bfoster@redhat.com>
Cc: linux-bcachefs@vger.kernel.org
Subject: Re: fstests generic/441 -- occasional bcachefs failure
Date: Thu, 9 Feb 2023 09:58:34 -0500 [thread overview]
Message-ID: <Y+UKGgcgAuepi6XK@moria.home.lan> (raw)
In-Reply-To: <Y+Ttu34uCf4tn3jM@bfoster>
On Thu, Feb 09, 2023 at 07:57:31AM -0500, Brian Foster wrote:
> If you have any other open bugs that you think might be useful to look
> into, feel free to send them along..
https://evilpiepirate.org/~testdashboard/c/f99e51d956a74e1cd78f88648b27b0dac7c13a02/xfstests.generic.388/log.br
This might be a good one to start with: a file got truncated but still
has extents in it. I'd start by running it in a loop locally in ktest,
and seeing how easily it reproduces and what else turns up.
It's starting to look like there might be a btree ordering issue -
there's been a number of unusual bug reports of filesystem
inconsistencies that generally are repaired fine by fsck - but aren't
showing up in our tests either, this is the closest to those bugs that
I've come across in the tests.
truncate calls bch2_fpunch() which deletes extents using
bch2_extent_update(); it failing to delete some extents shouldn't be
possible and if i_sie/i_sectors somehow got out of sync I'd expect it to
be in the other direction; still, there might be some asserts we can
add.
'bcachefs list_journal -a' should be one of the first things you look
at, you can grep through the output to find the most recent transaction
commit(s) that updated that inode. See if anything looks funny - was
this one of the most recent updates when the test stopped, or was it
further back?
If it's a lower level btree inconsistency, that might show up by
verifying what the journal says we have against what's in the btree -
'bcachefs list' command.
If it's a btree ordering issue, there's two main possibilites:
- after a crash, the btree has updates it shouldn't have, because
they're newer than the newest update that made it into the journal
- the btree failed to persist some updates that the journal didn't
think it needed to replay anymore
Keys have a version number field: we can use it for distinguishing
between these two possibilities. In the transaction commit path, you'll
see code for a debug mode where we initialize it based on the sequence
number of the journal reservation we obtained. There may still be some
other related code for that debug mode; the idea is to check for keys
newer than the newest journal sequence number we replayed after a crash.
We should also check for keys with blacklisted journal sequence numbers.
I think one of those approaches will turn up something :)
prev parent reply other threads:[~2023-02-09 14:58 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 15:45 fstests generic/441 -- occasional bcachefs failure Brian Foster
2023-01-26 15:08 ` Kent Overstreet
2023-01-27 7:21 ` Kent Overstreet
2023-01-27 14:50 ` Brian Foster
2023-01-30 17:06 ` Kent Overstreet
2023-01-31 16:04 ` Brian Foster
2023-02-01 14:34 ` Kent Overstreet
2023-02-02 15:50 ` Brian Foster
2023-02-02 17:09 ` Freezing (was: Re: fstests generic/441 -- occasional bcachefs failure) Kent Overstreet
2023-02-02 20:04 ` Brian Foster
2023-02-02 22:39 ` Kent Overstreet
2023-02-03 0:51 ` Dave Chinner
2023-02-04 0:35 ` Kent Overstreet
2023-02-07 0:03 ` Dave Chinner
2023-02-16 20:04 ` Eric Wheeler
2023-02-20 22:19 ` Dave Chinner
2023-02-20 23:23 ` Kent Overstreet
2023-02-02 22:56 ` fstests generic/441 -- occasional bcachefs failure Kent Overstreet
2023-02-04 21:33 ` Brian Foster
2023-02-04 22:15 ` Kent Overstreet
2023-02-06 15:33 ` Brian Foster
2023-02-06 22:18 ` Kent Overstreet
2023-02-09 12:57 ` Brian Foster
2023-02-09 14:58 ` Kent Overstreet [this message]
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=Y+UKGgcgAuepi6XK@moria.home.lan \
--to=kent.overstreet@linux.dev \
--cc=bfoster@redhat.com \
--cc=linux-bcachefs@vger.kernel.org \
/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