io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Black <daniel@mariadb.org>
To: Filipe Manana <fdmanana@kernel.org>
Cc: io-uring@vger.kernel.org, linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Fwd: btrfs / io-uring corrupting reads
Date: Wed, 2 Mar 2022 08:51:53 +1100	[thread overview]
Message-ID: <CABVffEOWjSg+8pqzALuLt6mMviA0y7XRwsdJyv9_DodWKQFpqQ@mail.gmail.com> (raw)
In-Reply-To: <CAL3q7H4gwg+9ACTZV-BF_kr6QQ6-AFFtufezo2KYrVORC81QhQ@mail.gmail.com>

Filipe,

DId you find anything? This is starting to be noticed by our mutual users.

https://jira.mariadb.org/browse/MDEV-27900
https://mariadb.zulipchat.com/#narrow/stream/118759-general/topic/Corrupt.20database.20page.20when.20updating.20from.2010.2E5

On Tue, Feb 22, 2022 at 11:55 PM Filipe Manana <fdmanana@kernel.org> wrote:
>
> On Tue, Feb 22, 2022 at 12:46 PM Filipe Manana <fdmanana@kernel.org> wrote:
> >
> > On Tue, Feb 22, 2022 at 12:22 PM Daniel Black <daniel@mariadb.org> wrote:
> > >
> > > On Tue, Feb 22, 2022 at 10:42 PM Filipe Manana <fdmanana@kernel.org> wrote:
> > >
> > > > I gave it a try, but it fails setting up io_uring:
> > > >
> > > > 2022-02-22 11:27:13 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
> > > > 2022-02-22 11:27:13 0 [Warning] mysqld: io_uring_queue_init() failed with errno 1
> > > > 2022-02-22 11:27:13 0 [Warning] InnoDB: liburing disabled: falling back to innodb_use_native_aio=OFF
> > > > 2022-02-22 11:27:13 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
> > > > 2022-02-22 11:27:13 0 [Note] InnoDB: Completed initialization of buffer pool
> > > >
> > > > So that's why it doesn't fail here, as it fallbacks to no aio mode.
> > >
> > > error 1 is EPERM. Seems it needs --privileged on the container startup
> > > as a podman argument (before the image name). Sorry I missed that
> > >
> > > > Any idea why it's failing to setup io_uring?
> > > >
> > > > I have the liburing2 and liburing-dev packages installed on debian, and
> > > > tried with a 5.17-rc4 kernel.
> > >
> > > Taking https://packages.debian.org/bookworm/mariadb-server-core-10.6 package:
> > >
> > > mariadb-install-db --no-defaults --datadir=/empty/btrfs/path
> > > --innodb-use-native-aio=0
> > >
> > > mariadbd --no-defaults --datadir=/empty/btrfs/path --innodb-use-native-aio=1
> > >
> > > should achieve the same thing.
> >
> > Sorry, I have no experience with mariadb and podman. How am I supposed
> > to run that?
> > Is that supposed to run inside the container, on the host? Do I need
> > to change the podman command lines?
> >
> > What I did before was:
> >
> > DEV=/dev/sdh
> > MNT=/mnt/sdh
> >
> > mkfs.btrfs -f $DEV
> > mount $DEV $MNT
> >
> > mkdir $MNT/noaio
> > chown fdmanana: $MNT/noaio
> >
> > podman run --name mdbinit --rm -v $MNT/noaio/:/var/lib/mysql:Z -e
> > MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1
> > quay.io/danielgblack/mariadb-test:10.6-impish-sysbench
> > --innodb_use_native_aio=0
> >
> >
> > Then in another shell:
> >
> > podman kill --all
> >
> > podman run --rm -v $MNT/noaio/:/var/lib/mysql:Z -e
> > MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1
> > quay.io/danielgblack/mariadb-test:10.6-impish-sysbench
> > --innodb_use_native_aio=1
> >
> >
> > What should I change or add in there?
>
> Ok, just passing  --privileged to both podman commands triggered the
> bug as in your report.
> I'll see if I can figure out what's causing the read corruption.
>
>
> >
> > Thanks.

  reply	other threads:[~2022-03-01 21:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21  5:15 btrfs / io-uring corrupting reads Daniel Black
2022-02-21 21:53 ` Fwd: " Daniel Black
2022-02-22 11:41   ` Filipe Manana
2022-02-22 12:22     ` Daniel Black
2022-02-22 12:46       ` Filipe Manana
2022-02-22 12:54         ` Filipe Manana
2022-03-01 21:51           ` Daniel Black [this message]
2022-03-02 11:28             ` Filipe Manana

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=CABVffEOWjSg+8pqzALuLt6mMviA0y7XRwsdJyv9_DodWKQFpqQ@mail.gmail.com \
    --to=daniel@mariadb.org \
    --cc=fdmanana@kernel.org \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-btrfs@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;
as well as URLs for NNTP newsgroup(s).