From: David McFarland <corngood@gmail.com>
To: cygwin-developers@cygwin.com
Subject: Re: deadlock on console mutex in gdb
Date: Wed, 22 Dec 2021 18:17:20 -0400 [thread overview]
Message-ID: <vrith7b0xp1r.fsf@gmail.com> (raw)
In-Reply-To: <20211223054409.610242feb0e96199904b3c9e@nifty.ne.jp> (Takashi Yano's message of "Thu, 23 Dec 2021 05:44:09 +0900")
Takashi Yano <takashi.yano@nifty.ne.jp> writes:
> Thanks for the report.
> Could you provide simple test case in C?
Sure, this seems to do it:
===== test.c
#include <pthread.h>
#include <stdio.h>
void *thread(void* p) {
printf("thread %p\n", p);
return 0;
}
int main() {
pthread_t ids[100];
for (int i = 0; i < 100; ++i) {
pthread_create(&ids[i], 0, &thread, &ids[i]);
}
for (int i = 0; i < 100; ++i) {
pthread_join(ids[i], 0);
}
return 0;
}
=====
If I compile that with gcc and run it under gdb, it hangs almost
immediately. 5/5 attempts using a fresh cygwin with latest packages.
next prev parent reply other threads:[~2021-12-22 22:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-22 15:26 David McFarland
2021-12-22 20:44 ` Takashi Yano
2021-12-22 22:17 ` David McFarland [this message]
2021-12-23 9:24 ` Takashi Yano
2021-12-23 15:32 ` David McFarland
2021-12-23 19:28 ` David McFarland
2021-12-26 15:25 ` David McFarland
2022-01-13 11:09 ` Takashi Yano
2022-01-13 10:56 ` Takashi Yano
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=vrith7b0xp1r.fsf@gmail.com \
--to=corngood@gmail.com \
--cc=cygwin-developers@cygwin.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).