From: Tom de Vries <tdevries@suse.de>
To: Pedro Alves <pedro@palves.net>, gdb-patches@sourceware.org
Subject: Re: [PATCH] [gdb/tdep] Don't call WaitForSingleObject with INFINITE arg
Date: Tue, 10 Jun 2025 09:13:22 +0200 [thread overview]
Message-ID: <30a2d900-1fed-431b-9e85-2fb09593e050@suse.de> (raw)
In-Reply-To: <15d44b6f-bf37-47a3-a38e-767daa8270ce@palves.net>
On 6/6/25 15:11, Pedro Alves wrote:
> On 2025-06-05 17:15, Pedro Alves wrote:
>>> However, testsuite progress ground to a halt at
>>> gdb.base/branch-to-self.exp. [ AFAICT, similar problems reported
>>> here [1]. ]
>> The testsuite fails to kill gdb all the time for me, it may well be
>> the same. I'll give it a try after you've merged it.
>>
>
> I tested this now, and, unfortunately, it makes no difference for me.
Hi Pedro,
that's a pity.
FWIW, I've rebuild gdb from scratch, this time with -O0, ran the
test-case 10 times, and it finished every time.
> With upstream from before your patch, and I do see a gdb.base/branch-to-self.exp hang.
>
> However, after your patch, I still see the same hang.
>
> If I attach another GDB to the hung GDB, I see several other GDB threads stopped in
> WaitForMultipleObjects with an INFINITE argument, in Cygwin code, so I'm puzzled on
> how changing that particular call made a difference for you. :-/ Wonder if it's just
> a happy coincidence of affecting the scheduling.
>
Could be, I'm not sure.
FWIW, I've now managed to run the testsuite until gdb.base.sigterm.exp,
and it's stuck there.
> I've long suspected that this is actually some deadlock bug in Cygwin somewhere around
> closing stdin/stdout, and I still suspect so. But I can't discard it being a GDB bug.
>
If cygwin is problematic, I'm happy to ignore it and use one of the
other setups.
I've tried msys2, but also there I run into trouble (
https://sourceware.org/bugzilla/show_bug.cgi?id=33072 ) and I get even
less far than on cygwin: starting gdb is a problem because it produces
some control characters that the testsuite doesn't expect, and I can't
debug it because the gdb executable is missing debug info.
> I didn't use to have this issue maybe a year ago, then I stopped working on Windows for a
> few months, and when I got back at it, I started seeing the issue. It's like some Cygwin
> update, or Windows update caused the issue.
I also wonder whether it's easy to introduce regressions in gdb by
testing mingw but not cygwin.
Anyway, my windows/cygwin setup is fresh. I bought a windows laptop
this spring with windows 11 home, and installed cygwin on it.
> The hang is like other hangs I've observed before, it's around closing GDB to restart it
> for more tests, and the patch at:
>
> https://sourceware.org/pipermail/gdb-patches/2025-May/217949.html
>
> still helps with it for me. With that one on top of yours, and with
> gdb.base/branch-to-self.exp, I get:
>
> WARNING: closing gdb failed with: child process exited abnormally
>
> (the same as what I get without your patch) and the testcase moves on and
> finishes properly (though a couple tests fail with timeout, as they do for you.)
>
I've not seen that failure mode sofar, but thanks for the fix, that
looks useful.
> If I look at the task manager while doing a full testsuite run, I see a bunch of leftover
> gdb.exe processes and their children still running, because dejagnu fails to properly
> close gdb.exe.
I also see other cases of processes left behind. I've filed this
(https://sourceware.org/bugzilla/show_bug.cgi?id=33061 ) for one of those.
I've also got a patch submitted here (
https://patchwork.sourceware.org/project/gdb/patch/20250217163619.8662-3-tdevries@suse.de/
) for another case.
Thanks,
- Tom
next prev parent reply other threads:[~2025-06-10 7:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-05 15:03 Tom de Vries
2025-06-05 16:15 ` Pedro Alves
2025-06-05 16:25 ` Pedro Alves
2025-06-06 6:27 ` Tom de Vries
2025-06-06 7:12 ` Tom de Vries
2025-06-06 15:14 ` Pedro Alves
2025-06-06 15:27 ` Pedro Alves
2025-06-09 17:52 ` Pedro Alves
2025-06-10 7:13 ` Tom de Vries
2025-06-06 13:11 ` Pedro Alves
2025-06-10 7:13 ` Tom de Vries [this message]
2025-06-10 9:51 ` Pedro Alves
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=30a2d900-1fed-431b-9e85-2fb09593e050@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=pedro@palves.net \
/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