From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by sourceware.org (Postfix) with ESMTPS id 283273857022 for ; Mon, 6 Sep 2021 18:08:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 283273857022 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MumVX-1nDtmu0X11-00rnJV for ; Mon, 06 Sep 2021 20:07:59 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 61C05A80DAA; Mon, 6 Sep 2021 20:07:58 +0200 (CEST) Date: Mon, 6 Sep 2021 20:07:58 +0200 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: mmap failure [was: cygrunsrv + sshd + rsync = 20 times too slow -- throttled?] Message-ID: Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <88fde5d5-4897-8792-576a-a62be0092ad8@cornell.edu> <94b5b6cf-1670-cbdd-2f51-84dae09d27b6@cornell.edu> <387d9062-1ff9-6eab-e268-e5070352a193@cornell.edu> <40275f71-7c10-55a9-e6c8-a948e32c37ac@cornell.edu> <33ae27cb-4e45-7484-40d1-6cbd88c958f1@cornell.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Provags-ID: V03:K1:KzHzvWqmho+1SLRBJwBZTzWPlRiXjWY3lrF2SksFyn/I9QWtRm4 49xkaJ9goRclHU4MlajwIYxkYx6HObG0rMA6kd4Gp4drt6ubo2CxY+Oxn36cDwoKwqV0MVy 4wyhHsjFRwhHvC9sFj30a0PIL7c7wAGj01bnFcZSv5V07j7hapcZT1XVsTCbsnVH6JEImiR BBFT0+e2P3tTx75qQ3yXQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:eHEXxoTRSkE=:ia+I6ox+FIU8pHcfNd+fNK JbqKcUTLkZpFwOoEaVpeUpIzhCZuPXCW7XjbPltTJwhfnyOpDv/utaGphcF/zgG0Zxy52jW/s om6EOM7PAByH0L6NuonuZtl+qn3mUy9xgqhfWBKMbMgVB3wfvcgc1YxEbbWwIDTsAkGuCPyQ9 kaUVOj8hzYvpXWzuYVXrodZgf94AzXfhp+cwdNY2aNUE4QJNe0FO1PsdIJZSJoUYp8mNgDlxx 5E8/TZiIUuk1Xur70XNxw8iy5l9IoasorW1z8wPLh7qpXY59X/pRtQlaRFxhoTm81EHrsLSqq OnKVA5PDOEGtuNxNQnrz6XueUEybri0VWLw4VHsHgf+So9oYDaArvODYEcZRqG0JFsGuORwKE Sc0w2tOl3m4XQ2LiREI2zzVSxvwz8NEGhvYoy+iHwhql9nLlyddZf4Xn7YaqVwd0WiB9SQ4zm JJywKV2aiuxK3YgQ97SJ44lpoHE30IBbdi7pcH4d/JTIRb0tLx1WekQqMVIofXix3d8niUYWR gHq5MY/2MngPTXLishVdL8BTgDttzu/sk9Y3gI1Hqh/4jxwdOI+qdCmJGVxcu7EVD7vAG/Iz+ BlVfWA0vr2MB14K8YAXGCNRJ4jkDsJ4Secjg/LHpdYZYWWgcTtnLJmxJCo6xE7oCmxbRCr0rN jezphDIBVuUlAY3mmxTiq4MabUfVhO8jIr7GLHdTYnBKsQN4AQMXOwWhkZS88YqAqBXfU8J1v ePqDPz2kPanHnmqvMWva6FVa27r1HEjdamHnk01HrK3XOIu/fxKYbpFL49I= X-Spam-Status: No, score=-99.7 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP 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: Mon, 06 Sep 2021 18:08:02 -0000 On Sep 6 19:59, Corinna Vinschen via Cygwin wrote: > On Sep 6 13:38, Ken Brown via Cygwin wrote: > > On 9/6/2021 1:12 PM, Ken Brown via Cygwin wrote: > > > On 9/6/2021 11:32 AM, Corinna Vinschen via Cygwin wrote: > > > > On Sep  5 09:24, Ken Brown via Cygwin wrote: > > > > > On 9/4/2021 8:04 PM, Ken Brown via Cygwin wrote: > > > > > > On 9/4/2021 6:58 PM, Ken Brown via Cygwin wrote: > > > > > > > Here are the correct commits: > > > > > > > > > > > > > > 8169e39ab Cygwin: C++17: register keyword is deprecated > > > > > > > 3ca80b360 Cygwin: dumper: fix up GCC pragma for g++ 11.2 > > > > > > > bdb7991db Cygwin: workaround a g++ 11.2 initialization bug > > > > > > > 801120c1f Cygwin: loader script: add DWARF 5 sections > > > > > > > d5cc66426 Cygwin: testsuite: avoid "conflicting types" gcc warning > > > > > > > c2fe205b5 strstr: avoid warnings > > > > > > > 76c2c7a89 ldexp/ldexpf: avoid assembler warning > > > > > > > eeeb5650c Cygwin: fix declaration of RtlInitEmptyUnicodeString > > > > > > > > > > > > > > > > > > > > > > > > So there appears to be something wrong with cygwin1.dll > > > > > > > > > built with the current build tools (gcc 11.2.0, binutils > > > > > > > > > 2.37, not sure what else is relevant). > > > > > > > > > > > > Wait a minute...I'll bet this is related to the MEM_EXTENDED_PARAMETER > > > > > > initialization problem that was dealt with in commit bdb7991db. > > > > > > > > > > More data: When I run the test case under gdb, it succeeds.  When I run it > > > > > under strace, I see VirtualAlloc2 in fhandler_dev_zero::mmap failing with > > > > > windows error 87. > > > > > > > > Are the const's I added to the MEM_EXTENDED_PARAMETER data invalid, > > > > perhaps? > > > > > > I tried removing them, and I got the same error.  I also tried removing > > > static, and I tried removing both static and const. > > > > BTW, when I reported that the test case succeeds under gdb, that only > > happens when I build the test case without optimization. If I build with > > -O2, it fails under gdb also. [In all my tests, I built cygwin1.dll without > > optimization.] This makes no sense to me at all. > > Good hint. I found the culprit. With optimization, the code doesn't > set the "Reserved" bits in the first struct of MEM_EXTENDED_PARAMETER > to 0. No, wait. I get what you say. The optimzation settings of the test case should have no influence on the code inside the DLL. That doesn't make sense for sure. However, I ran the testcase under GDB, I could reproduce the issue, and I could fix it by setting mmap_ext.Reserved = 0; Go figure! Corinna