From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) by sourceware.org (Postfix) with ESMTPS id 765AA3857022 for ; Mon, 6 Sep 2021 17:59:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 765AA3857022 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MbS0X-1mz7dC0lNx-00brK1 for ; Mon, 06 Sep 2021 19:59:55 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 85F39A80DAA; Mon, 6 Sep 2021 19:59:54 +0200 (CEST) Date: Mon, 6 Sep 2021 19:59:54 +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: <33ae27cb-4e45-7484-40d1-6cbd88c958f1@cornell.edu> X-Provags-ID: V03:K1:KtksOCoDaPT3Jm8vBLQyJhuMkox7SkVa3kn7WzhiSgl24QuVXw1 WyD1aQ1kDOgL+ZRBjsHb5xJ+aKj6DT1rUO+XWWnXHVWYeQJ1V2FtiQcNqro4Xdn4vxp36DM MLhyiP0BB5ZF7mMD8I36ljeJOBzWega9+TXHLhq8ltL1ivE7SAP653L6M7txR3KFJtzqsvW kXlvschcTnHYgLA5kmOQQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:B/LoC16kqN4=:Lbwb+mVPIj+2leOzNqO9F+ 2znx20MuDaMck1IViYRpmQfMj8gN+k2yGnDsxT5gNmziquv05UcSCT1pi3rvGP4i8znXC6XQ8 uGRHNWUvIuy0iMMT3/kQBI4BXS4LybCTGdU6UeLPtB3lmnyyMfR3ZuietqsSt9dAA52EG7LXr V9z9IkpsOH33cRaboiSDtzZnY+PFcJJ3eiuTEqOqUUnoJOay7IBUiE1hHCPuIxdnS42YHBoZ5 B2s1TNGdHRqr0bIIod30A3is87OfsbzU79einQbRhb8jLbbTpi1igVILz/crGznMC5OLSePrc 1xLOfWRGxyl913SnaWP3f5MnPMBYbDZEQQCsdFFUoiYG5mDmHeGeJ7zbrW+mWcNuQeCDGi4Xi OitbG4wlfGY9Y/LUun/2zSBc+2Q3rmOF25+MMXXYZrzA84qkh1+MTd16pErLQ/2LZIqBJ5hE9 457+lGVfSQeaGyu2qE1yYxnrQoAk/zffha6TmPXfYyt9BqGl/MFji/zS+8prhve1gBhETXVQy t67kG9tuywUzoYLCAVandXRwdBUkXgDihg5MCA9J7BmJs77FKw01V+txf0lIGQCmh9VtM3Q8H Rhab4tZL/lfI/I5/rRODp/dLyFbMqSATcET3CUD0j0BpkxPw7+1vCCMtGhCeAASaDN+MI92co xlAmeZmclyq8mTzQKrUzsI0zCpwsIRLQSG42Yprgc5tgzkFLgcBypeWNHOShmB7hGfP5UyEZl yq0GEd1Pr3ASzY+xf668ZPVgQOjSmJThy4jb/4mcuXNL3y1RnHgs3P68p9w= X-Spam-Status: No, score=-100.0 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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 17:59:58 -0000 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. This is at least required by the VirtualAlloc2 function, though. Needless to say that this behaviour isn't documented... I'll push a patch shortly. Thanks, Corinna