public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Cc: Alexey Izbyshev <izbyshev@ispras.ru>
Subject: Re: Deadlock of the process tree when running make
Date: Sun, 10 Apr 2022 01:57:53 +0900	[thread overview]
Message-ID: <20220410015753.753e2a238513eaf2a3da81e9@nifty.ne.jp> (raw)
In-Reply-To: <907ce1b4416a826cb07990dd601bd687@ispras.ru>

On Sat, 09 Apr 2022 19:07:08 +0300
Alexey Izbyshev wrote:
> On 2022-04-09 14:46, Takashi Yano wrote:
> > On Sat, 09 Apr 2022 14:02:38 +0300
> > Alexey Izbyshev wrote:
> >> 
> >> Missed the line in the link above:
> >> https://cygwin.com/git?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/fhandler_tty.cc;h=7bef6958c106c5e78cc90e014081022fd3a205bc;hb=cygwin-3_3_4-release#l1199
> > 
> > Thanks for finding that. It would be very helpfull if you could
> > find another process which holds pcon_mutex and where it is stopping.
> 
> ProcessHacker showed that the owner of the pcon mutex is bash.exe with 
> (Windows) PID 6276. However, Cygwin ps doesn't list such a process. Its 
> parent, however, has a Cygwin PID 37961 and is in the hanging tree:
> 
> make(32651)-+-make(32656)-+-bash(37296)---find(38057)
>              |             |-bash(37632)---find(38061)
>              |             |-bash(37415)---find(38064)
>              |             |-bash(37852)---find(38062)
>              |             |-bash(37896)---find(38063)
>              |             `-bash(37961)---javac(38032)
>              
> `-make(32657)-+-bash(38025)---bash(38054)---bash(38055)---readlink(38056)
>                            
> `-bash(37722)---bash(37825)---bash(38058)-+-grep(38060)
>                                                                      
> `-grep(38059)
> 
> Since javac(38032) is a zombie, my guess is that missing bash.exe (win 
> 6276) is an intermediate process that Cygwin created when bash(37961) 
> forked to run javac.
> 
> bash.exe (win 6276) has two threads. The first one is blocked at 
> ClosePseudoConsole() (which according to stack trace eventually calls 
> NtWaitForSingleObject()) [1] and the second one is at [2].
> 
> [1] 
> https://cygwin.com/git?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/fhandler_tty.cc;h=7bef6958c106c5e78cc90e014081022fd3a205bc;hb=cygwin-3_3_4-release#l3615
> 
> [2] 
> https://cygwin.com/git?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/sigproc.cc;h=02d875a7fc947d628ca933690ed43ef03d767d53;hb=cygwin-3_3_4-release#l1359
> 
> Hope this is helpful,

Thank you very much for the information. Can you check if
the thread pty_master_fwd_thread() in root mintty is still
alive?

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

  reply	other threads:[~2022-04-09 16:58 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07 21:53 Alexey Izbyshev
2022-04-07 23:54 ` Brian Inglis
2022-04-08  8:42   ` Alexey Izbyshev
2022-04-08 17:04     ` Brian Inglis
2022-04-11 13:27       ` Alexey Izbyshev
2022-04-09 10:17 ` Takashi Yano
2022-04-09 11:00   ` Alexey Izbyshev
2022-04-09 11:02     ` Alexey Izbyshev
2022-04-09 11:46       ` Takashi Yano
2022-04-09 16:07         ` Alexey Izbyshev
2022-04-09 16:57           ` Takashi Yano [this message]
2022-04-09 17:23             ` Alexey Izbyshev
2022-04-09 17:54               ` Takashi Yano
2022-04-09 19:35                 ` Alexey Izbyshev
2022-04-09 20:26                   ` Alexey Izbyshev
2022-04-10  7:34                     ` Takashi Yano
2022-04-10 12:13                       ` Alexey Izbyshev
2022-04-10 20:49                         ` Alexey Izbyshev
2022-04-11  8:35                           ` Takashi Yano
2022-04-11 10:10                             ` Alexey Izbyshev
2022-04-13 16:48                               ` Alexey Izbyshev
2022-04-13 17:22                                 ` Takashi Yano
2022-04-13 17:27                                   ` Alexey Izbyshev
2022-04-13 23:17                                 ` Alexey Izbyshev
2022-04-16  9:39                                   ` Takashi Yano
2022-04-16 13:21                                     ` Alexey Izbyshev
2022-04-27 11:22                                       ` Takashi Yano
2022-04-27 12:19                                         ` Alexey Izbyshev
2022-04-11  5:23               ` Jeremy Drake
2022-04-11  8:36                 ` Takashi Yano
2022-04-11 15:28                 ` Alexey Izbyshev
2022-04-11 17:02                   ` Jeremy Drake

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=20220410015753.753e2a238513eaf2a3da81e9@nifty.ne.jp \
    --to=takashi.yano@nifty.ne.jp \
    --cc=cygwin@cygwin.com \
    --cc=izbyshev@ispras.ru \
    /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).