[Bug dynamic-link/34348] New: FAIL: elf/tst-thp-1 if THP is disabled in kernel
"hjl.tools at gmail dot com via Glibc-bugs" <[email protected]> Fri, 03 Jul 2026 23:24:10 +0000
| Newsgroups | gmane.comp.lib.glibc.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://sourceware.org/bugzilla/show_bug.cgi?id=34348
Bug ID: 34348
Summary: FAIL: elf/tst-thp-1 if THP is disabled in kernel
Product: glibc
Version: 2.44
Status: NEW
Severity: normal
Priority: P2
Component: dynamic-link
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
Target: x86_64
_dl_get_thp_config has
if (DL_MAP_DEFAULT_THP_PAGESIZE != 0)
{
GL(dl_elf_thp_pagesize) = DL_MAP_DEFAULT_THP_PAGESIZE;
GL(dl_thp_mode) = thp_mode_madvise;
}
else
{
GL(dl_thp_mode) = __get_thp_mode ();
if (GL(dl_thp_mode) == thp_mode_always
|| GL(dl_thp_mode) == thp_mode_madvise)
GL(dl_elf_thp_pagesize) = get_capped_thp_size ();
else
GL(dl_elf_thp_pagesize) = 0;
if (GL(dl_elf_thp_pagesize) == 0)
{
GL(dl_elf_thp_control) = dl_elf_thp_control_disabled;
GL(dl_thp_mode) = thp_mode_not_supported;
}
}
sysdeps/unix/sysv/linux/x86_64/hugepages.h has
#define DL_MAP_DEFAULT_THP_PAGESIZE (2 * 1024 * 1024)
If THP is disabled in x86-64 kernel, we will get
.../elf/tst-thp-1.test-result
.../elf/tst-thp-1: error while loading shared libraries:
.../elf/tst-thp-1: failed to map segment from shared object
make[2]: Leaving directory '.../elf'
FAIL: elf/tst-thp-1
--
You are receiving this mail because:
You are on the CC list for the bug.