X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 72A7C3858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1673988400; bh=ItYk08Yq7dFKmj2sWmXD9df/qc5lk/zbeZ8kQ8O9BY0=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=DRGYDTeNcky+vlAslEL2WJBiO0wuvWBZo8hn0ZoyA0TL6YNSRPMIEB184uvCHuBFv kMdVX1aE4vjZ6BlrVWi2rSoSqN8YfNe3//36iyjE49fb6BAkkM8rJgbv0ceHbgSpQW MkBmGSI3tWPLSDqdsjLiX1QnWS9C/yq9ZfmGLOPI= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com Date: Tue, 17 Jan 2023 21:46:20 +0100 To: cygwin AT cygwin DOT com Subject: Re: Cygwin 3.4.3 and 3.5.0... hangs in make, top, procps, ls /proc/PID/... Message-ID: Mail-Followup-To: cygwin AT cygwin DOT com References: <4a4427cc-422b-1d14-015e-26523e620d9b AT Shaw DOT ca> <20230102113201 DOT 476c10bef7a5643bddc00762 AT nifty DOT ne DOT jp> <20230102143803 DOT 53f89d07a545a1bdd596e1e8 AT nifty DOT ne DOT jp> <20230102172147 DOT 83789d400bb0400cb8c8ca74 AT nifty DOT ne DOT jp> <20230116180213 DOT 0e03a896f512d784933f54da AT nifty DOT ne DOT jp> <20230116234532 DOT f567e64fe7bf9a0a13704af9 AT nifty DOT ne DOT jp> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Provags-ID: V03:K1:mM4f4PCpC24q0eJjpZmklBIO8qYrqzkU9PZR3jimkuLJSC0Sbmo OYEEwnnm3pdiUNp10AyneYE4Tfz1A9TKMc3xJi/oP6+BA9Dq6a7PjJXk5KjT304CmYTBZKw iMLNN5j6cDHhcBDtZRr1lR/MzsMLKPWQbPL2NvgAZuZ9jTVrhvCRU/4sR/OZQAJJxVnP1Ms MrfQ8tiZRxa7GGHLaUtrA== UI-OutboundReport: notjunk:1;M01:P0:KkjaDTpGWt0=;+m6UxXo0d6wXlSy/AXFjW1Ae1E7 L8svKJybbUxRNEDPjkAu4+L5Oe+KDRSND5szhKIX4dPXaOtgqJX1epNYFG1gbY8N2vSkA3Z3a uBKRh0XdhD2t2rsnRYt8HUUhZI3BEn9TKUyCRxw93vspffO5g4DHHDwP3leQj+WfMmnj5fss1 OfeXNcA4M0NTz3SJVdny4MJSPxsX4EVEps5I7imKBYTIBQHMR593sWalEDX1pVCVeNs5/AqT9 N2EqAceXQ8t6mYbHtYWwVKZtYIfXsL7djVUDp3sqhwgJNgi9sDXp7khFsb0WiFuWHq0EYXRvm D6rm79dloZHCrRDQuSNHxwMbSbhTwzkPiYu/U0D5HO/4YrLLw5bDrr+klkp2XnL1aPXKzL9Rb hwlejqnoVxaMA7ZDQLtoASuHW3SVRx8ksxfgXWgq18sLgK3snYswlNRnIHKo2OYSSoMbTWYn/ YReQTLoIjMAtY9Y4HrhGBIzpba/jz5/8RnNTCbS1raG8YP73Dwu6kqsytfoS1uEM4kx7nulC/ x3s+gjAX0JmW6NjdvAyWl2iVVXEwiqFp3r/MJ9Uu47ScvXb/TUfc+wM1acNPj51wFCH/flrvY wAu5qBY735SjH8KWWJu0NNPAOgf4Ep3SR10uIXuQlytbp2Lt1qV85YVhcbgvNGbg9DpSkFiei QeOSx1N3cjg3fgOKydHfxsmRWwgo1WFwukwUSzfPsw== X-Spam-Status: No, score=-102.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GOOD_FROM_CORINNA_CYGWIN, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_FAIL, SPF_HELO_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT 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: , From: Corinna Vinschen via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Corinna Vinschen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Hi Takashi, On Jan 16 22:42, Corinna Vinschen via Cygwin wrote: > On Jan 16 16:18, Corinna Vinschen via Cygwin wrote: > > Actually, I' running your testcase on two machines in parallel now for > > quite some time, which only one hunk of 60675f1a7eb2 reverted, i.e. > > > > diff --git a/winsup/cygwin/mm/shared.cc b/winsup/cygwin/mm/shared.cc > > index 893b20d289b4..6d6d2940b6d4 100644 > > --- a/winsup/cygwin/mm/shared.cc > > +++ b/winsup/cygwin/mm/shared.cc > > @@ -140,7 +140,11 @@ open_shared (const WCHAR *name, int n, HANDLE& shared_h, DWORD size, > > if (*m == SH_JUSTCREATE || *m == SH_JUSTOPEN) > > addr = NULL; > > else > > - addr = (void *) region_address[*m]; > > + { > > + addr = (void *) region_address[*m]; > > + VirtualFree (addr, 0, MEM_RELEASE); > > + } > > + > > > > WCHAR map_buf[MAX_PATH]; > > WCHAR *mapname = NULL; > > > > So far (and knocking on wood madly while writing this) the mapping > > problem didn't show up once. Maybe you'd like to try the same? > > Never mind, I encountered another error. After a bit more debugging > I think I understand the problem now, and I'm just in the process of > reworking open_shared. This may take a day or two. Stay tuned. I pushed some patches to fix this issue. Excessive debugging indicated that the reason cygcheck fails in this way is: - It's a non-Cygwin process which - is built with high-entropy ASLR and - tries to load the Cygwin DLL dynamically and - therefore suffers from the fact that recent Cygwin code doesn't expect that certain memory regions are used by Windows itself. Which they are, due to the high-entropy stuff. The patches are supposed to make the code less rigid in terms of the addresses of certain memory regions, as well as dropping the high-entropy VA flag from builds of strace and cygcheck, both of which are loading the Cygwin DLL dynamically as part of their job. The test release 3.5.0-0.116.g8d318bf142f7 contains the patches, for everybody to try. Thanks, Corinna -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple