From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) by sourceware.org (Postfix) with ESMTPS id C09423858D28 for ; Fri, 8 Apr 2022 17:04:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C09423858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=SystematicSw.ab.ca Authentication-Results: sourceware.org; spf=none smtp.mailfrom=systematicsw.ab.ca Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTP id cr06ngaar43Sgcs1knfCwQ; Fri, 08 Apr 2022 17:04:04 +0000 Received: from [10.0.0.5] ([184.64.124.72]) by cmsmtp with ESMTP id cs1jnGy2yqyyscs1jnLGUj; Fri, 08 Apr 2022 17:04:04 +0000 X-Authority-Analysis: v=2.4 cv=Y6brDzSN c=1 sm=1 tr=0 ts=62506b04 a=oHm12aVswOWz6TMtn9zYKg==:117 a=oHm12aVswOWz6TMtn9zYKg==:17 a=IkcTkHD0fZMA:10 a=w_pzkKWiAAAA:8 a=Xygow7KdUawCzliRKi8A:9 a=QEXdDO2ut3YA:10 a=9c8rtzwoRDUA:10 a=sRI3_1zDfAgwuvI8zelB:22 Message-ID: <80ad73a8-16f0-81bd-aa92-1cd22550c2ba@SystematicSw.ab.ca> Date: Fri, 8 Apr 2022 11:04:03 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Reply-To: cygwin@cygwin.com Subject: Re: Deadlock of the process tree when running make Content-Language: en-CA To: cygwin@cygwin.com References: <9388316255ada0e0fcb2d849cce5a894@ispras.ru> <23e627a3-39a7-e22f-6372-65d50f1a63d6@SystematicSw.ab.ca> <5c00c0cd21bac6b4564fe5d2721520f1@ispras.ru> Cc: Alexey Izbyshev From: Brian Inglis Organization: Systematic Software In-Reply-To: <5c00c0cd21bac6b4564fe5d2721520f1@ispras.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4xfJz9DmxFIAjPcAw+PGc4y2UAKDYo9swc/FRn8A7sNeF2qsk1QMEfQGEUsfoZr8XmnC3TR8uCwlqCiCLB3XTgDHvBR89A7N3rIxfMfava6Nn0vee2nOEv z8oy8yzMAxJqtXr8flFnlMwmwIjrBqf9i7Gj01BuWsok1MiOe5TXhHCPPDs4slmjkBK0B0NCYOFiuwh7cGsWtZhVecuzPqYS1afgtak6QEF7HCDB69U4m/r5 X-Spam-Status: No, score=-1165.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2022 17:04:07 -0000 On 2022-04-08 02:42, Alexey Izbyshev wrote: > On 2022-04-08 02:54, Brian Inglis wrote: >> 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. > > Thanks, but I don't think I have such loops in this project. Also, other > processes hang in independent make jobs, so a hang around readlink > wouldn't explain that. > > There is also an additional detail that I forgot to mention: in the > stack trace of all leaf processes as displayed by ProcessHacker, it > seems that the executable entry point is not reached yet. The only > non-Windows-DLL location is in cygwin1.dll, so I suspect that all > processes hang at early initialization in Cygwin's DLL entry point. That sounds like BLODA interference from AntiVirus programs: https://cygwin.com/faq/faq.html#faq.using.bloda and can also happen if you use Windows AD, and your users have a lot of rights, and a slow server, firewall filtering, or network link, but known issues were fixed a few releases ago. Any idea how much address space is used by Cygwin DLLs, and memory by all the processes running: run rebase -is to see if you could be out of address space for Cygwin and DLLs, and how much is left for processes? Do you have a decent amount of memory free on your system while running, and Windows paging space allocated to back it up - total twice memory, and do you have multiple drives to spread it across? Check your system memory and paging activity while those processes are running. Could you try installing Cygwin64 packages and running those instead of Cygwin32 (recommended as Cygwin32 support will be dropped next release) as there is more address space available as well as usable memory for processes? -- 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.]