[Bug libc/34314] THP tests fail on hppa

"hjl.tools at gmail dot com via Glibc-bugs" <[email protected]> Sat, 04 Jul 2026 00:16:10 +0000
Newsgroups gmane.comp.lib.glibc.bugs
Message-ID <[email protected]/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=34314

--- Comment #10 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to dave.anglin from comment #8)
> On 2026-07-03 7:19 p.m., hjl.tools at gmail dot com wrote:
> > https://sourceware.org/bugzilla/show_bug.cgi?id=34314
> > 
> > --- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
> > (In reply to dave.anglin from comment #6)
> >> On 2026-07-03 2:26 a.m., hjl.tools at gmail dot com wrote:
> >>> https://sourceware.org/bugzilla/show_bug.cgi?id=34314
> >>>
> >>> --- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
> >>> Please show outputs of
> >>>
> >>> # cat /sys/kernel/mm/transparent_hugepage/enabled
> >>> # cat /sys/kernel/mm/transparent_hugepage/hpage_pmd_size
> >>
> >> dave@mx3210:~$ cat /sys/kernel/mm/transparent_hugepage/enabled
> >> cat: /sys/kernel/mm/transparent_hugepage/enabled: No such file or directory
> >>
> >> The /sys/kernel/mm/transparent_hugepage directory doesn't exist.
> >>
> >> First patch didn't change THP test results.
> > 
> > _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;
> >         }
> >     }
> > 
> > In your case,  _rtld_global._dl_thp_mode should be thp_mode_not_supported.
> > what is _rtld_global._dl_thp_mode when __madvise is called?
> 
> Latest patch didn't change test results either.
> 
> We don't get to the above code.  We return here from _dl_get_thp_config:
> 
> 31        if (GL(dl_elf_thp_control) == dl_elf_thp_control_disabled)
> 32          return;
> 
> (gdb) bt
> #0  _dl_get_thp_config () at ../sysdeps/unix/sysv/linux/dl-exec-post.h:24
> #1  dl_main (phdr=<optimized out>, phnum=<optimized out>,
>     user_entry=0xf9b018e0, auxv=0xf9b010b8) at rtld.c:1582
> #2  0xf97cba48 in _dl_sysdep_start (start_argptr=0xfffffffc,
>     dl_main=@0xf97e403a: 0xf97cdd0c <dl_main>)
>     at ../sysdeps/unix/sysv/linux/dl-sysdep.c:140
> #3  0xf97ccbd8 in _dl_start_final (arg=0x0, info=0xf97e1e80 <_rtld_local_ro>)
>     at rtld.c:494

It seems to fail at mmap when mapping the shared library.  Please show
mmap arguments and return value with strace.

-- 
You are receiving this mail because:
You are on the CC list for the bug.