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 09:25:23 -0400 Message-ID: References: <8e21db9c-0100-998e-f280-81304e7ff61a@cornell.edu> <87mtecl82o.fsf@athena.silentflame.com> <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: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3074"; 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: Sean Whitton , Jim Porter , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 27 15:27:13 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 1o5olk-0000Zg-8g for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Jun 2022 15:27:12 +0200 Original-Received: from localhost ([::1]:39896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o5oli-0007M9-TE for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Jun 2022 09:27:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5okc-0007JP-4m for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 09:26:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56413) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o5okb-0000ZE-RV for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 09:26:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o5okb-0000eZ-Nr for bug-gnu-emacs@gnu.org; Mon, 27 Jun 2022 09:26: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 13:26: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.16563363372477 (code B ref 56025); Mon, 27 Jun 2022 13:26:01 +0000 Original-Received: (at 56025) by debbugs.gnu.org; 27 Jun 2022 13:25:37 +0000 Original-Received: from localhost ([127.0.0.1]:50310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o5okC-0000dt-KX for submit@debbugs.gnu.org; Mon, 27 Jun 2022 09:25:36 -0400 Original-Received: from mail-mw2nam12on2130.outbound.protection.outlook.com ([40.107.244.130]:52262 helo=NAM12-MW2-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o5okA-0000de-3y for 56025@debbugs.gnu.org; Mon, 27 Jun 2022 09:25:34 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JpyCSfg31vllrP6LaY7zw4JxIyp6MFd0/fbxAeU9VmyncItI1FpmXRFJB1sUJmCPwNtPEw9cfSp7DmNAhh3nxyD0NcyHGGWyYPUKH/bEkaHR2pS9JudyZMQLwWNdO+UDu49vPyst6266cFmrjQnfcp05cDkJ9LdRpqc04AH0KlkrQSeo+c3D8Zn9nTXr9RSsYu1jOee0vLcxehMrgsmWu3d986lWtZsiYHdOtjdcFV2m4jGUvMGi1TCFpFlTUir8TY68ivHJeIWkV7emZcc/64kste45trlITPd1MWJD75+zM4oiUCuzFepe2h2Rk0N+tXCxM/mN5m6leHJ9O5p31Q== 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=RqEbdkzWrbOqlZhqONnZZOfrH9fwY1ebEBzaQpcvBt0=; b=fLshbpOCCoORRXznWBpwER5M0Z54sLWP3qxdEea0qnAArT6nfOnGZyjrex7b7nt+dQ+YnWOKm4RpbwxrxmM5v6S76s6dOtVE64apSuY+oMPwxIftPdHmiDeQsXsee8xqXWaro2ZHpofK1J1sG8GogOuYUbaRI0Y2As8NhD34H6Wt5GtXJJwqB7PYK1RsPkCIgbJ4tQPZpxo1MjZ4WU5DYjnTqXaecs+G7y9JjF4APOFEzknl8geo/zjNrJ1L2BXXnrUBq0Y0sxhGl4uPBB+ERXDPxvhlY0FBVUHe/aAAAd8q9umxnEC3ytr1TTKYktXLAWWVPgY1wmt5YwveCBOXxQ== 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=RqEbdkzWrbOqlZhqONnZZOfrH9fwY1ebEBzaQpcvBt0=; b=Vq5tW7tohCwSe3qQT70oY8GSvMFZ+2JaWwE9jzbnrfUgtsW9wrUzO0PDYoITMrTNh2fjx0A2m8wDvhPwM5DkAKwZpuv8v4bAGqzB7Q1rdbcLMhT/brSuSA09GUFgSssXZGqIfiSeLucazRr4v7uuBAWDWv0aNtbrtAt3HLkjhNg= 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 SN6PR04MB4782.namprd04.prod.outlook.com (2603:10b6:805:af::26) 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 13:25:26 +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 13:25:26 +0000 Content-Language: en-US In-Reply-To: <8735fr2kq6.fsf@melete.silentflame.com> X-ClientProxiedBy: BL1PR13CA0212.namprd13.prod.outlook.com (2603:10b6:208:2bf::7) To BN7PR04MB4388.namprd04.prod.outlook.com (2603:10b6:406:f8::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3a196019-29c7-4c9b-830e-08da58407f5c X-MS-TrafficTypeDiagnostic: SN6PR04MB4782:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jecXLRe5fFpf5D2it3z5NvqMKwGv4Kldf2Z8o/EEyjf4uNO3XNm3ywpJkyfjMskUAaAFfckUNiU5dywzC67Rse4ftbwHJIP4GxcyCpUreFi78geWFBia2A0lcu989pBFe9RVwgED5vTV/yn2t8utSshyFuyccNhNe20eaCnMt2XSou1zl/rAKaKAGafOr0Um9pjanyFKb2lZXYAWgatbtCJZW/LKZ2Ela9FDkARsptEtjwhDJyZgDSgSupgYF8tQSddNysnfhjjowQqfP5Map4dzXhcKJEf+/2lfn6iKOZnPE9IpM5dNWsW/8GKVC5XqQZHFJsak2/zsF8KQ8Ti4nQQ86rwX1KgGFcU3XvucAe0glZd5W178mgWuZU/I6ZhizCE+x0CEgrFqMANFuOEB+hwG+7NWCVU+M3odBKD/qyElis8UOFqF3R7Pvz1BjJHqvMUAMUdecZ5W02GUVhR30O3R+XL7imMGlbQ8oBdpNPjNxH/HL4aZQAMiv3GMVoeYJQ7dRXen838wvOWsbhwdxJpaAaWvYdLVw/qVXQ2vfKgfckPya06EZOiWsv7DRWSMVj/ZgbKt2o8fQ+jtE3iVOnEtFEJ9dZxoaiwdq9mY/RPqvvHqwP2mBAeUeUroWyYnigzxd1UVPQSeACpV3UhoGsbNDlEBvZPVNdn1WPCjC8TERHRekMKlquM6Z/K2GJc4FOAA0x/Q+c7D193WcKW2VAgAWWP4j/qYuGI3lRa7f79VHK9tzCkAFX0ejrrSz 3NN+ci9KzEu94K5yzuega+1qtzqkRMSB6d8Qmf04TlDHvvjhCP17nbQuwqVLVhzXhz7 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)(346002)(136003)(366004)(396003)(376002)(39860400002)(31686004)(186003)(6486002)(6512007)(38100700002)(36756003)(2616005)(786003)(75432002)(110136005)(478600001)(316002)(86362001)(41320700001)(66556008)(31696002)(8676002)(66946007)(66476007)(5660300002)(83380400001)(41300700001)(2906002)(4326008)(8936002)(6506007)(6666004)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wLL30TN6wpzXb6MN4O0QgYkc7RznGhkOpo6EF8W6VYx8hAa1awewZ2KRIVRS+kS8p5KP6FSHquQG8qjzGj6LJG7FP7bT3Krs2OmCqiwUBaYW5u0ZVwUcw6rXi/KRIGUwxkT9SoUz6AOPaaW3tKuND4zVmOkt9520jPkJa4gRrEwu7Nl2YERWqzbV/hUgyzPvOS0bDUdiJsdX0UXI9X0tRewVJwEy3dniT1BhLnNQQeE/Mj5zDgenM9fmAtfCn9Rmj4wd046YHPmbtp0XbmJE3ZVZC+K+7V6a2bXxrY1Hzxi+cY7en1XG2jkR4hkTcb9pa94vR13E8vn79soTyB+OPwkeKaMti2Q2jC2FOno/klFFGoGLGwcZjC2aTiNNTNJzTkjdaG21USRLjrI9x7CDQArOn2cCOOmpYNh4wiA5gKNla+Z5YoJqcM2PloEGJKuHjE2jmxhQbD8egIwsN7dRssJ7oexwcdrHk3y/HutgFWBJtIEUrG1qIQOTJy3ijAtnO8dy2Z6zHMisRYZgcM6+N7nSy6WGzCtmz5D5ME8KT5J1UssCgIxnQ1ISlK5f040tNqjeLIL1lGCP9gtUUdzEh2QfZEl2oxI/qkQthrcH/XjMtYImGzHxASZSNgHJynd642g0M5NcaXDaybw3FcUB2HPTC4iHUd8zdYcyO5vNTVZp9UUrUI0dT1G9Kx/DGpdyhHeMiEsaSmGP+E27qtjDpaul3jqjM0yyjKp/dWZnJFok0BfzatB2z6vrvQ 42QBO1QEFOoZkAIYMZHHs6x0K4xWPd05fJrkYLenaCUGKgKMseXnByrtpo0/e2/tSqB+/ljxVwSXaD5SvH5fyifTtocTbYKoeq X-OriginatorOrg: cornell.edu X-MS-Exchange-CrossTenant-Network-Message-Id: 3a196019-29c7-4c9b-830e-08da58407f5c X-MS-Exchange-CrossTenant-AuthSource: BN7PR04MB4388.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2022 13:25:26.5673 (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: J66JFghkBa1QbiFVQnRpcYe+VNIzvEGU/z43dewR8unIs747vtY+D6Nom6EjHOoC0DJmNeRQ8V0Eouz2sxs5SQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR04MB4782 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:235454 Archived-At: 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)))) Ken P.S. Has anyone checked to see if the extpipe tests are now passing on EMBA? If not, maybe the workaround is needed there too. Alternatively, we could simply use the workaround on all platforms. I don't see what harm it could do.