[Bug 1970634] Re: FTBFS: mariadb fails to start due to low MEMLOCK limit

Daniel Black 1970634 at bugs.launchpad.net
Fri Apr 29 01:10:55 UTC 2022


On the assembly generated by create_linux_aio (in the mariadbd packages
in Ubuntu-22.04, 10.6.7-2:

(gdb) disassemble tpool::create_linux_aio,+200
Dump of assembler code from 0x5640cf2e1fb0 to 0x5640cf2e2078:
   0x00005640cf2e1fb0 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+0>:	endbr64 
   0x00005640cf2e1fb4 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+4>:	push   %rbp
   0x00005640cf2e1fb5 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+5>:	mov    %rsp,%rbp
   0x00005640cf2e1fb8 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+8>:	push   %r14
   0x00005640cf2e1fba <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+10>:	mov    %esi,%r14d
   0x00005640cf2e1fbd <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+13>:	push   %r13
   0x00005640cf2e1fbf <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+15>:	mov    %rdi,%r13
   0x00005640cf2e1fc2 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+18>:	mov    $0x158,%edi
   0x00005640cf2e1fc7 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+23>:	push   %r12
   0x00005640cf2e1fc9 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+25>:	sub    $0x8,%rsp
   0x00005640cf2e1fcd <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+29>:	call   0x5640ceacb570 <_Znwm at plt>
   0x00005640cf2e1fd2 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+34>:	mov    %r14d,%edx
   0x00005640cf2e1fd5 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+37>:	mov    %r13,%rsi
   0x00005640cf2e1fd8 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+40>:	mov    %rax,%rdi
   0x00005640cf2e1fdb <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+43>:	mov    %rax,%r12
   0x00005640cf2e1fde <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+46>:	call   0x5640cf2e1dd0 <(anonymous namespace)::aio_uring::aio_uring(tpool::thread_pool*, int)>
   0x00005640cf2e1fe3 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+51>:	add    $0x8,%rsp
   0x00005640cf2e1fe7 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+55>:	mov    %r12,%rax
   0x00005640cf2e1fea <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+58>:	pop    %r12
   0x00005640cf2e1fec <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+60>:	pop    %r13
   0x00005640cf2e1fee <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+62>:	pop    %r14
   0x00005640cf2e1ff0 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+64>:	pop    %rbp
   0x00005640cf2e1ff1 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+65>:	ret    
   0x00005640cf2e1ff2 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+66>:	endbr64 
   0x00005640cf2e1ff6 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+70>:	mov    %rax,%rdi
   0x00005640cf2e1ff9 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+73>:	mov    %rdx,%rax
   0x00005640cf2e1ffc <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+76>:	jmp    0x5640ceb23308 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi-8121512>
   0x00005640cf2e2001 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+81>:	endbr64 
   0x00005640cf2e2005 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+85>:	mov    %rax,%r13
   0x00005640cf2e2008 <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+88>:	mov    %rdx,%r14
   0x00005640cf2e200b <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi+91>:	jmp    0x5640ceb232fa <_ZN5tpool16create_linux_aioEPNS_11thread_poolEi.cold>
--Type <RET> for more, q to quit, c to continue without paging--c
   0x00005640cf2e2010 <_ZN5tpool19thread_pool_generic17create_native_aioEi+0>:	endbr64 
   0x00005640cf2e2014 <_ZN5tpool19thread_pool_generic17create_native_aioEi+4>:	push   %rbp
   0x00005640cf2e2015 <_ZN5tpool19thread_pool_generic17create_native_aioEi+5>:	mov    %rsp,%rbp
   0x00005640cf2e2018 <_ZN5tpool19thread_pool_generic17create_native_aioEi+8>:	push   %r14
   0x00005640cf2e201a <_ZN5tpool19thread_pool_generic17create_native_aioEi+10>:	mov    %esi,%r14d
   0x00005640cf2e201d <_ZN5tpool19thread_pool_generic17create_native_aioEi+13>:	push   %r13
   0x00005640cf2e201f <_ZN5tpool19thread_pool_generic17create_native_aioEi+15>:	mov    %rdi,%r13
   0x00005640cf2e2022 <_ZN5tpool19thread_pool_generic17create_native_aioEi+18>:	mov    $0x158,%edi
   0x00005640cf2e2027 <_ZN5tpool19thread_pool_generic17create_native_aioEi+23>:	push   %r12
   0x00005640cf2e2029 <_ZN5tpool19thread_pool_generic17create_native_aioEi+25>:	sub    $0x8,%rsp
   0x00005640cf2e202d <_ZN5tpool19thread_pool_generic17create_native_aioEi+29>:	call   0x5640ceacb570 <_Znwm at plt>
   0x00005640cf2e2032 <_ZN5tpool19thread_pool_generic17create_native_aioEi+34>:	mov    %r14d,%edx
   0x00005640cf2e2035 <_ZN5tpool19thread_pool_generic17create_native_aioEi+37>:	mov    %r13,%rsi
   0x00005640cf2e2038 <_ZN5tpool19thread_pool_generic17create_native_aioEi+40>:	mov    %rax,%rdi
   0x00005640cf2e203b <_ZN5tpool19thread_pool_generic17create_native_aioEi+43>:	mov    %rax,%r12
   0x00005640cf2e203e <_ZN5tpool19thread_pool_generic17create_native_aioEi+46>:	call   0x5640cf2e1dd0 <(anonymous namespace)::aio_uring::aio_uring(tpool::thread_pool*, int)>
   0x00005640cf2e2043 <_ZN5tpool19thread_pool_generic17create_native_aioEi+51>:	add    $0x8,%rsp
   0x00005640cf2e2047 <_ZN5tpool19thread_pool_generic17create_native_aioEi+55>:	mov    %r12,%rax
   0x00005640cf2e204a <_ZN5tpool19thread_pool_generic17create_native_aioEi+58>:	pop    %r12
   0x00005640cf2e204c <_ZN5tpool19thread_pool_generic17create_native_aioEi+60>:	pop    %r13
   0x00005640cf2e204e <_ZN5tpool19thread_pool_generic17create_native_aioEi+62>:	pop    %r14
   0x00005640cf2e2050 <_ZN5tpool19thread_pool_generic17create_native_aioEi+64>:	pop    %rbp
   0x00005640cf2e2051 <_ZN5tpool19thread_pool_generic17create_native_aioEi+65>:	ret    
   0x00005640cf2e2052 <_ZN5tpool19thread_pool_generic17create_native_aioEi+66>:	endbr64 
   0x00005640cf2e2056 <_ZN5tpool19thread_pool_generic17create_native_aioEi+70>:	mov    %rax,%rdi
   0x00005640cf2e2059 <_ZN5tpool19thread_pool_generic17create_native_aioEi+73>:	mov    %rdx,%rax
   0x00005640cf2e205c <_ZN5tpool19thread_pool_generic17create_native_aioEi+76>:	jmp    0x5640ceb23334 <_ZN5tpool19thread_pool_generic17create_native_aioEi-8121564>
   0x00005640cf2e2061 <_ZN5tpool19thread_pool_generic17create_native_aioEi+81>:	endbr64 
   0x00005640cf2e2065 <_ZN5tpool19thread_pool_generic17create_native_aioEi+85>:	mov    %rax,%r13
   0x00005640cf2e2068 <_ZN5tpool19thread_pool_generic17create_native_aioEi+88>:	mov    %rdx,%r14
   0x00005640cf2e206b <_ZN5tpool19thread_pool_generic17create_native_aioEi+91>:	jmp    0x5640ceb23326 <_ZN5tpool19thread_pool_generic17create_native_aioEi.cold>

My assembly knowledge isn't great, but after the call to (anonymous
namespace)::aio_uring::aio_uring I'd expect some branching to identify
the exception has occurred.

I tested a simplified version
https://gist.github.com/grooverdan/f6d767a04ba5991ea2bf3de821e02e7b on
https://godbolt.org/ and
__cxa_begin_catch/__cxa_end_catch/_Unwind_Resume seem to be a standard
part of exception handling.

-- 
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:
  In Progress
Status in systemd package in Ubuntu:
  New

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