Merge ~ahasenack/ubuntu/+source/mariadb-10.6:kinetic-mariadb-uring-memlock into ubuntu/+source/mariadb-10.6:ubuntu/devel

Proposed by Andreas Hasenack
Status: Merged
Merged at revision: 7cc6a5fd0943aa147c93f5527415ee715d12f5ff
Proposed branch: ~ahasenack/ubuntu/+source/mariadb-10.6:kinetic-mariadb-uring-memlock
Merge into: ubuntu/+source/mariadb-10.6:ubuntu/devel
Diff against target: 43 lines (+12/-1)
3 files modified
debian/changelog (+6/-0)
debian/control (+2/-1)
debian/rules (+4/-0)
Reviewer Review Type Date Requested Status
Sergio Durigan Junior (community) Approve
Canonical Server Pending
Review via email: mp+420845@code.launchpad.net

Description of the change

Disable lto to fix catching the exception that is thrown when mariadb tries to setup uring and it can't lock enough memory due to a low MEMLOCK limit.

For some reason, the exception isn't caught when lto is enabled, and mariadb crashes with sigabort instead. Upstream is wondering if it's a compiler bug.

Normally universe packages get this fix via an added entry in the lto-disabled-package, but I plan to SRU this to jammy, and the SRU fix will have to be disabling lto in the mariadb package itself, so I'm applying the same method for the development release.

I still have to write up the SRU template, and create jammy packages. PPAs are unusable atm.

PPA at https://launchpad.net/~ahasenack/+archive/ubuntu/mariadb-uring-memlock/+packages, but the build hasn't even started yet.

To test the existence of the bug, these steps are sufficient:
- create a focal VM
- confirm ulimit -l value in that VM. I've been getting the value "64", but anything lower than 256 will trigger the bug.
- inside that VM, create a jammy LXD
- iside that LXD, install mariadb-server. It will fail.

The mariadb build takes a long time. With 12 cores, about 1h, so I suggest to wait for the ppa. Or not :)

I'm unsure what the jammy SRU version will be. Current state is:
 mariadb-10.6 | 1:10.6.7-2ubuntu1 | jammy/universe | source
 mariadb-10.6 | 1:10.6.7-2ubuntu1 | kinetic/universe | source
 mariadb-10.6 | 1:10.6.7-3 | jammy-proposed/universe | source
 mariadb-10.6 | 1:10.6.7-3 | kinetic-proposed/universe | source

I don't know if the 10.6.7-3 jammy-proposed upload will be removed. I'll ask around.

To post a comment you must log in.
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks, Andreas.

This makes sense to me, and I agree with the workaround. Unfortunately these LTO bugs are very hard to diagnose... Daniel Black did a good job investigating it.

Regarding the version, I think 1:10.6.7-3 has been removed from jammy-proposed because I don't see it there anymore. So your upload should be versioned 1:10.6.7-2ubuntu1.1.

LGTM with this change.

review: Approve
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Version 10.6.7-3 are still in proposed:

$ rmadison mariadb-10.6
 mariadb-10.6 | 1:10.6.7-2ubuntu1 | jammy/universe | source
 mariadb-10.6 | 1:10.6.7-2ubuntu1 | kinetic/universe | source
 mariadb-10.6 | 1:10.6.7-3 | jammy-proposed/universe | source
 mariadb-10.6 | 1:10.6.7-3 | kinetic-proposed/universe | source

I'll keep kinetic at 10.6.7-3u1, jammy we'll see.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hah, my d/changelog had jammy in it, no wonder you mentioned it :)

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Ah, right! Sorry, I thought this MP was targeting Jammy. Now I understand why you appended "ubuntu1"...

BTW, I still don't see the package in jammy-proposed:

$ rmadison mariadb-10.6
ubuntu:
 mariadb-10.6 | 1:10.6.7-2ubuntu1 | jammy/universe | source
 mariadb-10.6 | 1:10.6.7-2ubuntu1 | kinetic/universe | source
 mariadb-10.6 | 1:10.6.7-3 | kinetic-proposed/universe | source

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote (last edit ):
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

It failed to build, there is something going on with boost in kinetic. I will let it settle over the weekend and retry later.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Ah, the jammy upload is in unapproved. I asked in #ubuntu-release for it to be deleted.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 3e311ff..e000cf0 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,9 @@
6+mariadb-10.6 (1:10.6.7-3ubuntu1) kinetic; urgency=medium
7+
8+ * d/rules: disable LTO (LP: #1970634)
9+
10+ -- Andreas Hasenack <andreas@canonical.com> Fri, 29 Apr 2022 09:30:44 -0300
11+
12 mariadb-10.6 (1:10.6.7-3) unstable; urgency=medium
13
14 * Fix syntax error in unstable tests lists
15diff --git a/debian/control b/debian/control
16index 9d92ac0..e57bce5 100644
17--- a/debian/control
18+++ b/debian/control
19@@ -1,7 +1,8 @@
20 Source: mariadb-10.6
21 Section: database
22 Priority: optional
23-Maintainer: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
24+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
25+XSBC-Original-Maintainer: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
26 Uploaders: Otto Kekäläinen <otto@debian.org>
27 Build-Depends: bison,
28 cmake,
29diff --git a/debian/rules b/debian/rules
30index 6d02cc0..2ff2e3b 100755
31--- a/debian/rules
32+++ b/debian/rules
33@@ -3,6 +3,10 @@
34 # Enable Debian Hardening
35 # https://wiki.debian.org/Hardening
36 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
37+
38+# Disable LTO, see LP: #1970634
39+export DEB_BUILD_MAINT_OPTIONS=optimize=-lto
40+
41 DPKG_EXPORT_BUILDFLAGS = 1
42 # Include all defaults, including buildflags.mk
43 include /usr/share/dpkg/default.mk

Subscribers

People subscribed via source and target branches