From: Dave Chinner <david@fromorbit.com>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: fstests@vger.kernel.org
Subject: Re: [patch, v3] add an aio test which closes the fd before destroying the ioctx
Date: Thu, 21 Aug 2014 08:57:01 +1000 [thread overview]
Message-ID: <20140820225701.GG26465@dastard> (raw)
In-Reply-To: <x49vbrq6r0c.fsf@segfault.boston.devel.redhat.com>
On Tue, Jun 24, 2014 at 03:34:27PM -0400, Jeff Moyer wrote:
>
> By closing the file descriptor before calling io_destroy, you pretty
> much guarantee that the last put on the ioctx will be done in interrupt
> context (during I/O completion). This behavior has unearthed bugs in
> the kernel in several different kernel versions, so let's add a test to
> poke at it.
>
> The original test case was provided by Matt Cross. He has graciously
> relicensed it under the GPL v2 or later so that it can be included in
> xfstests. I've modified the test a bit so that it would generate a
> stable output format and to run for a fixed amount of time.
>
> Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Jeff, this test is causing xfstests to fail unmounts with EBUSY
frequently on some of my test VMs (i.e. in >60% of my test runs in
the past week).
$ sudo MKFS_OPTIONS="-m crc=1,finobt=1" ./check generic/323
FSTYP -- xfs (debug)
PLATFORM -- Linux/x86_64 test2 3.16.0-dgc+
MKFS_OPTIONS -- -f -m crc=1,finobt=1 /dev/vdb
MOUNT_OPTIONS -- /dev/vdb /mnt/scratch
generic/323 121s ... 121s
umount: /mnt/test: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
_check_xfs_filesystem: filesystem on /dev/vda has dirty log (see /home/dave/src/xfstests-dev/results//generic/323.full)
_check_xfs_filesystem: filesystem on /dev/vda is inconsistent (c) (see /home/dave/src/xfstests-dev/results//generic/323.full)
_check_xfs_filesystem: filesystem on /dev/vda is inconsistent (r) (see /home/dave/src/xfstests-dev/results//generic/323.full)
Ran: generic/323
Passed all 1 tests
$ sudo umount /mnt/test
$
i.e. something that the test is doing it leaving the superblock
referenced after all the processes have finished and exited, but an
immediate unmount after the test fails works just fine. So the
situation only persists for a couple of seconds. Adding a "sleep 5"
to the test just before it exits also makes the failure go away.
I have only ever seen this same issue with generic/208 - it's been
doing this randomly for as long as I can remember. That test is also
a aio+dio test and adding the same "sleep 5" makes that test no
longer show the issue.
IOWs, we now have two AIO+DIO tests showing the same symptoms that
no other tests show. This tends to point at AIO not being fully
cleaned up and completely freed by the time the processes
dispatching it have exit()d. This failure generally occurs when
there is other load on the system/disks backing the test VM (e.g.
running xfstests in multiple VMs at the same time) so I suspect it
has to do with IO completion taking a long time.
Can you spend some time trying to reproduce this and getting to the
bottom of whatever is triggering the unmount error?
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2014-08-20 22:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-24 19:34 [patch, v3] add an aio test which closes the fd before destroying the ioctx Jeff Moyer
2014-06-26 12:55 ` Brian Foster
2014-08-20 22:57 ` Dave Chinner [this message]
2014-08-20 23:43 ` Jeff Moyer
2014-08-21 9:16 ` Dave Chinner
2014-08-21 16:57 ` Zach Brown
2014-08-25 16:50 ` Benjamin LaHaise
2014-08-25 17:55 ` Jeff Moyer
2014-08-25 23:12 ` Dave Chinner
2014-08-26 16:05 ` Jeff Moyer
2014-08-26 17:27 ` Zach Brown
2014-08-26 17:32 ` Jeff Moyer
2014-08-27 8:49 ` Dave Chinner
2014-08-27 10:08 ` Dave Chinner
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=20140820225701.GG26465@dastard \
--to=david@fromorbit.com \
--cc=fstests@vger.kernel.org \
--cc=jmoyer@redhat.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