From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: Tom de Vries <tdevries@suse.de>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] [gdb/testsuite] Fix timeout in do_self_tests
Date: Mon, 07 Sep 2026 04:36:41 +0000 [thread overview]
Message-ID: <87zextn0di.fsf@linaro.org> (raw)
In-Reply-To: <20260906154838.139837-1-tdevries@suse.de> (Tom de Vries's message of "Sun, 6 Sep 2026 17:48:37 +0200")
Tom de Vries <tdevries@suse.de> writes:
> I noticed a patch reporting a timeout in the selftests on slow systems [1].
>
> I tried to see if I could trigger some timeouts.
>
> With the following setup:
> - gdb build with -O0
> - running gdb.gdb/*.exp
> - aarch64-linux platform
> - all cpu threads set to the lowest value: 600 Mhz
> - taskset -c 0
> I managed to trigger timeouts in the form of warnings:
> ...
> (gdb) set height 0
> WARNING: Couldn't set the height to 0
> set width 0
> WARNING: Couldn't set the width to 0.
> break main
> (gdb) set width 0
> (gdb) break main
> Breakpoint 1 at 0x41767c: file gdb.c, line 30.
> (gdb)
> ...
> in both gdb.gdb/selftest.exp and gdb.gdb/python-helper.exp.
>
> Note that this is extra slow because the default worker-threads is set using
> std::thread::hardware_concurrency, which is 8 even though we use taskset -c 0:
> ...
> $ taskset -c 0 gdb -q -batch -ex "maint show worker-thread"
> The number of worker threads GDB can use is the default (currently 8).
> ...
> making 8 worker threads compete for 1 cpu thread.
>
> The timeouts are triggered in do_self_tests by gdb loading the symbols in the
> background, making the effort to do so overlap with subsequent commands.
>
> Fix this using "maintenance set dwarf synchronous on".
>
> [1] https://sourceware.org/pipermail/gdb-patches/2026-September/230133.html
> ---
> gdb/testsuite/lib/selftest-support.exp | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
I also see the timeouts above in gdb.gdb/python-helper.exp with an
especially slow setup that I use sometimes: running the GDB testsuite in
a QEMU TCG aarch64 VM on an old x86_64 server. And this patch solves
them.
This is with GDB built with -O0, but as I mentioned in an email to Simon
perhaps I should switch to -Og. I still have to check how much of a
difference it makes.
I don't see the timeouts on a QEMU TCG aarch64 VM running on my faster
x86_64 laptop, though.
Also, when I run the testsuite on the slow setup I normally generously
increate gdb_test_timeout.
All this to say that I see value in this patch, but it's somewhat niche.
If you do decide to apply it:
Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Tested-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
--
Thiago
(he/him)
next prev parent reply other threads:[~2026-09-07 4:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-06 15:48 Tom de Vries
2026-09-06 15:48 ` [PATCH 2/2] [gdb] Exclude unavailable hardware threads in default worker-threads Tom de Vries
2026-09-07 4:44 ` Thiago Jung Bauermann
2026-09-07 6:52 ` Tom de Vries
2026-09-09 12:02 ` Tom de Vries
2026-09-07 4:36 ` Thiago Jung Bauermann [this message]
2026-09-09 11:57 ` [PATCH 1/2] [gdb/testsuite] Fix timeout in do_self_tests Tom de Vries
2026-09-09 20:28 ` Thiago Jung Bauermann
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=87zextn0di.fsf@linaro.org \
--to=thiago.bauermann@linaro.org \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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