From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.75]) by sourceware.org (Postfix) with ESMTPS id 4B5433858296 for ; Mon, 16 Jan 2023 10:23:56 +0000 (GMT) Authentication-Results: sourceware.org; dmarc=permerror header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=cygwin.com Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N49d1-1oZGLS04O1-0108vC for ; Mon, 16 Jan 2023 11:23:55 +0100 Received: by calimero.vinschen.de (Postfix, from userid 500) id 97E4CA8088F; Mon, 16 Jan 2023 11:23:54 +0100 (CET) Date: Mon, 16 Jan 2023 11:23:54 +0100 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Cygwin 3.4.3 and 3.5.0... hangs in make, top, procps, ls /proc/PID/... Message-ID: Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <4a4427cc-422b-1d14-015e-26523e620d9b@Shaw.ca> <20230102113201.476c10bef7a5643bddc00762@nifty.ne.jp> <20230102143803.53f89d07a545a1bdd596e1e8@nifty.ne.jp> <20230102172147.83789d400bb0400cb8c8ca74@nifty.ne.jp> <20230116180213.0e03a896f512d784933f54da@nifty.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230116180213.0e03a896f512d784933f54da@nifty.ne.jp> X-Provags-ID: V03:K1:h9Z0FLQQQllr0rpIPiIHAVA8E53ExyCgGaFRlG7KrZxF4YzzYud OP7meWdQuk9ExF3/CPtjUh3ObTCyI6hLI2WV1o5pl9V2fMyUHXfYAht2H+26hfh7/rXA4Dl rE0Qw5qVIi3Rk5ZsHE78xwYPjbBfP5V+uq4CwD+uCXPIDNu3uihHMXjqfRuPH6+0NuWkpI0 BwfOrsDDVS+Od9R6H3h6A== UI-OutboundReport: notjunk:1;M01:P0:z9MEz1fM1o8=;7JxCax9b+6Fdlvu2ZBC3y3jKPT+ YUhQVyhmSC26/1dIvrM2ZotZEmGhoQ9VvZOJ2jgDy9w5C4lazFM7x3AGXrJsOkh89JQ7w+hye W7eAGzmZ9/R77YZ5ABhKl4YhhhhyvbXXtP9Ea7fiqCFP2k4/VCY1WWAsIxqovjAojBH6FbdjZ 7mnNoPTVEPsLfJKDu1KJNSsRaW7SfaWwkoFi2DuumHYSOKKcFNEUKjmOF7aENjkSXCPsmch8V UdK4TeQAnpH7L44PQPQ3cckDy18nRClFv8YxArpMYj0H/EkeByAjZroWsxIdICe03YlpXqtWz ckb006SJvc9VX50JghZMo8QIs9eDuhk3eIGlEMu7sGVIUr8SYbRWYSX7tkY993D/sl4pc9/+B cA1v0ivQja0FK/wOxkEHkMrhEc5kHda3Z4JIiWonFvhdi2xphWRmTnge8lhu2j6IdvkjEs+CK 03gr6HgGJyA6m7urbzfLxHO4okzkX5f+KsfmiDoG41Vczeyw0Wai4zskI2MVQjqsJYRDEVZK9 w7hPeF9H62d6pSsuW5eOgCQGJ2MYlFLIEBiiFFziQBhrEiKA7cYRIWuLlC7E7/Q0mkcrkm/wl guNvtkxM3KUMFHYuVpfgCRZPqWRSQa+Ja5+/irajDgZDQbx51mfl1rgqWpcVtQLNQI35z7gkn VJg3CNJy/P7eSqFJhdKz6a3CVwpWSvYDEZ6x/DojTQ== X-Spam-Status: No, score=-96.8 required=5.0 tests=BAYES_00,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 List-Id: On Jan 16 18:02, Takashi Yano via Cygwin wrote: > Hi Corinna, > > On Mon, 9 Jan 2023 14:20:56 +0100 > Corinna Vinschen wrote: > > On Jan 2 17:21, Takashi Yano via Cygwin wrote: > > > On Mon, 2 Jan 2023 14:38:03 +0900 > > > Takashi Yano wrote: > > > > On Mon, 2 Jan 2023 11:32:01 +0900 > > > > Takashi Yano wrote: > > > > > On Sat, 31 Dec 2022 13:01:29 -0700 > > > > > Brian Inglis wrote: > > > > > > was also getting the messages below locally and still on GitHub scallywag: > > > > > > > > > > > > cygcheck (6936) child_copy: cygheap read copy failed, > > > > > > > > > > > > ../curl/scallywag/1_x86_64 build.log:2022-12-26T00:39:35.6163236Z 0 > > > > > > [main] cygcheck (6936) child_copy: cygheap read copy failed, 0x0..0x80003B5F0, > > > > > > done 0, windows pid 6936, Win32 error 299 > > > > > > [...] > > > > I found this issue occurs after the commit 30add3e6b3e3: > > > > "Cygwin: exec: don't access cygheap before it's initialized" > > > > . > > > > > > > > Reverting this commit solves the issue. > > > > That would break strace again, but... > > > > > I'm not sure if this is the right thing, but the following > > > patch seems to fix the issue. > > > > This looks pretty good to me and it keeps strace working per the > > description in 30add3e6b3e3. Please push this to master and the > > 3.4 branch. > > I noticed that the following error occurs even with this patch. > If you run: > while true; do cygcheck -cd cygwin > /dev/null; done > for one day or so, you will find the issue can be reproduced. > > Both cygwin-3_4-branch and main (master) branch have this issue, > while cygwin 3.3.6 does not. > > $ while true; do cygcheck -cd cygwin > /dev/null; done > 0 [main] cygcheck (15244) C:\cygwin64\bin\cygcheck.exe: *** fatal error - > MapViewOfFileEx 'shared.5'(0x138), Win32 error 487. Terminating. > 3540 [main] cygcheck (15244) cygwin_exception::open_stackdumpfile: Dumping st > ack trace to cygcheck.exe.stackdump > 0 [main] cygcheck (10844) C:\cygwin64\bin\cygcheck.exe: *** fatal error - > MapViewOfFileEx 'cygpid.51742'(0x148), Win32 error 487. Terminating. > 0 [main] cygcheck (1976) C:\cygwin64\bin\cygcheck.exe: *** fatal error - M [...] > 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... Corinna