delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/02/05/06:32:23

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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type; q=dns; s=default; b=hMp+
RvBFgpCMvHB8BDYjtU5kXjCLn0wnTNqTiLBAZ0TAtPf7sihZEZmlPpZA+jwO6Kc3
EMpJLQyeVg5MyM3VJuHO0d7YoLswBu3lGpttiXGTgwYxETCMrUPNo3AdNBq2qBoZ
T5vfzBmW018VmvBfGvCKeiOLYfQVJ+kx7Rbxn8w=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type; s=default; bh=F2Vi8oHBsN
PJ7U4ot7zy7/7As/M=; b=Gv3AHgbFKD3CXW75WCaPZysYbPVtMoL+vTHbVj+bGi
MkEEZolDdv2Z1Ys1BXosreWpsFInQfH6TFTIJponPpHQ1FmrhyROp+aUoZN1j6no
kpHFfLWNXyCJE3avcBODGUsK8crddF6lFypUuLRYWXJw7FCb7OCWmySeTC0J8K2r
s=
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=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS,TIME_LIMIT_EXCEEDED autolearn=unavailable version=3.3.2 spammy=haubi, course!
X-HELO: atfriesa01.ssi-schaefer.com
Subject: Re: [ANNOUNCEMENT] TEST: Cygwin 3.0.0-0.3
To: cygwin AT cygwin DOT com
References: <announce DOT 20190130212227 DOT GP3912 AT calimero DOT vinschen DOT de> <19c5e653-890a-7c52-fde8-80df137223c9 AT ssi-schaefer DOT com> <20190131194813 DOT GT3912 AT calimero DOT vinschen DOT de> <20190203111937 DOT GG3532 AT calimero DOT vinschen DOT de> <65068741-b05e-591f-1577-cab12650bee6 AT ssi-schaefer DOT com> <20190204142538 DOT GN3532 AT calimero DOT vinschen DOT de> <40c1cbd8-be88-86d6-2b66-ded51129f2c3 AT ssi-schaefer DOT com> <20190205094455 DOT GQ3532 AT calimero DOT vinschen DOT de>
From: Michael Haubenwallner <michael DOT haubenwallner AT ssi-schaefer DOT com>
Openpgp: preference=signencrypt
Message-ID: <bb3dce3e-8228-3eb6-6489-36e6aec81606@ssi-schaefer.com>
Date: Tue, 5 Feb 2019 12:28:41 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0
MIME-Version: 1.0
In-Reply-To: <20190205094455.GQ3532@calimero.vinschen.de>

--nhRYUO0Aw2EyOL4zjYYjuzNG8aEbcXazc
Content-Type: multipart/mixed; boundary="GqYwRNIgCmfzKRCOqmhNhpqRE6RddjF4z";
 protected-headers="v1"
From: Michael Haubenwallner <michael DOT haubenwallner AT ssi-schaefer DOT com>
To: cygwin AT cygwin DOT com
Message-ID: <bb3dce3e-8228-3eb6-6489-36e6aec81606 AT ssi-schaefer DOT com>
Subject: Re: [ANNOUNCEMENT] TEST: Cygwin 3.0.0-0.3
References: <announce DOT 20190130212227 DOT GP3912 AT calimero DOT vinschen DOT de>
 <19c5e653-890a-7c52-fde8-80df137223c9 AT ssi-schaefer DOT com>
 <20190131194813 DOT GT3912 AT calimero DOT vinschen DOT de>
 <20190203111937 DOT GG3532 AT calimero DOT vinschen DOT de>
 <65068741-b05e-591f-1577-cab12650bee6 AT ssi-schaefer DOT com>
 <20190204142538 DOT GN3532 AT calimero DOT vinschen DOT de>
 <40c1cbd8-be88-86d6-2b66-ded51129f2c3 AT ssi-schaefer DOT com>
 <20190205094455 DOT GQ3532 AT calimero DOT vinschen DOT de>
In-Reply-To: <20190205094455 DOT GQ3532 AT calimero DOT vinschen DOT de>


--GqYwRNIgCmfzKRCOqmhNhpqRE6RddjF4z
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable


On 2/5/19 10:44 AM, Corinna Vinschen wrote:
> On Feb  5 09:42, Michael Haubenwallner wrote:
>> On 2/4/19 3:25 PM, Corinna Vinschen wrote:
>>> Are you going to test the patched branch?
>>
>> Sorry, was indeed unclear: Yes, of course!
>> Will start testing on Server 2012 while setting up a 2019 VM.
>>
>> For now, there's already this one patch I've been using with good succes=
s,
>> please add it to topic/forkables - the suspended thing is something diff=
erent:
>> https://cygwin.com/ml/cygwin-patches/2018-q2/msg00039.html
>=20
> The collision problem shouldn't be as bad anymore with 3.0, given the
> new PID handling.  However, after spending a bit more time in the fork
> code, it looks like not releasing the procinfo in the error case is a
> generic problem so I'm inclined to apply it to master.

Heh, thanks - was my original intent back in 2018.

> While at it, there are quite a few spots in the code which end up
> jumping to the cleanup code but only one of them calls TerminateProcess.
> Wouldn't it make sense to move the TerminateProcess call into the
> cleanup code to make sure the child process doesn't stay running
> in some limbo state, not doing anything useful but not dying either?

Seems to make sense indeed, and the suspended processes I do see sometimes
may well be related to that.

/haubi/

>=20
> Kind of like this:
>=20
> diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
> index 6f00364334c3..5f775249a990 100644
> --- a/winsup/cygwin/fork.cc
> +++ b/winsup/cygwin/fork.cc
> @@ -400,7 +400,6 @@ frok::parent (volatile char * volatile stack_here)
>       we can't actually record the pid in the internal table. */
>    if (!child.remember (false))
>      {
> -      TerminateProcess (hchild, 1);
>        this_errno =3D EAGAIN;
>  #ifdef DEBUGGING0
>        error ("child remember failed");
> @@ -508,8 +507,12 @@ cleanup:
>      __malloc_unlock ();
>=20=20
>    /* Remember to de-allocate the fd table. */
> -  if (hchild && !child.hProcess) /* no child.procinfo */
> -    ForceCloseHandle1 (hchild, childhProc);
> +  if (hchild)
> +    {
> +      TerminateProcess (hchild, 1);
> +      if (!child.hProcess) /* no child.procinfo */
> +	ForceCloseHandle1 (hchild, childhProc);
> +    }
>    if (forker_finished)
>      ForceCloseHandle (forker_finished);
>    debug_printf ("returning -1");
>=20
>=20
> Corinna
>=20


--GqYwRNIgCmfzKRCOqmhNhpqRE6RddjF4z--

--nhRYUO0Aw2EyOL4zjYYjuzNG8aEbcXazc
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQKTBAEBCgB9FiEEY4PJ0Y//u+XgtVrKscWEirl385IFAlxZc3dfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDYz
ODNDOUQxOEZGRkJCRTVFMEI1NUFDQUIxQzU4NDhBQjk3N0YzOTIACgkQscWEirl3
85KEPQ//bSUS2rBUp2t5isJDQ+v9KvoeK6Kjls4wflox8IW5UdvjzMwiEo1VzOWy
bl3VYVdL09FePxgZp6DclUjWEQfUXmifhLkyhoALbp7FfowdAysHi1aJxlIIsz+H
5yMAIE+ZVmuro7VPTnCmNHoVCBT7mfZDOJwNhEqwhoQPYKyWCaSKd8DUyNK3JBZ+
RciriKHcaYYyKgHHP4T8T+gC9ea3/2nnEWChHpj9Qwm8d/l3QBJVM0z7bVFa5SMx
+4IdRkYid+mXHYYQ06HWjHeeLPK8mH3hM9yTHWK2rUdxK+aMowfeUo+1qb9sCI5U
YPvVreI3OEn36vz9X7UhNYF9QCdd45T2bMulb8yF+5J0gOSSiAW/6+jQZXKgFb/a
zn1R9wYRdCYBvLKFNqjXRAbxvYvDr89XxaQWE0E3bwD54y/uzRNMkx3P01gkK3NS
vefVAwejCPbYYUW8Rscjny0Lvsfw+gC+e7zLBpYS0ZGENKEUL/QduUUBCsWSN0dd
8dR4B/VOjja2bDkd9U54qz0JXQJXkGVtmSEx6XzZwZDAI1E6wRHELGGwth67Y3Ws
LjkkMLLo5RwqODq/xBVASq2YKwi1OXD4pG73SpktgeaQR6f2V742moGv/LVyhwef
PFg7t2iuYvILYRmXgXO+F9LEOjXdeTQr3kmAJ3s7LcIzWbUqJu8=
=nxfI
-----END PGP SIGNATURE-----

--nhRYUO0Aw2EyOL4zjYYjuzNG8aEbcXazc--

- Raw text -


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