glibc 2.39 test failure on ppc64el: elf/tst-decorate-maps

Bug #2058466 reported by Simon Chopin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GLibC
Fix Released
Low
glibc (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

This test fails on Noble/ppc64el

3775s FAIL: elf/tst-decorate-maps
3775s original exit status 1
3775s error: tst-decorate-maps.c:152: not true: r.n_loader_malloc_mmap >= 1
3775s error: tst-decorate-maps.c:167: not true: r.n_loader_malloc_mmap >= 1
3775s error: tst-decorate-maps.c:152: not true: r.n_loader_malloc_mmap >= 1
3775s error: tst-decorate-maps.c:167: not true: r.n_loader_malloc_mmap >= 1
3775s error: 4 test failures

CVE References

Revision history for this message
Paolo Pisati (p-pisati) wrote :

What's the kernel version? Do you have a log?

Revision history for this message
In , Simon Chopin (schopin) wrote :

Using the Ubuntu kernels (e.g. 6.5.0-26-generic from Mantic, but also the ones in the upcoming Noble), the glibc test suite fails on

FAIL: elf/tst-decorate-maps
original exit status 1
error: tst-decorate-maps.c:152: not true: r.n_loader_malloc_mmap >= 1
error: tst-decorate-maps.c:167: not true: r.n_loader_malloc_mmap >= 1
error: tst-decorate-maps.c:152: not true: r.n_loader_malloc_mmap >= 1
error: tst-decorate-maps.c:167: not true: r.n_loader_malloc_mmap >= 1
error: 4 test failures

Tested on upstream master branch (as of dc1a77269c "htl: Implement some support for TLS_DTV_AT_TP"), release/2.39/master, as well as the Ubuntu package.

I couldn't see anything particularly relevant in the system logs.

(assigning to malloc component since this seems to be primarily about allocations)

Revision history for this message
In , Andreas Schwab (schwab-linux-m68k) wrote :

Does the kernel use 64k pages?

Revision history for this message
In , Simon Chopin (schopin) wrote :

(In reply to Andreas Schwab from comment #1)
> Does the kernel use 64k pages?

$ getconf PAGESIZE
65536

I guess it does.

Changed in glibc:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
Simon Chopin (schopin) wrote :

@Paolo thanks for probing this. I finally managed to get my hands on a suitable power system with recent enough kernel to reproduce this and file an upstream bug report, and the conversation there led me to conclude that it's just a faulty assumption in the test (namely that the initial allocation code would need to allocate a new page, which isn't the case when the page size is 64k).

I'll just XFAIL this on power for now, and mark this a low priority on the upstream bug tracker (as I'd like the test to be fixed)

Revision history for this message
In , Simon Chopin (schopin) wrote :

Thanks Andreas for pointing me to the page size.

There's an assumption made in the test that the early allocation code will need to grow beyond the initial data page, as those extra pages would be the ones marked "[anon: glibc: loader malloc]". However, if the page size is large enough, I guess that assumption isn't valid anymore.

I'll write a patch skipping this particular assertion if the page size is 64k or above.

Revision history for this message
In , Adhemerval Zanella (adhemerval-zanella) wrote :

(In reply to Simon Chopin from comment #3)
> Thanks Andreas for pointing me to the page size.
>
> There's an assumption made in the test that the early allocation code will
> need to grow beyond the initial data page, as those extra pages would be the
> ones marked "[anon: glibc: loader malloc]". However, if the page size is
> large enough, I guess that assumption isn't valid anymore.
>
> I'll write a patch skipping this particular assertion if the page size is
> 64k or above.

I could reproduce it on a ppc64le VM, and it seems to what you described: the __minimal_malloc never issues the mmap because the initial data segment can supply the loader memory requirement. I think without a way to trigger the load mmap allocation, it would be better to just remove the 'loader malloc' check (it might be that we will need to adjust for possible different page sizes).

Changed in glibc:
importance: Medium → Low
Simon Chopin (schopin)
Changed in glibc (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package glibc - 2.39-0ubuntu8

---------------
glibc (2.39-0ubuntu8) noble; urgency=medium

  * No-change rebuild for CVE-2024-3094

 -- Steve Langasek <email address hidden> Sat, 30 Mar 2024 07:42:05 +0000

Changed in glibc (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
In , Adhemerval Zanella (adhemerval-zanella) wrote :

Fixed on 2.40.

Changed in glibc:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.