Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 908394 - =dev-db/mariadb-10.6.13 (and others) ibdata1 growth bug MDEV-31234
Summary: =dev-db/mariadb-10.6.13 (and others) ibdata1 growth bug MDEV-31234
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux MySQL bugs team
URL: https://jira.mariadb.org/browse/MDEV-...
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-06-12 09:25 UTC by Dan Goodliffe
Modified: 2023-06-16 21:02 UTC (History)
1 user (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 Dan Goodliffe 2023-06-12 09:25:47 UTC
As per the referenced bug, InnoDB does not free UNDO after the fix of MDEV-30671, thus shared tablespace (ibdata1) may grow indefinitely for no good reason

Reproducible: Always

Steps to Reproduce:
This occurs through normal usage of specific MariadB versions.
Actual Results:  
ibdata1 (and/or related tablespaces) grow in size indefinitely

Expected Results:  
They shouldn't do that :-)

The bug is fixed in 10.6.14 (and other branches). Personal opinion, removing the effected ebuilds as growth of ibdata1 is not something that can be undone.
Comment 1 Tomáš Mózes 2023-06-12 14:27:34 UTC
Luckily we haven't stabilized them yet (they fix CVE-2022-47015), I'll try to look into bumping to new versions.
Comment 2 Tomáš Mózes 2023-06-12 14:35:04 UTC
Thanks for the report Dan, maybe https://mariadb.com/kb/en/defragmenting-innodb-tablespaces/ would work too?
Comment 3 Tomáš Mózes 2023-06-12 14:40:09 UTC
Oh, well no. So only a dump/restore would work.

"The feature described below has been deprecated in MariaDB 11.0 and was removed in MariaDB 11.1.0. See MDEV-30544 and MDEV-30545.

Note that tablespace files (including ibdata1) will not shrink as the result of defragmentation, but one will get better memory utilization in the InnoDB buffer pool as there are fewer data pages in use."
Comment 4 Dan Goodliffe 2023-06-12 14:45:24 UTC
Yeah, I'm hoping after this they might address that long standing "you can't shrink ibdata1" limitation somehow... I know enough people have wanted to do it... but dump/restore has always been the only way.
Luckily my Gentoo installs have only crept by a few MB so shrug... just hoping this bump saves some other people a headache!
Comment 5 Tomáš Mózes 2023-06-12 15:05:05 UTC
(In reply to Dan Goodliffe from comment #4)
> Yeah, I'm hoping after this they might address that long standing "you can't
> shrink ibdata1" limitation somehow... I know enough people have wanted to do
> it... but dump/restore has always been the only way.
> Luckily my Gentoo installs have only crept by a few MB so shrug... just
> hoping this bump saves some other people a headache!

The patches from previous ebuilds work, so you can test the new version from the PR.
Comment 6 Dan Goodliffe 2023-06-12 15:08:22 UTC
I've been running an uncommitted 10.6.14 as a simple rename of the ebuild from 10.6.13 for about 6 hrs on my dev machine, no obvious sign of trouble.
Comment 7 Larry the Git Cow gentoo-dev 2023-06-12 15:22:04 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ce09c1fe53eb0e1db16e0ba2175e332a33bed4a

commit 1ce09c1fe53eb0e1db16e0ba2175e332a33bed4a
Author:     Tomáš Mózes <hydrapolic@gmail.com>
AuthorDate: 2023-06-12 14:52:36 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-06-12 15:21:20 +0000

    dev-db/mariadb: add 10.4.30, 10.5.21, 10.6.14, 10.11.4
    
    Closes: https://bugs.gentoo.org/908394
    Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-db/mariadb/Manifest               |    4 +
 dev-db/mariadb/mariadb-10.11.4.ebuild | 1319 ++++++++++++++++++++++++++++++++
 dev-db/mariadb/mariadb-10.4.30.ebuild | 1312 ++++++++++++++++++++++++++++++++
 dev-db/mariadb/mariadb-10.5.21.ebuild | 1319 ++++++++++++++++++++++++++++++++
 dev-db/mariadb/mariadb-10.6.14.ebuild | 1329 +++++++++++++++++++++++++++++++++
 5 files changed, 5283 insertions(+)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29913c034d05dda5532a81663ced8904fca7a29f

commit 29913c034d05dda5532a81663ced8904fca7a29f
Author:     Tomáš Mózes <hydrapolic@gmail.com>
AuthorDate: 2023-06-12 15:15:54 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-06-12 15:21:21 +0000

    package.mask: mask buggy mariadb versions
    
    Bug: https://bugs.gentoo.org/908394
    Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/31398
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/package.mask | 7 +++++++
 1 file changed, 7 insertions(+)
Comment 8 Tomáš Mózes 2023-06-12 15:27:26 UTC
Thanks Dan and Sam too. Hope all is fine now.
Comment 9 Larry the Git Cow gentoo-dev 2023-06-16 21:02:35 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b06c46535d53af6d970ef16464521a84b3afcc7

commit 3b06c46535d53af6d970ef16464521a84b3afcc7
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-06-16 21:01:46 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-06-16 21:02:21 +0000

    profiles: add bug ref to mariadb mask
    
    Bug: https://bugs.gentoo.org/908394
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/package.mask | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)