From: Brian Foster <bfoster@redhat.com>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: linux-xfs@vger.kernel.org
Subject: Re: xfs: garbage file data inclusion bug under memory pressure
Date: Thu, 25 Jul 2019 12:00:27 -0400 [thread overview]
Message-ID: <20190725160027.GB5221@bfoster> (raw)
In-Reply-To: <0f507f3d-eed0-f6b8-48fe-acc9fd872d6b@i-love.sakura.ne.jp>
On Thu, Jul 25, 2019 at 09:30:01PM +0900, Tetsuo Handa wrote:
> On 2019/07/25 19:53, Brian Foster wrote:
> > This is a known problem. XFS delayed allocation has a window between
> > delalloc to real block conversion and writeback completion where stale
> > data exposure is possible if the writeback doesn't complete (i.e., due
> > to crash, I/O error, etc.). See fstests generic/536 for another
> > reference. We've batted around potential solutions like using unwritten
> > extents for delalloc allocations, but IIRC we haven't been able to come
> > up with something with suitable performance to this point.
> >
> > I'm curious why your OOM test results in writeback errors in the first
> > place. Is that generally expected? Does dmesg show any other XFS related
> > events, such as filesystem shutdown for example? I gave it a quick try
> > on a 4GB swapless VM and it doesn't trigger OOM. What's your memory
> > configuration and what does the /tmp filesystem look like ('xfs_info
> > /tmp')?
>
> Writeback errors should not happen by just close-to-OOM situation.
> And there is no other XFS related events.
>
Indeed, that is strange.
...
>
> Kernel config is http://I-love.SAKURA.ne.jp/tmp/config-5.3-rc1 .
>
> Below result is from a different VM which shows the same problem.
>
> # xfs_info /tmp
> meta-data=/dev/sda1 isize=256 agcount=4, agsize=16383936 blks
> = sectsz=512 attr=2, projid32bit=1
> = crc=0 finobt=0 spinodes=0
> data = bsize=4096 blocks=65535744, imaxpct=25
> = sunit=0 swidth=0 blks
> naming =version 2 bsize=4096 ascii-ci=0 ftype=0
> log =internal bsize=4096 blocks=31999, version=2
> = sectsz=512 sunit=0 blks, lazy-count=1
> realtime =none extsz=4096 blocks=0, rtextents=0
>
I ran your oom-torture.c (without the fs fill step) tool again after
dropping VM RAM to 3GB and still had to invoke some usemem (from
fstests) instances to consume memory before OOM triggered. I eventually
reproduced oom-torture OOM kills but did not reproduce writeback errors.
I've only run it once, but this is against a virtio vdisk backing
lvm+XFS in the guest. What is your target device here? Is it failing
independently by chance?
Brian
>
>
next prev parent reply other threads:[~2019-07-25 16:00 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-25 10:06 xfs: garbage file data inclusion bug under memory pressure Tetsuo Handa
2019-07-25 10:53 ` Brian Foster
2019-07-25 12:30 ` Tetsuo Handa
2019-07-25 16:00 ` Brian Foster [this message]
2019-07-25 11:32 ` Dave Chinner
2019-07-25 12:44 ` Tetsuo Handa
2019-07-25 17:28 ` Darrick J. Wong
2019-07-25 22:07 ` Dave Chinner
2019-07-29 3:50 ` Tetsuo Handa
2019-07-29 11:23 ` Brian Foster
2019-07-29 21:56 ` Dave Chinner
2019-07-30 11:30 ` Brian Foster
2019-08-01 10:06 ` [PATCH] fs: xfs: xfs_log: Don't use KM_MAYFAIL at xfs_log_reserve() Tetsuo Handa
2019-08-01 10:56 ` Brian Foster
2019-08-01 11:00 ` Tetsuo Handa
2019-08-01 18:50 ` Luis Chamberlain
2019-08-01 20:46 ` Darrick J. Wong
2019-08-02 22:21 ` Luis Chamberlain
2019-08-12 10:57 ` Tetsuo Handa
2019-08-12 19:55 ` Darrick J. Wong
2019-08-01 21:13 ` Tetsuo Handa
2019-08-01 21:55 ` Dave Chinner
2019-08-01 20:46 ` Darrick J. Wong
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=20190725160027.GB5221@bfoster \
--to=bfoster@redhat.com \
--cc=linux-xfs@vger.kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
/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;
as well as URLs for NNTP newsgroup(s).