From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) by sourceware.org (Postfix) with ESMTPS id 3A529385840E for ; Fri, 25 Nov 2022 21:54:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3A529385840E 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-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTP id yaPto9p0WyQ9eygeVouzPq; Fri, 25 Nov 2022 21:54:31 +0000 Received: from [10.0.0.5] ([184.64.124.72]) by cmsmtp with ESMTP id ygeUoBLOribmAygeVohH0a; Fri, 25 Nov 2022 21:54:31 +0000 X-Authority-Analysis: v=2.4 cv=YPCMdDKx c=1 sm=1 tr=0 ts=63813997 a=oHm12aVswOWz6TMtn9zYKg==:117 a=oHm12aVswOWz6TMtn9zYKg==:17 a=IkcTkHD0fZMA:10 a=w_pzkKWiAAAA:8 a=cLcYU-wLy53cg4brnp0A:9 a=QEXdDO2ut3YA:10 a=OO2XiV6ZNdAA:10 a=9c8rtzwoRDUA:10 a=sRI3_1zDfAgwuvI8zelB:22 Message-ID: <6b1899df-c54f-9e13-5cf9-6ab4b68baf94@SystematicSw.ab.ca> Date: Fri, 25 Nov 2022 14:54:30 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 To: cygwin@cygwin.com Cc: derek.pagel@infor.com Subject: RE: Cygwin commands are intermittently hanging on Windows Reply-To: cygwin@cygwin.com Content-Language: en-CA In-Reply-To: From: Brian Inglis Organization: Systematic Software Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfAY8u/dnlgyABZ4oefjZye8qiJk6kZo2f59tIEZAWLKB8hW2xXo9V+ZE8uLmAh6Mvhj+uJAV5LytDleFXDRQF+L9UK6NmERnqrehip0E8+aPaJ/kqNyq UaNsJmG299mdOwIVNzEFxsSKGRreHq2AqQkhq2qqtGjsKMt/2KvlRg61bB/IcW9nds/x/fXwiwbwdCJY5LcSM9MQso69PX+isi60efiifFIqu1EepYKLVoxB X-Spam-Status: No, score=-1163.6 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, 16 Nov 2022 17:19:22 +0000, Derek Pagel wrote: > We've recreated the hanging issue on Windows 2019 and were able to capture > and attach a DMP file of a 'cp' command that was hanging. One other thing > that we noticed is that the Cygwin commands each tend to hang about 42 or 43 > seconds. So the commands are not hanging, they are slowed down, or delayed by 40 seconds. That sounds like the common symptoms of long/large queries/responses to/from a network server, usually a DC, often for AD info, or a slow network connection to a DC or AD server, or possibly a slow SMB or NFS file server. If you are exec-ing each Cygwin command from a non-Cygwin process, that will require setting up the Cygwin environment, including possibly long searches through your AD each time for all group memberships. See: https://cygwin.com/cygwin-ug-net/ntsec.html The solution is usually to run the Cygwin cygserver daemon at system startup to preload, cache, and share AD entries and other info across Cygwin processes. See: https://cygwin.com/faq/faq.html#faq.using.startup-slow You can provide confirmation or more information on the low level causes by running the slow command from strace e.g. "strace -o cp.strace cp ..." and providing the cp.strace output as a *TEXT* attachment to a reply post. Long PATH lists, especially with network shares, can also slow down searches for executable binaries, as can home directories or configuration files on shares. Setting Cygwin PATH to minimal $HOME/bin:/usr/local/bin:/usr/bin:/bin assuming those exist and are not on the network reduces searches. It is also possible that a less optimal AV is doing something on every Cygwin process start, or some process is intercepting DLLs, which may slow down processes. Run cygcheck cp to see if anything other than cygwin and standard Windows base system32 DLLs from standard locations are being loaded. Check to see if any AV product you are running is chewing up a lot of time on the system while you are running Cygwin commands. See: https://cygwin.com/faq/faq.html#faq.using.bloda Windows system DMPs are not useful for diagnosing problems with Cygwin multithreaded processes. You could see if you can find anyone who could diagnose what Windows was doing during those 40 second periods from the DMP as a cross-check. -- Take care. Thanks, Brian Inglis Calgary, Alberta, Canada La perfection est atteinte Perfection is achieved non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut -- Antoine de Saint-Exupéry