public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* fixup_mmaps_after_fork failure with cygwin-3.0.0
@ 2019-02-17  9:08 Ken Brown
  2019-02-17  9:13 ` Corinna Vinschen
  0 siblings, 1 reply; 10+ messages in thread
From: Ken Brown @ 2019-02-17  9:08 UTC (permalink / raw)
  To: cygwin

I'm getting a lot of errors like this when building emacs from its git repo:

EMACSLOADPATH= '../src/emacs.exe' -batch --no-site-file --no-site-lisp --eval 
'(setq load-prefer-newer t)'  -f batch-byte-compile ../../master/lisp/finder.el
       1 [main] emacs 26848 fixup_mmaps_after_fork: VirtualProtectEx failed for 
MAP_PRIVATE address 0x6FFFFCD0000, Win32 error 5
     190 [main] emacs 26848 C:\Users\kbrown\src\emacs\x86_64\src\emacs.exe: *** 
fatal error in forked process - recreate_mmaps_after_fork_failed
     619 [main] emacs 26848 cygwin_exception::open_stackdumpfile: Dumping stack 
trace to emacs.exe.stackdump
       1 [main] emacs 27052 fork: child -1 - forked process 26848 died 
unexpectedly, retry 0, exit code 0x100, errno 11


A bisection points to the following as the first bad commit:

commit 69cc7a068656b5c6ef07ca079a213f801e02e650
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Sun Jan 27 13:15:15 2019 +0100

     Cygwin: fork: restrict parent handle perms and drop handle after use


I'll try to do some debugging and/or provide further information tomorrow, but I 
thought I'd start with this preliminary report.

Ken

P.S. I meant to try this during the testing phase prior to the release of 3.0.0, 
but I didn't get to it until today.  Sorry.

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: fixup_mmaps_after_fork failure with cygwin-3.0.0
  2019-02-17  9:08 fixup_mmaps_after_fork failure with cygwin-3.0.0 Ken Brown
@ 2019-02-17  9:13 ` Corinna Vinschen
  2019-02-17  9:32   ` Corinna Vinschen
  0 siblings, 1 reply; 10+ messages in thread
From: Corinna Vinschen @ 2019-02-17  9:13 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1901 bytes --]

On Feb 17 00:11, Ken Brown wrote:
> I'm getting a lot of errors like this when building emacs from its git repo:
> 
> EMACSLOADPATH= '../src/emacs.exe' -batch --no-site-file --no-site-lisp --eval 
> '(setq load-prefer-newer t)'  -f batch-byte-compile ../../master/lisp/finder.el
>        1 [main] emacs 26848 fixup_mmaps_after_fork: VirtualProtectEx failed for 
> MAP_PRIVATE address 0x6FFFFCD0000, Win32 error 5
>      190 [main] emacs 26848 C:\Users\kbrown\src\emacs\x86_64\src\emacs.exe: *** 
> fatal error in forked process - recreate_mmaps_after_fork_failed
>      619 [main] emacs 26848 cygwin_exception::open_stackdumpfile: Dumping stack 
> trace to emacs.exe.stackdump
>        1 [main] emacs 27052 fork: child -1 - forked process 26848 died 
> unexpectedly, retry 0, exit code 0x100, errno 11

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:
> 
> commit 69cc7a068656b5c6ef07ca079a213f801e02e650
> Author: Corinna Vinschen <corinna@vinschen.de>
> Date:   Sun Jan 27 13:15:15 2019 +0100
> 
>      Cygwin: fork: restrict parent handle perms and drop handle after use
> 
> 
> 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

What OS is that?  W7?


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: fixup_mmaps_after_fork failure with cygwin-3.0.0
  2019-02-17  9:13 ` Corinna Vinschen
@ 2019-02-17  9:32   ` Corinna Vinschen
  2019-02-17 15:07     ` Ken Brown
  0 siblings, 1 reply; 10+ messages in thread
From: Corinna Vinschen @ 2019-02-17  9:32 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 2099 bytes --]

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:
> > 
> > EMACSLOADPATH= '../src/emacs.exe' -batch --no-site-file --no-site-lisp --eval 
> > '(setq load-prefer-newer t)'  -f batch-byte-compile ../../master/lisp/finder.el
> >        1 [main] emacs 26848 fixup_mmaps_after_fork: VirtualProtectEx failed for 
> > MAP_PRIVATE address 0x6FFFFCD0000, Win32 error 5
> >      190 [main] emacs 26848 C:\Users\kbrown\src\emacs\x86_64\src\emacs.exe: *** 
> > fatal error in forked process - recreate_mmaps_after_fork_failed
> >      619 [main] emacs 26848 cygwin_exception::open_stackdumpfile: Dumping stack 
> > trace to emacs.exe.stackdump
> >        1 [main] emacs 27052 fork: child -1 - forked process 26848 died 
> > unexpectedly, retry 0, exit code 0x100, errno 11
> 
> 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:
> > 
> > commit 69cc7a068656b5c6ef07ca079a213f801e02e650
> > Author: Corinna Vinschen <corinna@vinschen.de>
> > Date:   Sun Jan 27 13:15:15 2019 +0100
> > 
> >      Cygwin: fork: restrict parent handle perms and drop handle after use
> > 
> > 
> > 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

On second thought, an even better candidate may be PROCESS_VM_OPERATION.

> What OS is that?  W7?


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: fixup_mmaps_after_fork failure with cygwin-3.0.0
  2019-02-17  9:32   ` Corinna Vinschen
@ 2019-02-17 15:07     ` Ken Brown
  2019-02-17 15:08       ` Corinna Vinschen
  0 siblings, 1 reply; 10+ messages in thread
From: Ken Brown @ 2019-02-17 15:07 UTC (permalink / raw)
  To: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 3284 bytes --]

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:
>>>
>>> EMACSLOADPATH= '../src/emacs.exe' -batch --no-site-file --no-site-lisp --eval
>>> '(setq load-prefer-newer t)'  -f batch-byte-compile ../../master/lisp/finder.el
>>>         1 [main] emacs 26848 fixup_mmaps_after_fork: VirtualProtectEx failed for
>>> MAP_PRIVATE address 0x6FFFFCD0000, Win32 error 5
>>>       190 [main] emacs 26848 C:\Users\kbrown\src\emacs\x86_64\src\emacs.exe: ***
>>> fatal error in forked process - recreate_mmaps_after_fork_failed
>>>       619 [main] emacs 26848 cygwin_exception::open_stackdumpfile: Dumping stack
>>> trace to emacs.exe.stackdump
>>>         1 [main] emacs 27052 fork: child -1 - forked process 26848 died
>>> unexpectedly, retry 0, exit code 0x100, errno 11
>>
>> 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:
>>>
>>> commit 69cc7a068656b5c6ef07ca079a213f801e02e650
>>> Author: Corinna Vinschen <corinna@vinschen.de>
>>> Date:   Sun Jan 27 13:15:15 2019 +0100
>>>
>>>       Cygwin: fork: restrict parent handle perms and drop handle after use
>>>
>>>
>>> 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.

>> What OS is that?  W7?

W10 1803 with WSL installed.

I'll keep looking at this, but let me know if you have further ideas.  It would 
be nice if I could come up with a simple test case, but at the moment all I have 
is, "clone the emacs git repo and try to build".

Ken
\x03B‹KCB”\x1c›Ø›\x19[H\x1c™\^[ܝ\x1cΈ\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÜ\x1c›Ø›\x19[\Ëš\x1d^[[\x03B‘TNˆ\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÙ˜\KÃB‘^[ØÝ[Y[\x18]\x1a[ÛŽˆ\b\b\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÙ^[ØÜËš\x1d^[[\x03B•[œÝXœØÜšX™H\x1a[™›Îˆ\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÛ[\vÈÝ[œÝXœØÜšX™K\Ú[\^[\x19CBƒB

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: fixup_mmaps_after_fork failure with cygwin-3.0.0
  2019-02-17 15:07     ` Ken Brown
@ 2019-02-17 15:08       ` Corinna Vinschen
  2019-02-17 16:40         ` Ken Brown
  0 siblings, 1 reply; 10+ messages in thread
From: Corinna Vinschen @ 2019-02-17 15:08 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 2325 bytes --]

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.

Another idea is to specify all process-specific permissions from
https://docs.microsoft.com/en-us/windows/desktop/ProcThread/process-security-and-access-rights
and then eliminate backwards.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: fixup_mmaps_after_fork failure with cygwin-3.0.0
  2019-02-17 15:08       ` Corinna Vinschen
@ 2019-02-17 16:40         ` Ken Brown
  2019-02-17 16:42           ` Corinna Vinschen
  0 siblings, 1 reply; 10+ messages in thread
From: Ken Brown @ 2019-02-17 16:40 UTC (permalink / raw)
  To: cygwin

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: fixup_mmaps_after_fork failure with cygwin-3.0.0
  2019-02-17 16:40         ` Ken Brown
@ 2019-02-17 16:42           ` Corinna Vinschen
  2019-02-18 10:11             ` Corinna Vinschen
  0 siblings, 1 reply; 10+ messages in thread
From: Corinna Vinschen @ 2019-02-17 16:42 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1560 bytes --]

On Feb 17 16:34, Ken Brown wrote:
> 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:
> >>>> 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 for tracking this down, I upload a fixed 3.0.1 pretty soon.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: fixup_mmaps_after_fork failure with cygwin-3.0.0
  2019-02-17 16:42           ` Corinna Vinschen
@ 2019-02-18 10:11             ` Corinna Vinschen
  2019-02-18 14:32               ` Ken Brown
  0 siblings, 1 reply; 10+ messages in thread
From: Corinna Vinschen @ 2019-02-18 10:11 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1914 bytes --]

On Feb 17 17:39, Corinna Vinschen wrote:
> On Feb 17 16:34, Ken Brown wrote:
> > 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:
> > >>>> 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 for tracking this down, I upload a fixed 3.0.1 pretty soon.

Please try the today's developer snapshot from
https://cygwin.com/snapshots/

Please note that cygcheck and mount utils need to be taken from the
snapshot as well to mke sure they work correctly in terms of binary/text
mounts.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: fixup_mmaps_after_fork failure with cygwin-3.0.0
  2019-02-18 10:11             ` Corinna Vinschen
@ 2019-02-18 14:32               ` Ken Brown
  2019-02-18 14:32                 ` Corinna Vinschen
  0 siblings, 1 reply; 10+ messages in thread
From: Ken Brown @ 2019-02-18 14:32 UTC (permalink / raw)
  To: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2048 bytes --]

On 2/18/2019 5:10 AM, Corinna Vinschen wrote:
> On Feb 17 17:39, Corinna Vinschen wrote:
>> On Feb 17 16:34, Ken Brown wrote:
>>> 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:
>>>>>>> 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 for tracking this down, I upload a fixed 3.0.1 pretty soon.
> 
> Please try the today's developer snapshot from
> https://cygwin.com/snapshots/

Works fine so far.  I've rebuilt emacs on both 64-bit and 32-bit with no problems.

Ken
\x03B‹KCB”\x1c›Ø›\x19[H\x1c™\^[ܝ\x1cΈ\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÜ\x1c›Ø›\x19[\Ëš\x1d^[[\x03B‘TNˆ\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÙ˜\KÃB‘^[ØÝ[Y[\x18]\x1a[ÛŽˆ\b\b\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÙ^[ØÜËš\x1d^[[\x03B•[œÝXœØÜšX™H\x1a[™›Îˆ\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÛ[\vÈÝ[œÝXœØÜšX™K\Ú[\^[\x19CBƒB

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: fixup_mmaps_after_fork failure with cygwin-3.0.0
  2019-02-18 14:32               ` Ken Brown
@ 2019-02-18 14:32                 ` Corinna Vinschen
  0 siblings, 0 replies; 10+ messages in thread
From: Corinna Vinschen @ 2019-02-18 14:32 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 681 bytes --]

On Feb 18 14:28, Ken Brown wrote:
> On 2/18/2019 5:10 AM, Corinna Vinschen wrote:
> >>>> 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 for tracking this down, I upload a fixed 3.0.1 pretty soon.
> > 
> > Please try the today's developer snapshot from
> > https://cygwin.com/snapshots/
> 
> Works fine so far.  I've rebuilt emacs on both 64-bit and 32-bit with no problems.

👍

Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-02-18 14:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-17  9:08 fixup_mmaps_after_fork failure with cygwin-3.0.0 Ken Brown
2019-02-17  9:13 ` Corinna Vinschen
2019-02-17  9:32   ` Corinna Vinschen
2019-02-17 15:07     ` Ken Brown
2019-02-17 15:08       ` Corinna Vinschen
2019-02-17 16:40         ` Ken Brown
2019-02-17 16:42           ` Corinna Vinschen
2019-02-18 10:11             ` Corinna Vinschen
2019-02-18 14:32               ` Ken Brown
2019-02-18 14:32                 ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).