[Bug 1970634] Re: FTBFS: mariadb fails to start due to low MEMLOCK limit
Andreas Hasenack
1970634 at bugs.launchpad.net
Fri Jun 17 18:15:50 UTC 2022
I got a report on IRC that the existing jammy package of mariadb does
exhibit this problem:
(link will expire soon)
https://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_bd5/839585/23/check/kolla-ansible-ubuntu-source/bd5a051/primary/logs/kolla/mariadb/mariadb.txt:
"""
2022-06-15 12:38:03 0 [Warning] mariadbd: io_uring_queue_init() failed with ENOMEM: try larger memory locked limit, ulimit -l, or https://mariadb.com/kb/en/systemd/#configuring-limitmemlock under systemd (262144 bytes required)
220615 12:38:03 [ERROR] mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
To report this bug, see https://mariadb.com/kb/en/reporting-bugs
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
Server version: 10.6.7-MariaDB-2ubuntu1-log
key_buffer_size=67108864
read_buffer_size=131072
max_used_connections=0
max_threads=10002
thread_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 22090304 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
(...)
"""
The scenario is very similar to the lxd testing I've been using to
confirm the bug. Above it's a docker container running mariadb from
jammy, on a focal host.
The docker image was built with just pulling in mariadb from jammy,
without rebuilding it, so it's the same binary as published.
I probably made a mistake in my testing with the jammy package just now.
I'll repeat it and inspect it more carefully.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1970634
Title:
FTBFS: mariadb fails to start due to low MEMLOCK limit
Status in mariadb-10.6 package in Ubuntu:
Fix Released
Status in systemd package in Ubuntu:
Confirmed
Status in mariadb-10.6 source package in Jammy:
Triaged
Status in systemd source package in Jammy:
In Progress
Bug description:
<rbasak> ahasenack: IIRC, originally Launchpad was FTBFSing on mariadb that included io_uring support because upstream were doing a build time test for io_uring (and I think still are), which is wrong because it should be done at runtime since the lack of io_uring availablity at build time doesn't tell us about its availablity at runtime.
<rbasak> But then the Launchpad builders got updated to a newer release and therefore a newer kernel that supported it.
<rbasak> AIUI, that's how we ended up with a successful build in the Jammy release pocket (of 10.6).
<ahasenack> I think the lp builders are using the focal hwe kernel
<ahasenack> 5.4.0-something
<ahasenack> let me check that build log
<rbasak> But then something changed that caused this current FTBFS, and I haven't tracked down what that is.
<ahasenack> hm, both are 10.6.7
<ahasenack> release and proposed
<rbasak> What puzzles me is that if the root cause is a memlock rlimit issue then why did it work before?
<rbasak> So since there's a contradiction somewhere, maybe one or more of my "facts" above is wrong.
<ahasenack> this is the current failure
<ahasenack> 2022-04-14 8:11:49 0 [Warning] mariadbd: io_uring_queue_init() failed with ENOMEM: try larger memory locked limit, ulimit -l, or https://mariadb.com/kb/en/systemd/#configuring-limitmemlock under systemd (262144 bytes required)
<ahasenack> and ulimit -l confirms that the limit is lower
<ahasenack> Max locked memory 65536 65536 bytes
<ahasenack> just 64kbytes
<rbasak> Yeah but then how did the release pocket build work?
<ahasenack> either the limit was different back then
<ahasenack> or ... stuff
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mariadb-10.6/+bug/1970634/+subscriptions
More information about the foundations-bugs
mailing list