X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 02C1B385AC2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1630951750; bh=wIaaNy29BtzfddeJ/SR2nL5pp8Qm4TEtn005S0WcTvM=; 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=MdFTU9PVhYHivSZH+QuI9x+MwpzSmAilZFG201rybC4Nydtvdz2KuW1wXn564wThU nWXipPZ2IHJmlkfUDHeaF35kq9XS1jE0XSP1kZA3fVb6KBbY3TyRpSfauaQANum2CJ kODG1W+Uk+/ZhIPziFVRBaF4k7Xe62CGq9q5uUKA= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 283273857022 Date: Mon, 6 Sep 2021 20:07:58 +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: 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 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 186I9ACG017521 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 -- 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