From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.bugs Subject: bug#56025: 29.0.50; em-extpipe-test-2 times out on EMBA and Cygwin Date: Mon, 27 Jun 2022 17:19:55 -0400 Message-ID: References: <8e21db9c-0100-998e-f280-81304e7ff61a@cornell.edu> <40d9e52f-2041-b341-ff77-546ca7792791@cornell.edu> <87k09elrf8.fsf@athena.silentflame.com> <1de33903-4c55-e043-3754-726f7044f2d0@cornell.edu> <7e7daa2f-dbbc-cd0a-4958-2a2932b17837@gmail.com> <8974408d-91cd-aebd-7a5b-596a57bd640e@cornell.edu> <17d41105-b006-f9ad-af0b-ece84a7f5248@gmail.com> <040b3a36-459b-a94d-f879-7f45aac50bda@cornell.edu> <83sfnud26o.fsf@gnu.org> <96e47ba7-efaa-b6df-dd98-60f09068e68c@gmail.com> <874k097lbh.fsf@melete.silentflame.com> <8735frmjrr.fsf@athena.silentflame.com> <4676f52c-4758-38df-f0f4-dbcb5d848c1b@gmail.com> <8735fr2kq6.fsf@melete.silentflame.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26507"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Cc: larsi@gnus.org, 56025@debbugs.gnu.org To: Jim Porter , Sean Whitton , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 27 23:22:17 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o5wBU-0006iU-Fh for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Jun 2022 23:22:16 +0200 Original-Received: from localhost ([::1]:34204 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o5wBT-0000GW-69 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Jun 2022 17:22:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5wAK-0000FH-0L for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 17:21:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59566) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o5wAI-0004qd-1o for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 17:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o5wAH-0006re-UX for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 17:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ken Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Jun 2022 21:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56025 X-GNU-PR-Package: emacs Original-Received: via spool by 56025-submit@debbugs.gnu.org id=B56025.165636480826310 (code B ref 56025); Mon, 27 Jun 2022 21:21:01 +0000 Original-Received: (at 56025) by debbugs.gnu.org; 27 Jun 2022 21:20:08 +0000 Original-Received: from localhost ([127.0.0.1]:53463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o5w9P-0006qH-LS for submit@debbugs.gnu.org; Mon, 27 Jun 2022 17:20:08 -0400 Original-Received: from mail-dm6nam04on2134.outbound.protection.outlook.com ([40.107.102.134]:59840 helo=NAM04-DM6-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o5w9N-0006pi-Ot for 56025@debbugs.gnu.org; Mon, 27 Jun 2022 17:20:06 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=npvqg7iZZf3gEYhtPHzMXnR0BLxe7olsg0+tkSYPe4hgxBvEdJtODzVRVe+wueR4j36S4X0mOeYIMZr7QXMEpftqGeCIMhFfjLqXl8aQOEgP66pLkJkTdtAHz6kKBHMcXiQuOEJHJC9Nwm94/kp/Eb/12yvcPXOpt4dpWUflgcs59b0eRhOatraYqktJWCsRAQ0y5IBOJkChlTUK5Ga12VFaU0khIrbAH8/E5MJaIK9wI6Ku5Sm20PNr/H99sYnl/B4U2NoVHrD8ykP5tRn7c40s3EebpIOsScWHCspqQ5rTe7zH9rO+MwRtRhe57wAJ27dpJ1ro8iDueya0+0wfug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JJx0qNHTOpdieMh7F8mckMT43CWIi5xniyoQS7Q1BiQ=; b=kIsIZGp0P9bys9lzzcZY+L7L96JqWPOY6BdFdc+Pu09tlzD43NnNDmmjaOzPsXOCzHmcn8/pf4U0XRYkLrai01xNVqfePdf9kDoiQ1ZSX7J7SprBsf5UksH9P7Zk15pkHtcDMi7DXs452Xz8riYJ20rvFDTFqHj5V2s75gMsMTQ6dhmijJdYEZhXZnPxz2zoAbURHQqn8QlKM9S58dNy2rTG+CJ+SD30faBiUnLTNHsRowHKdSChHwjrLQfrtTTuerM6zAp343C7LMD5AjbGL3MkTVyD9JRVr46jvPdshDoyywXMKftY0JAHmF2G7+KleEX/ncqkSoHgV8L7to0RSg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu; dkim=pass header.d=cornell.edu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cornell.edu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JJx0qNHTOpdieMh7F8mckMT43CWIi5xniyoQS7Q1BiQ=; b=G+nWtQo38VBeUEjzHqzwUnNT9xCJSS195DAeENnOTZMGDZjtSggD0UZ/VD2qc+53MKjUFMUxJAT0d5PVJZ0CRhjNBdtxcfE9JUPWLb5LbWqjsmFMRcdG1qxwGWwn6+c5alOpV76nfCu/UmILXxN8v+BR0K7kfWClDguHDm47f3g= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cornell.edu; Original-Received: from BN7PR04MB4388.namprd04.prod.outlook.com (2603:10b6:406:f8::19) by BYAPR04MB4917.namprd04.prod.outlook.com (2603:10b6:a03:44::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.18; Mon, 27 Jun 2022 21:19:58 +0000 Original-Received: from BN7PR04MB4388.namprd04.prod.outlook.com ([fe80::901f:a758:30f5:309d]) by BN7PR04MB4388.namprd04.prod.outlook.com ([fe80::901f:a758:30f5:309d%2]) with mapi id 15.20.5373.018; Mon, 27 Jun 2022 21:19:58 +0000 Content-Language: en-US In-Reply-To: X-ClientProxiedBy: BL1PR13CA0406.namprd13.prod.outlook.com (2603:10b6:208:2c2::21) To BN7PR04MB4388.namprd04.prod.outlook.com (2603:10b6:406:f8::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6d6a2ddd-ba27-413c-04bb-08da5882ca26 X-MS-TrafficTypeDiagnostic: BYAPR04MB4917:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NG4IxOj//uc2LBqNycU4F7HO49pDa8F0SLj5uvBlf8i2LV/25iwNTqGjFtbG2CK82Sd34Yco6sI1+8pN21ASE3CEGklZXWcFwOitDRkFduuuK4sWiRUkJ3dcaNEK180btSJX26DTEZWIwWks+7k5V8QHiyq1+UugQEQq/8xJaE9vR4WMXOESjmBQaQz4q7eKB6lAfh+7PjMPaU4ODbkwZCEQswbu7S7AFhcCnW6BT75Hqr2PuznMN/J3L9gbmhdzM/P8fOLTvmDMSbV5+EWwn83y3l8gcDoSi6khLmPmG6Q9jZGHtzzqbyvE0l1fV8fnbhqDYRYZelUxaarKVC//lQHE2vDncQaD9M9dkKtg0NOqG+9gla/0dPhjUHrn72mt18A7Lr/IxyX99N7w3xrmDI5O2o0P8E1aBgCIz584seYkVeuynywjkgnuTSpgKcqxNmWa0SCndRUhp8RZeUK2sP6xXC19zWsPbZLhn0dozrff4gZgMQN6B+R3c421sggSfhJ3vXeW/oFulbkhl9dpKcV1lKF1qoMjHyVtcQn3ZRGXl9q5TFHRb739b+juQbNr2FxmKOsmDKG04C8jtlz45j6mq5WZpw9AwKkwqSkEMm0cKG73gwI7NCT8qBIfJfo3kUenM86NJb3ocELPr7X7NnDyBypdF7pRy+thByZqi13G1O+LIgldvTJEWMT8Aqd8pgfpiQBfmoUMApvhqFuCGoWflu7PcICo2aEFKgO44r1TNB9MALA1u866RzU4E sLk3/3YGctWCK/Oltepi0zB53mZ+a6jo9ClLPZI2gKBP6Ju21ZHpN7LeAeKm2koQ5Af X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN7PR04MB4388.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(366004)(396003)(376002)(346002)(39860400002)(136003)(8676002)(6666004)(6506007)(31696002)(6512007)(86362001)(53546011)(41320700001)(41300700001)(66476007)(4326008)(2616005)(66946007)(66556008)(478600001)(6486002)(83380400001)(31686004)(186003)(8936002)(316002)(110136005)(38100700002)(36756003)(5660300002)(75432002)(2906002)(786003)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XO1hrtzvzvlF0aCCdH+OZvaQqLq/EjXShnM6pEnWedk1UgE0aBIQv3kaTOkM8opfznCf6+84eXBHUcN9I8tzvje7K5VSFzqVRf8JkKmaV9fVdgBCYwOZ91jpNlyR0eh4gJBKB4GP5p/895Rq1/QBNqa5Wn9mN2qTEuxme9tmqKFH+p+5Zj/CfrI3h/FHUm5ac8PeZoNAPXO23TnI7sSQTfOa+4MepfXeWn3nEadtKuN9PSw3EFoFNzdpqr+CrK+9fFcWPe9HUYPIIGtdXkE3mQmLy3u2w0iahW6o3h7N7sMDaPf4AkGwEYlMNAC9/p8jHjo9grEzAYVhvWf69o4vCswHxTxhDsQbyN0rWO+yc4r6En+7RKt7MJ/yeoMtnb6EkgDfRmZ/0M8oClBzaSQQTwnQw8LE/qTXzLP5iK3ydTuSdd0TryM7T3U09tb7iT2/31fnBlIj/7byUaYhWHHrqhcwgBPcQW1uYc+vLfmVlLT8gHpnUm/xWUVm903siAunR6R3qjgvb31qr6F2bGPxG/wE+HmpueIH0yGP/vdPwyzV7XeTksxFUdyHykxYH1jO6G2BSfkQNgt+qz0t6Afmo7TZ7X5MSCpEoAm4chIC9kMfzi+MLuRjTnNxSdSQ7j+WjxC+KzUtjECj+pNiwSH7SUQcHS+gFamZJukvmxTPZ8ibmkWf0WMD9r4q8AfCtaexiuKrjoZCJXNzWg7ZfzOBDk5MSNZMhRY9e4ypPxfyeeqDWOuSgM7z/XJabW Zb85dERyWVFNvCHKdl6RT2nK2Bs+zr+RFoqRvXMQNTX5UKQgUAPQDMoauXCOkKN1kOBJwaKDTuyNnUiYkROvqpRI0h0W3H6/G/ X-OriginatorOrg: cornell.edu X-MS-Exchange-CrossTenant-Network-Message-Id: 6d6a2ddd-ba27-413c-04bb-08da5882ca26 X-MS-Exchange-CrossTenant-AuthSource: BN7PR04MB4388.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2022 21:19:58.7922 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4/a+5763D/vG82GVRmAddevAO4SZkLh4sHe9vI4LxHH8SbHg7VfW5OL2IzUUB+DkEz/8UGvuh4ffepmLkP1Y3g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR04MB4917 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:235501 Archived-At: On 6/27/2022 3:18 PM, Jim Porter wrote: > On 6/27/2022 6:25 AM, Ken Brown wrote: >> Thanks to all of you for working on this while I was gone. Unfortunately, the >> problem is still present on Cygwin.  In my haste to get away, I neglected to >> mention that there is apparently a timing issue in Eshell on Cygwin, so that >> even three EOFs do not always suffice to kill the process. >> >> My test case is to run >> >>    echo bar | sh -c rev >> >> in Eshell.  For reasons I don't understand, EOF almost always has to be sent >> more than 3 times times before the "sh" process dies.  The maximum I've >> observed is 93.  Inserting "(sit-for 0.01)" after each EOF eliminates the need >> for extra EOFs; this is why I referred to the problem as a timing issue. >> >> I propose the following workaround: >> >> --- a/lisp/eshell/esh-io.el >> +++ b/lisp/eshell/esh-io.el >> @@ -284,10 +284,16 @@ eshell-close-target >>       ;; end-of-file to the reading process.  However, some platforms >>       ;; (e.g. Solaris) actually require sending a *third* EOF.  Since >>       ;; sending extra EOFs while the process is running shouldn't break >> -    ;; anything, we'll just send the maximum we'd ever need.  See >> -    ;; bug#56025 for further details. >> -    (let ((i 0)) >> -      (while (and (<= (cl-incf i) 3) >> +    ;; anything, we'll send up to three on all platforms. >> + >> +    ;; There's an extra wrinkle on Cygwin where, apparently due to an >> +    ;; unknown timing issue, it sometimes takes more than three EOFs >> +    ;; to kill the process.  (This only happens in Eshell, not in an >> +    ;; ordinary Cygwin shell.)  We work around this problem by sending >> +    ;; up to 1000 EOFs on Cygwin.  See bug#56025 for further details. >> +    (let ((i 0) >> +          (n (if (eq system-type 'cygwin) 1000 3))) >> +      (while (and (<= (cl-incf i) n) >>                     (eq (process-status target) 'run)) >>           (process-send-eof target)))) > > I'd be very hesitant to do this, since as you mention above, this seems like a > timing issue, and it's entirely possible that there are other, more widespread > issues on Cygwin here. We'd also want to check the system that the process is > actually running on; otherwise, remoting into a Cygwin system (via Tramp) would > still exhibit the problem. I'll see if I can get a Cygwin environment up to test > things out in the next week-ish. OK, thanks. Let me know if you need any help with that. > If there's no other way that we can come up with here, I'd lean towards a > defcustom so that users can tweak this if needed. Sounds good. Ken