X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 022D9383941E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1630951269; bh=i4iEVuhT68O+Rg2buzHx+ITkzHwQQxIvIxybubW/CR0=; 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=GKHdx+oX1Vs6JMbyW7qmNtH4PPsfooVLxdLuR/jrcvxw8a07j1upBgNIPyZHoxprz 8oI9EwWFeJFtTOQ/UV50vjEFZHhMPlluvpcMlqRyWd6t/SuVIs8Krgg5qrUgnxs7qT not4D57fcPeGEuRFP1IHieL+hiAzGij4hNBPUVM0= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 765AA3857022 Date: Mon, 6 Sep 2021 19:59:54 +0200 To: cygwin AT cygwin DOT com Subject: Re: mmap failure [was: cygrunsrv + sshd + rsync = 20 times too slow -- throttled?] Message-ID: Mail-Followup-To: cygwin AT cygwin DOT com References: <88fde5d5-4897-8792-576a-a62be0092ad8 AT cornell DOT edu> <94b5b6cf-1670-cbdd-2f51-84dae09d27b6 AT cornell DOT edu> <387d9062-1ff9-6eab-e268-e5070352a193 AT cornell DOT edu> <40275f71-7c10-55a9-e6c8-a948e32c37ac AT cornell DOT edu> <33ae27cb-4e45-7484-40d1-6cbd88c958f1 AT cornell DOT edu> MIME-Version: 1.0 Content-Disposition: inline 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 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="utf-8" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 186I1AL5016128 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 -- 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