www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/09/04/19:19:17

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E6728385841F
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
header.from=SystematicSw.ab.ca
Authentication-Results: sourceware.org;
spf=none smtp.mailfrom=systematicsw.ab.ca
X-Authority-Analysis: v=2.4 cv=Bbi7bph2 c=1 sm=1 tr=0 ts=6133fee2
a=T+ovY1NZ+FAi/xYICV7Bgg==:117 a=T+ovY1NZ+FAi/xYICV7Bgg==:17
a=IkcTkHD0fZMA:10 a=iMpC6L0jGsNNbTZxuiUA:9 a=QEXdDO2ut3YA:10
Subject: Re: mmap failure [was: cygrunsrv + sshd + rsync = 20 times too slow
-- throttled?]
To: cygwin AT cygwin DOT com
References: <789f056a-f164-d71d-1dc9-230f5a41846d AT cornell DOT edu>
<46906957-5850-4D7E-8D5A-EFF3C4068C0D AT house DOT org>
<f5f70ca3-0ea2-180d-87ef-deae5929f013 AT cornell DOT edu>
<EE8CC346-CB87-459C-9CE6-5CB2EFBA63EA AT house DOT org>
<58bdc0c3-d843-343f-d88e-c8a44ec33a15 AT cornell DOT edu>
<3DB951FB-FC3F-4EE8-B5E0-6137B305B873 AT house DOT org>
<72F25EBC-6801-4C96-8F6C-48F09B25B712 AT house DOT org>
<6105153B-D145-449D-97FE-D6F17BEB2032 AT house DOT org>
<6beb1156-931e-0380-ee60-2ca519f49a2f AT cornell DOT edu>
<FFA666F7-7531-46D4-8A61-ED3D7F3FA210 AT house DOT org>
<YTJ9wwbHqeoGxZMP AT calimero DOT vinschen DOT de>
<c54c8815-44fe-a837-211e-6497a185c2e8 AT cornell DOT edu>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Organization: Systematic Software
Message-ID: <ac0a4c5e-da41-1f71-d347-72ee16d4c015@SystematicSw.ab.ca>
Date: Sat, 4 Sep 2021 17:18:57 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <c54c8815-44fe-a837-211e-6497a185c2e8@cornell.edu>
X-CMAE-Envelope: MS4xfG1P0KK5VzSUldr+Iid09oT5+iBYuiVuJDFSbBbVR12mWVJ+IS3A/Oo6O9EQEs+alWJyJkVUIeh0PYhnCkQTEE7pryoo10JSx9UIpRwusdFHESIehswl
TereaV7aIGZl+1YbLA+6ywDJDFDAxLkVoFvSuAYEDSYWeJ8wdk7QfDk0PCXSpXzSDqGQTpJPq7TYoZwqHt8Avec/HLAEsfgD8YA=
X-Spam-Status: No, score=-1167.1 required=5.0 tests=BAYES_00, BODY_8BITS,
KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A,
RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,
RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE,
TXREP autolearn=no 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
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Reply-To: cygwin AT cygwin DOT com
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 184NJHVU015047

On 2021-09-04 16:37, Ken Brown via Cygwin wrote:
> I've reduced the procps failure to the following test case:
> 
> $ cat mmap_test.c
> #include <unistd.h>
> #include <stdio.h>
> #include <sys/mman.h>
> 
> int
> main ()
> {
>    void *addr;
>    int page_size = getpagesize ();
> 
>    addr = mmap (0, page_size, PROT_READ | PROT_WRITE,
>                 MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
>    if (addr == MAP_FAILED)
>      perror ("mmap");
> }
> 
> $ gcc mmap_test.c
> 
> $ ./a
> mmap: Invalid argument

Check on Linux and retry on Cygwin without MAP_PRIVATE?
MAP_PRIVATE implies an fd but MAP_ANON does not, and MAP_ANON is in 
Linux(2)/Unix? not POSIX(3p).

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

-- 
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019