public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/115031] New: g++.dg/modules/pr99023_b.X FAILs
@ 2024-05-10 13:45 ro at gcc dot gnu.org
2024-05-13 8:53 ` [Bug c++/115031] " ro at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: ro at gcc dot gnu.org @ 2024-05-10 13:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115031
Bug ID: 115031
Summary: g++.dg/modules/pr99023_b.X FAILs
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ro at gcc dot gnu.org
Target Milestone: ---
Host: sparc-sun-solaris2.11
Target: sparc-sun-solaris2.11
Build: sparc-sun-solaris2.11
The g++.dg/modules/pr99023_b.X test FAILs on Solaris/SPARC when using a
32-bit-default
compiler:
FAIL: g++.dg/modules/pr99023_b.X -std=c++2a 1 blank line(s) in output
FAIL: g++.dg/modules/pr99023_b.X -std=c++2a (test for excess errors)
Excess errors:
cc1plus: out of memory allocating 1048344 bytes after a total of 7913472 bytes
Strangely, this doesn't happen with a 32-bit-default Solaris/x86 compiler.
The failure (I haven't checked the specifics) goes back as far as 20210219.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/115031] g++.dg/modules/pr99023_b.X FAILs
2024-05-10 13:45 [Bug c++/115031] New: g++.dg/modules/pr99023_b.X FAILs ro at gcc dot gnu.org
@ 2024-05-13 8:53 ` ro at gcc dot gnu.org
2024-05-27 12:37 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: ro at gcc dot gnu.org @ 2024-05-13 8:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115031
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nathan at gcc dot gnu.org
--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> ---
Nathan, any suggestion where to start looking here?
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/115031] g++.dg/modules/pr99023_b.X FAILs
2024-05-10 13:45 [Bug c++/115031] New: g++.dg/modules/pr99023_b.X FAILs ro at gcc dot gnu.org
2024-05-13 8:53 ` [Bug c++/115031] " ro at gcc dot gnu.org
@ 2024-05-27 12:37 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-05-30 13:01 ` cvs-commit at gcc dot gnu.org
2024-05-30 13:03 ` ro at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2024-05-27 12:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115031
--- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
I've done some digging now, comparing mmap calls on Solaris/i386 and
Solaris/SPARC (counts and sizes each):
i386:
2 4096
7 8192
5 16384
7 32768
4 65536
3 131072
2 262144
3 524288
2 1048576
1 1662976
892 2097152
2 3313664
1 4194304
total ca. 1784 MB
getconf PAGE_SIZE -> 4096
sparc:
491 8192
6 16384
4 32768
3 65536
2 131072
1 262144
2 524288
1 1048576
1 2097152
986 4194304
total ca. 3947 MB
getconf PAGE_SIZE -> 8192
In a next step, I disabled MAPPED_{READING, WRITING} in
gcc/cp/module.cc, but that made almost no different on i386 and didn't
cure the allocation failure on sparc.
Looking closer at the mmap64 call chains, they are primarily from
ggc_internal_alloc. So I undef'ed USING_MMAP there, with astonishing
results for runtimes:
* i386 with mmap in module.cc and ggc-page.cc:
real 30.12
user 29.62
sys 0.14
* i386 with fileio in module.cc and mmap in ggc-page:
real 29.93
user 29.50
sys 0.21
* i386 with fileio in module.cc and USING_MMAP undef'ed in ggc-page.cc:
real 28.53
user 28.19
sys 0.16
* sparc with the same combination allows the test to run to complition
for the first time:
real 37.81
user 37.46
sys 0.14
I wonder what to make of that beyond the failing sparc testcase.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/115031] g++.dg/modules/pr99023_b.X FAILs
2024-05-10 13:45 [Bug c++/115031] New: g++.dg/modules/pr99023_b.X FAILs ro at gcc dot gnu.org
2024-05-13 8:53 ` [Bug c++/115031] " ro at gcc dot gnu.org
2024-05-27 12:37 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2024-05-30 13:01 ` cvs-commit at gcc dot gnu.org
2024-05-30 13:03 ` ro at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-30 13:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115031
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Rainer Orth <ro@gcc.gnu.org>:
https://gcc.gnu.org/g:32f99225bcaae9b792aec143239d17f2b7e2c54b
commit r15-927-g32f99225bcaae9b792aec143239d17f2b7e2c54b
Author: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Date: Thu May 30 15:00:59 2024 +0200
ggc: Reduce GGC_QUIRE_SIZE on Solaris/SPARC [PR115031]
g++.dg/modules/pr99023_b.X currently FAILs on 32-bit Solaris/SPARC:
FAIL: g++.dg/modules/pr99023_b.X -std=c++2a 1 blank line(s) in output
FAIL: g++.dg/modules/pr99023_b.X -std=c++2a (test for excess errors)
Excess errors:
cc1plus: out of memory allocating 1048344 bytes after a total of 7913472
bytes
It turns out that this exhaustion of the 32-bit address space happens
due to a combination of three issues:
* the SPARC pagesize of 8 kB,
* ggc-page.cc's chunk size of 512 * pagesize, i.e. 4 MB, and
* mmap adding two 8 kB unmapped red-zone pages to each mapping
which result in the 4 MB mappings to actually consume 4.5 MB of address
space.
To avoid this, this patch reduces the chunk size so it remains at 4 MB
even when combined with the red-zone pages, as recommended by mmap(2).
Tested on sparc-sun-solaris2.11 and sparcv9-sun-solaris2.11.
2024-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
gcc:
PR c++/115031
* config/sparc/sol2.h (GGC_QUIRE_SIZE): Define as 510.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/115031] g++.dg/modules/pr99023_b.X FAILs
2024-05-10 13:45 [Bug c++/115031] New: g++.dg/modules/pr99023_b.X FAILs ro at gcc dot gnu.org
` (2 preceding siblings ...)
2024-05-30 13:01 ` cvs-commit at gcc dot gnu.org
@ 2024-05-30 13:03 ` ro at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: ro at gcc dot gnu.org @ 2024-05-30 13:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115031
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |ro at gcc dot gnu.org
URL| |https://gcc.gnu.org/piperma
| |il/gcc-patches/2024-May/653
| |136.html
Target Milestone|--- |15.0
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Rainer Orth <ro at gcc dot gnu.org> ---
Fixed for GCC 15.0.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-05-30 13:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-10 13:45 [Bug c++/115031] New: g++.dg/modules/pr99023_b.X FAILs ro at gcc dot gnu.org
2024-05-13 8:53 ` [Bug c++/115031] " ro at gcc dot gnu.org
2024-05-27 12:37 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-05-30 13:01 ` cvs-commit at gcc dot gnu.org
2024-05-30 13:03 ` ro at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).