[debian-mysql] Bug#1006529:

Daniel Black daniel at mariadb.org
Thu Feb 23 01:06:16 GMT 2023


2023-02-01  0:35:16 0 [Warning] mariadbd: Couldn't allocate 8388608
bytes (Large/HugeTLB memory page size 2097152); errno 22; continuing

I believe it is a kernel bug.

MariaDB is reading the page size from /sys/kernel/mm/hugepages.

      mapflag= MAP_PRIVATE | OS_MAP_ANON;
      mapflag|= my_bit_log2_size_t(large_page_size) << MAP_HUGE_SHIFT;

      ptr= mmap(NULL, aligned_size, PROT_READ | PROT_WRITE, mapflag, -1, 0);

aligned_size is a memory size that is an increment of the page size.

Per the mmap(2) man page, a ENOMEM, if memory cannot be allocated.

EINVAL (22) is totally unexpected. From man page, the only condition
satisfiable under the above conditions is length is too large (8M?
seems unlikely), or not aligned on the page boundary.

Given the page boundary was obtained from the /sys/kernel/mm/hugepages
I'm out of explanations. Can you validate that the pages sizes on the
directories in /sys/kernel/mm/hugepages are true to the architecture
specification.

I looked at kernel at mm/mmap.c and also can't see which path is
returning EINVAL



More information about the pkg-mysql-maint mailing list