All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Ashlie Martinez <ashmrtn@utexas.edu>,
	Vijay Chidambaram <vvijay03@gmail.com>,
	Ext4 <linux-ext4@vger.kernel.org>
Subject: Re: ext4 fix for interaction between i_size, fallocate, and delalloc after a crash
Date: Wed, 29 Nov 2017 10:07:39 +0200	[thread overview]
Message-ID: <CAOQ4uxiU3gu5+CRTSKig8r-Bpk=W0-J5N+MBL7s6XSrNUMrAKA@mail.gmail.com> (raw)
In-Reply-To: <20171129061307.f6hekryi3bppo26y@thunk.org>

On Wed, Nov 29, 2017 at 8:13 AM, Theodore Ts'o <tytso@mit.edu> wrote:
> On Tue, Nov 28, 2017 at 03:27:47PM -0600, Ashlie Martinez wrote:
>>
>> Unfortunately this timing bug only reproduces on some machines. Xiao
>> and I have been unable to reproduce this bug (I've tried kvm-xfstests,
>> my own kvm VMs, VMs without kvm, VMs with/without virtio drivers, and
>> another bare metal system). generic/456 basically sets up a race
>> condition between a kernel flusher thread and triggering dm-flakey, so
>> I think things like system load, core count, etc. might cause
>> different test results.
>
> Hmm, now I remember the details.  It reproduced reliably on
> gce-xfstests, but I was able to use kvm-xfstests to debug the problem
> (by invocations of debugfs to dump the file system state as I had
> described).  That's because debugfs operates on the buffer cache, and
> before the jbd2 commit, the changes to the inode structure are in the
> buffer cache, but they aren't allowed to be persisted on disk until
> after the journal commit.  And I was using debugfs to dump the inode's
> extent tree (as it exists in the buffer cache) before triggering
> dm-flakey.
>
> Now that we understand what is happening, it should be simple to
> adjust the test so it reliably reproduces, by adding a "sleep 6"
> before _flakey_drop_and_remote.  Since the delayed allocation write
> won't get resolved until 30 seconds after the inode was first dirtied,
> and the default jbd2 timer value is 5 seconds, this should guarantee
> that the jbd2 commit has taken place so that the inode changes made by
> fallocate are persisted onto the journal, while still allowing the
> delayed allocation write to be remain unresolved.
>

Sorry, sleep 6 didn't work for me.
Must be some other subtle detail.
If you could work out how to fix the test to catch the bug in kvm-xfstests
that would be nice.

Better yet, if you can figure out how to configure kvm-xfstests differently
so it catches the bug without modifying g/456 that would be much better,
because I currently cannot use kvm-xfstest to debug ANY of the
dm-log-writes crash test dummies.

Thanks,
Amir.

  reply	other threads:[~2017-11-29  8:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-17 15:43 ext4 fix for interaction between i_size, fallocate, and delalloc after a crash Ashlie Martinez
2017-11-21 16:17 ` Ashlie Martinez
2017-11-22 18:03 ` Theodore Ts'o
2017-11-23  5:39   ` Amir Goldstein
2017-11-27 14:31   ` Ashlie Martinez
2017-11-27 16:11     ` Theodore Ts'o
2017-11-28 13:04       ` Ashlie Martinez
2017-11-28 20:45         ` Theodore Ts'o
2017-11-28 21:27           ` Ashlie Martinez
2017-11-29  3:37             ` Amir Goldstein
2017-11-29  6:13             ` Theodore Ts'o
2017-11-29  8:07               ` Amir Goldstein [this message]
2017-11-29 19:58                 ` Ashlie Martinez
2017-11-30  0:48                   ` Theodore Ts'o
2017-11-30  1:46                     ` Ashlie Martinez
2017-11-30  4:46                       ` Theodore Ts'o
2017-11-30 14:22                         ` Theodore Ts'o
2017-11-30 14:51                         ` Ashlie Martinez
2017-11-30 15:27                           ` Theodore Ts'o
2017-11-30 15:40                             ` Ashlie Martinez
2017-12-02 20:00                               ` Ashlie Martinez
2017-11-30  0:24                 ` Theodore Ts'o
2017-11-30  6:46                   ` Amir Goldstein

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='CAOQ4uxiU3gu5+CRTSKig8r-Bpk=W0-J5N+MBL7s6XSrNUMrAKA@mail.gmail.com' \
    --to=amir73il@gmail.com \
    --cc=ashmrtn@utexas.edu \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=vvijay03@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.