Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH] [gdb/tdep] Don't call WaitForSingleObject with INFINITE arg
Date: Fri, 6 Jun 2025 14:11:14 +0100	[thread overview]
Message-ID: <15d44b6f-bf37-47a3-a38e-767daa8270ce@palves.net> (raw)
In-Reply-To: <a6a1fb8b-4a4b-4fc0-a983-bc8d6cea5af8@palves.net>

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.  

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.

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.

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.

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.)

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.

Pedro Alves

  parent reply	other threads:[~2025-06-06 13:14 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 [this message]
2025-06-10  7:13     ` Tom de Vries
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=15d44b6f-bf37-47a3-a38e-767daa8270ce@palves.net \
    --to=pedro@palves.net \
    --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