Deadlock of the process tree when running make

Brian Inglis Brian.Inglis@SystematicSw.ab.ca
Thu Apr 7 23:54:33 GMT 2022


On 2022-04-07 15:53, Alexey Izbyshev wrote:
> I'm using 32-bit Cygwin 3.3.4 on 64-bit Windows 10 21H2. When running 
> parallel make (for testing my project), very rarely I get the whole 
> process tree hanging at some seemingly random point. An example of such 
> a tree:
> 
> make-+-make-+-bash---find
>       |      |-bash---find
>       |      |-bash---find
>       |      |-bash---find
>       |      |-bash---find
>       |      `-bash---javac
>       `-make-+-bash---bash---bash---readlink
>              `-bash---bash---bash-+-grep
>                                   `-grep
> 
> (In the above tree, javac is the zombie parent of a native javac, and 
> the latter doesn't exist at this point).
> 
> I got such hang two times while running make in a loop for several days. 
> ProcessHacker shows that all leaf processes are single-threaded and are 
> stuck on WaitForSingleObject().
> 
> I've skimmed git log of cygwin-3_3-branch after cygwin-3_3_4-release, 
> but couldn't find anything that seems definitely related.
> 
> Has anybody seen something like this?
> 
> Is there any way I can get useful data for diagnosing this hang from the 
> process tree that I currently have hanging (I'm going to keep it for 
> now)? Otherwise, what would be the best strategy?

I've seen infinite loops with readlink in build scripts under Cygwin.
Seeing that readlink in a process tree makes me suspicious that 
something in a shell script is looping because two paths never match or 
always match under Cygwin.
Often there is one constant path and a varying path which is subjected 
to readlink in a loop.
Under Cygwin, you may have to pass the first path through readlink and 
compare that resulting path against the varying value.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]


More information about the Cygwin mailing list