From: Tom Tromey <tromey@adacore.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Ignore the last EXIT_THREAD_DEBUG_EVENT on Windows
Date: Fri, 21 Aug 2026 12:18:05 -0600 [thread overview]
Message-ID: <87o6evpcbm.fsf@tromey.com> (raw)
In-Reply-To: <86mrufz7g0.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 21 Aug 2026 20:53:19 +0300")
>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
Eli> How can we know that a given thread is a "final" one, when Windows is
Eli> known to start its own threads for the program being debugged?
We track when threads are created and destroyed, and only apply this
behavior when there is a single thread remaining.
Eli> Are you sure there are no such threads left running after all the
Eli> threads known to GDB exit, and cause this issue?
Yes, extracted from the log in the bug, here are all the thread and
process events:
[windows events] get_windows_debug_event: kernel event for pid=1604 tid=0x89c code=CREATE_PROCESS_DEBUG_EVENT
[windows events] get_windows_debug_event: kernel event for pid=1604 tid=0xc20 code=CREATE_THREAD_DEBUG_EVENT
[windows events] get_windows_debug_event: kernel event for pid=1604 tid=0xc20 code=EXIT_THREAD_DEBUG_EVENT
[windows events] get_windows_debug_event: kernel event for pid=1604 tid=0x89c code=EXIT_THREAD_DEBUG_EVENT
>> 1. It only happened under load, I was never able to reproduce it by
>> running a single test case.
Eli> What do you mean by "load" in this case? what kind of load?
If I run one test case in isolation, it never fails. However if I run
the whole test suite, which defaults to running as many tests as there
are CPUs, I do see some failures. Frequently -- but not always -- the
same tests fail.
Tom
next prev parent reply other threads:[~2026-08-21 18:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 16:18 Tom Tromey
2026-08-21 17:53 ` Eli Zaretskii
2026-08-21 18:18 ` Tom Tromey [this message]
2026-08-22 5:47 ` Eli Zaretskii
2026-08-27 15:27 ` Tom Tromey
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=87o6evpcbm.fsf@tromey.com \
--to=tromey@adacore.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/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