delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/02/17/11:34:50

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-id:content-transfer-encoding
:mime-version; q=dns; s=default; b=BiUaawfuI22UynscV3TZ0KQuyNk02
6BrPhmome9WWXnVhIqqL/m+JNkIkiOyUDAbYIoY37dR2W8i0n2ssoNNKiGfAo5KS
ZyCx21PIcKcba8g1RxcUw6F6xLjaSCzfaVFQOjUn7z0jt1ueHiJql5808OEwSdKz
s/AqvgSCJe8e1Y=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-id:content-transfer-encoding
:mime-version; s=default; bh=90DvGZDAzG8YuJvXNNVfntJvFpc=; b=ajx
PCb4Jti5xLUEWrZnldKuwcb9QjbC2wWPnhBUUmIm8f3DR0JiqE0U/YP4YpCdW9Kl
GDq6V7qDAu98Ha+dVg27Xpvs2rCZwDDlwJ6qJ7zxrnmqAd78PWxK5wdqWbiRswU2
p+sKhLgm3QVeSUcPFvzPuAADpts0ukEQWwlC/z+Y=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Simply
X-HELO: NAM04-CO1-obe.outbound.protection.outlook.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cornell.edu; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=b1QAlE3u+QtkMwMiJhBPTlnOgYDoUISIiWk3N41kEQE=; b=A+YRnimfhCXPrZb+imUhHKhWvDkCHCNPKv8kOmDn9UMD+Mf7kGCfxAyX+H/mXKa5zCys3ixUnWxNlDVW9FkmQH5zVchNb/p96J6rTFnwX+1U6kvGsYW9LWSA06wQl1yEQ/0rHLB9KjaWFWThG/rwQkRDzZNczL/vyjRtOYif6s0=
From: Ken Brown <kbrown AT cornell DOT edu>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: Re: fixup_mmaps_after_fork failure with cygwin-3.0.0
Date: Sun, 17 Feb 2019 16:34:34 +0000
Message-ID: <d2910b3c-d50e-c00e-90e0-0c54be6702fe@cornell.edu>
References: <1d506605-a0af-12c2-6faf-ac74ab842182 AT cornell DOT edu> <20190217090820 DOT GI4256 AT calimero DOT vinschen DOT de> <20190217091308 DOT GK4256 AT calimero DOT vinschen DOT de> <0587a444-6849-b35f-60b1-700282408f07 AT cornell DOT edu> <20190217150706 DOT GN4256 AT calimero DOT vinschen DOT de>
In-Reply-To: <20190217150706.GN4256@calimero.vinschen.de>
user-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0
received-spf: None (protection.outlook.com: cornell.edu does not designate permitted sender hosts)
authentication-results: spf=none (sender IP is ) smtp.mailfrom=kbrown AT cornell DOT edu;
x-ms-exchange-senderadcheck: 1
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-IsSubscribed: yes
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id x1HGYmQc009513

On 2/17/2019 10:07 AM, Corinna Vinschen wrote:
> On Feb 17 14:56, Ken Brown wrote:
>> On 2/17/2019 4:13 AM, Corinna Vinschen wrote:
>>> On Feb 17 10:08, Corinna Vinschen wrote:
>>>> On Feb 17 00:11, Ken Brown wrote:
>>>>> I'm getting a lot of errors like this when building emacs from its git repo:
>>>>>
>>>> Weird.  I built at least gawk and openssh with 3.0 already and I
>>>> didn't notice this problem.
>>>>
>>>>> A bisection points to the following as the first bad commit:
>>>>> [...]
>>>>> I'll try to do some debugging and/or provide further information
>>>>> tomorrow, but I thought I'd start with this preliminary report.
>>>>
>>>> That would be nice.  It's not clear to me which permission is missing.
>>>> The first part of the patch has been reverted in 3.0.0, so
>>>> child_info_spawn::get_parent_handle opens the parent with
>>>> PROCESS_VM_READ again.  The second patch has been reworked as well,m
>>>> the current perms are
>>>>
>>>> PROCESS_QUERY_LIMITED_INFORMATION | PROCESS_VM_READ | SYNCHRONIZE
>>>>
>>>> If I may place a bet, please try to replace
>>>> PROCESS_QUERY_LIMITED_INFORMATION with PROCESS_QUERY_INFORMATION
>>
>> That didn't change anything.  Just to make sure I understood correctly, here's
>> what I tried:
>>
>> --- a/winsup/cygwin/sigproc.cc
>> +++ b/winsup/cygwin/sigproc.cc
>> @@ -814,7 +814,7 @@ child_info::child_info (unsigned in_cb, child_info_types chtype,
>>         allow the child to copy cygheap etc. from the parent to itself.  If
>>         we're forking, we also need handle duplicate access. */
>>      parent = NULL;
>> -  DWORD perms = PROCESS_QUERY_LIMITED_INFORMATION | PROCESS_VM_READ
>> +  DWORD perms = PROCESS_QUERY_INFORMATION | PROCESS_VM_READ
>>                   | SYNCHRONIZE;
>>      if (type == _CH_FORK)
>>        {
>>
>>> On second thought, an even better candidate may be PROCESS_VM_OPERATION.
>>
>> That's even worse.  With that change, simply invoking 'make' leads to
>> the same error.
> 
> PROCESS_VM_OPERATION has to be specified additionally, not replacing
> PROCESS_QUERY_{LIMITED_}INFORMATION.  Sorry if that wasn't clear.

Success: Simply adding PROCESS_VM_OPERATION to the existing permissions fixes 
the problem.

Thanks.

Ken

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


- Raw text -


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