X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6F97F385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1673882321; bh=nSdzu56Kf4RUAFuHer2NtjijyRlJq9n387g4LV2mdYs=; 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=txvoVwBXZsa1eC6BGDrQJi5NWrqctmk1FGka0NtNoSYrSWzb5oBGr/Q2T4FtMX8CD 0vUP+LJZZx/VoxSmlvL0ce/9rl46Uezw8S04ufQHBwJfx2pTym4HpoKxjS8DZ3qmkF gD6uP21ngXLpe+wBNm3rg5m6N6hBr5x/pFoCw12o= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com Date: Mon, 16 Jan 2023 16:18:22 +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: <20230116234532.f567e64fe7bf9a0a13704af9@nifty.ne.jp> X-Provags-ID: V03:K1:EemwGKPeF9/j1vYy7AVWrWQhvN1Vx1WDhnDWfLIn96maDQuFsQu H0lsqb+3DS/0uHCsuOe7esIdDmqVN6dOnDFH9PdVQXpiIVNpH6HQskgWIdBiwV/L7axAt2+ 98BIzADtbp9J56X+/ooGJclxun5csQATZbgWWno7qNXL5r7x9JPht2piaqzojaCQiUzXM0L b5QB0PmvFr2851QeCALGA== UI-OutboundReport: notjunk:1;M01:P0:Co2NxMDUneY=;GLK/zreSyhertlGDzLjV8V89pY4 3Iybe+qnncKcjutxi/7AMFC3CjrGFncx6sI547l+EzMqai/1Zwt2XBSDihSAt0jox2TJGCviE av0qXbM03sDJhFZAhoz2jO+Aw2OIvoV7hBkSOLcCBkq1Mu5wxQ0BuK1SDcqrLx3GInbx2l/Wk Xj0TJIEsVi3U0suzYQjueO1h5HRJBb3ZibAl/6T1lX3oSKfvVO0jv1Vy6Xwi9G/meG1Z6mh/+ LajnzKTOYHtpR/uc4oGmCt75Ye5kkZSK1i1HH79vbwudV3xddIU2pPO4V/xSdTDPaGZFgH7gc KQ1EvNco09GHlMSghVne0oMLu+ALyMggD9OMMOIXhNlSQgRVDjfd+vcD5EPu4jujy9TUhgjbK sSHHnLdiTaxt4TXaNIa2SWBt7yjXgGU+IuzjE5rCyqe7mxspcDJhJa3Ota6KwSdDwoQl5Xr9s O/pjmMWorAgwUN/4AvjTv5oqdW5Umuq/AUAhaA2mCcka0546Gpi36h7/nlHBY2ES/otxYWOds IN2a3IiohAdw4rd7qbW1qgZPwGNkVi2ZDZC6e77fkxno6O+QWCYRo26YjKDR22f3YoZ8yy2JQ fajessK/iCsHaJxSMJnuFy+fUtU5/lWHalbbgy2lPnD/KIYrxW55K8K7z0sJH5B/V4HxZ3pqh AAlnxO0BoaP1ivc5VMMJ/2aLRXEGwrojzb3NzP2akQ== 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 23:45, Takashi Yano via Cygwin wrote: > On Mon, 16 Jan 2023 11:23:54 +0100 > Corinna Vinschen wrote: > > On Jan 16 18:02, Takashi Yano via Cygwin wrote: > > [...] > > > Errors seem to be three types: (null), cygpid.xxx and shared.5. > > > I'm not sure what is happening and why at all, however, this > > > did not seem to happen before the commit 30add3e6b3e3. > > > > I'll try to reproduce this issue. But the weird thing is certainly > > this: The affected shared mem regions are apparently not the cygheap. > > Rather, they are the "shared" and "cygpid" shared mem regions, which > > should not at all collide with the cygheap. I guess we need more > > debug output in the api_fatal call inside open_shared... > > I am now trying the test case with reverting the commit 60675f1a7eb2 > "Cygwin: decouple shared mem regions from Cygwin DLL", and the issue > does not happen for several hours so far. I guess this most likely > is the direct cause of the problem. 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? Btw., I pinged you on IRC already 3 hours ago... 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