From: Andrew Burgess <aburgess@redhat.com>
To: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>, gdb-patches@sourceware.org
Cc: Simon Marchi <simark@simark.ca>
Subject: Re: [PATCH] Reduce gdb.base/many-headers.c iterations on Solaris [PR34555]
Date: Mon, 21 Sep 2026 12:06:08 +0100 [thread overview]
Message-ID: <87o6dqamov.fsf@redhat.com> (raw)
In-Reply-To: <ydda4qdga7h.fsf@CeBiTec.Uni-Bielefeld.DE>
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
> As detailed in PR corefiles/34555, when reading the core file in the
> gdb.base/many-headers.exp test, gdb consumes excessive amounts of memory
> on Solaris. If left unchecked, e.g. with ulimit -Sv 8388608, the test
> will consume all available swap space. Since Solaris doesn't do lazy
> allocation, this will cause the system to become unusably slow.
>
> To avoid this, this patch reduces the iteration count by a factor of 100.
>
> Tested on sparcv9-sun-solaris2.11, x86_64-pc-solaris2.11, and
> x86_64-pc-linux-gnu.
>
> Ok for trunk and the gdb-18 branch?
>
>
> AFAICT, the issue is purely in gdb's Solaris corefile reader, which
> seems to need a complete rewrite rather than a couple of bugfixes.
Hi Rainer,
How would you feel about the patch below being pushed?
This skips the gdb.base/many-headers.exp test on Solaris. This should
prevent the memory exhaustion issues you are hitting, while not changing
the underlying purpose of the test.
Thanks,
Andrew
~~~
commit acf2c031172b792037874f2a985a6db931c083d8
Author: Andrew Burgess <aburgess@redhat.com>
Date: Mon Sep 21 11:48:00 2026 +0100
gdb/testsuite: skip gdb.base/many-headers.exp on Solaris
Bug PR gdb/34555 reports that the gdb.base/many-headers.exp test
script can trigger memory exhaustion issues on Solaris. This makes
running the testsuite harder. Skip the test on Solaris targets.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34555
diff --git a/gdb/testsuite/gdb.base/many-headers.exp b/gdb/testsuite/gdb.base/many-headers.exp
index 049c601cf67..b70177da22a 100644
--- a/gdb/testsuite/gdb.base/many-headers.exp
+++ b/gdb/testsuite/gdb.base/many-headers.exp
@@ -24,6 +24,21 @@ if { [target_info gdb_protocol] != "" } {
return
}
+if { [istarget "*-*-solaris*"] } {
+ # This quote is taken from PR gdb/34555:
+ #
+ # When running the gdb.base/many-headers.exp test on Solaris,
+ # gdb consumes excessive amounts of memory. Because Solaris
+ # doesn't use lazy allocation, this eventually consumes all
+ # swap, slows the machine to a crawl, and often requires a
+ # reboot.
+ #
+ # To avoid this, and make running the testsuite easier, let's skip
+ # this test for now.
+ untested "test triggers memory exhaustion (PR gdb/34555)"
+ return
+}
+
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
next prev parent reply other threads:[~2026-09-21 11:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-22 20:40 Rainer Orth
2026-09-07 14:35 ` Andrew Burgess
2026-09-08 8:39 ` Rainer Orth
2026-09-11 20:22 ` Tom Tromey
2026-09-21 11:06 ` Andrew Burgess [this message]
2026-09-21 12:08 ` Rainer Orth
2026-09-22 8:25 ` Andrew Burgess
2026-09-22 9:04 ` Rainer Orth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o6dqamov.fsf@redhat.com \
--to=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=ro@CeBiTec.Uni-Bielefeld.DE \
--cc=simark@simark.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox