Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 834532 - dev-db/mariadb with linux-5.16+ on BTRFS: [ERROR] InnoDB: Database page corruption on disk or a failed read of file './ibdata1' page [page id: space=0, page number=243]
Summary: dev-db/mariadb with linux-5.16+ on BTRFS: [ERROR] InnoDB: Database page corru...
Status: RESOLVED DUPLICATE of bug 832012
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-03 14:11 UTC by Thomas Deutschmann (RETIRED)
Modified: 2022-03-05 08:54 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann (RETIRED) gentoo-dev 2022-03-03 14:11:37 UTC
Folks,

Upon raising https://jira.mariadb.org/browse/MDEV-27900, and reraising
it to the btrfs kernel developers, Filipe Manana (Suse) came up with
this patch.

https://lore.kernel.org/linux-btrfs/CABVffENfbsC6HjGbskRZGR2NvxbnQi17gAuW65eOM+QRzsr8Bg@mail.gmail.com/T/#t

As a regression to 51bd9563b6783d, this affects all 5.16 kernels.

Bug report will contain an error log like:

2022-02-21 14:59:31 0 [ERROR] InnoDB: Database page corruption on disk
or a failed read of file './ibdata1' page [page id: space=0, page
number=9]. You may have to recover from a backup.
2022-02-21 14:59:31 0 [Note] InnoDB: Page dump in ascii and hex (16384 bytes):
 len 16384; hex
0000000000000009ffffffffffffffff0000000000009c2045bf0000000000000000000000000002012022-02-21
14:59:31 0 [ERROR] InnoDB: Database page corruption on disk or a
failed read of file './ibdata1' page [page id: space=0, page
number=243]. You may have to recover from a backup.
710009002022-02-21 14:59:31 0 [Note] InnoDB: Page dump in ascii and
hex (16384 bytes):

This has occurred exclusively on btrfs so far, however there are
suggestions on the linux-fsdevel list that gfs2 can also experience
the same.

It's important to note, the users' data isn't corrupt, just MariaDB's
read of it. Until a kernel update is prepared they can work around the
bug with innodb_use_native_aio=0 or innodb_flush_method=fsync as
MariaDB configuration items.


In the meantime, MariaDB upstream is working on MDEV-27593 to handle InnoDB AIO errors with message rather than assertion, to better validate and handle
error code, and returned sizes apparently.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-03 14:19:16 UTC
Wonder if it's the same as bug 832012 or just same workaround.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-05 08:54:26 UTC

*** This bug has been marked as a duplicate of bug 832012 ***