From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Iurie Marian Newsgroups: gmane.emacs.bugs Subject: bug#71709: Fix recent change in tramp-sh-handle-make-process Date: Sat, 22 Jun 2024 11:23:30 +0200 Message-ID: References: <87msneqeyn.fsf@gmx.de> <87iky1qvqu.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38011"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71709@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 22 13:14:28 2024 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 1sKyhQ-0009eD-Iq for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 Jun 2024 13:14:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKyh5-0003vh-2X; Sat, 22 Jun 2024 07:14:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKyh2-0003ub-KK for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2024 07:14:04 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sKyh2-0007CO-CK for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2024 07:14:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sKyh2-0004Aq-2k for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2024 07:14:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Iurie Marian Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Jun 2024 11:14:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71709 X-GNU-PR-Package: emacs Original-Received: via spool by 71709-submit@debbugs.gnu.org id=B71709.171905479515924 (code B ref 71709); Sat, 22 Jun 2024 11:14:04 +0000 Original-Received: (at 71709) by debbugs.gnu.org; 22 Jun 2024 11:13:15 +0000 Original-Received: from localhost ([127.0.0.1]:44569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKygE-00048h-SE for submit@debbugs.gnu.org; Sat, 22 Jun 2024 07:13:15 -0400 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:42196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKwzG-0001F4-Ea for 71709@debbugs.gnu.org; Sat, 22 Jun 2024 05:24:47 -0400 Original-Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-3632a6437d7so1606530f8f.0 for <71709@debbugs.gnu.org>; Sat, 22 Jun 2024 02:24:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719048221; x=1719653021; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=NZzq6zsHImX2hPa1WTeYgPEDFfv23yviohcppsHlrDM=; b=OEGMJJBPbhYLJktQupEuD7W8cys6x5KQB/BU/zHuKhqvkLylvKJ0QaBGFyc18S7fL+ EBjx/yu0Va47OQR6sYDu9mgngBpB+qHU8gltMeEVk5stE/YM2XbKZbRxwwWFULJ8PHjh Y47287mFsR+FSTsePzQk4sMLX6r3pVaRFryhjShIV+NUKkx7XredxxIKzGZpKoMz7amk 9kp2umryPTS9HqDLEw79lFEMjYAgxDzcL8G338fi1Cia6Wdf1VzckkFTo53apmeUlVWa kTjWhY6As18J25z9oBmXwG4saGbFL/ldMRm1IGI3i6V8iwh60+6ynzlhqRkOj+Mc2Lp6 GCMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719048221; x=1719653021; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NZzq6zsHImX2hPa1WTeYgPEDFfv23yviohcppsHlrDM=; b=wIBOFVB+uPwcB1AH21O/VtMXN5IXmHInry9dfbLRqAIgXjqDsaayGIaZMPkTntAGc7 6+hns7/DyMn4AeIH6u3x4My6Yo+gc1MTEHCOJP3Gzp17/KKSms2JUafEXOXei4au9tHU ogFwCuT4OQr5yJGWQlYAv5tVQ/k8vmww83SwKaPq/sAdATiIdPo2nbXMJkAe7btjIzCx RJ2tKcb6BjRd7UDl3XVcoq8B3qxNpq0vyzXM/IfiZL17s4q333CFLm/UJw6yNY0RLdu/ r0J900RU0yJYjiUn7itzW4eRDL7J/l0J3ze5CKQzuAdSnrGkBO2aIf5voB2b7AhZlSR5 4z+w== X-Gm-Message-State: AOJu0YyN4E/rwoil1zQRwEqsxzy/NDzdmConXC/ulBc1svvSeU2gjRw4 Y0sR0O3MwcGgDgJIexuWDvWDqgiLWxxmhmeK41ba/KRWEVmA6I0vAol/W/WolXJAy6pRdA66XLH s6N4kE9t2swagZSpBvQa0434uoj/8R/kA90Q= X-Google-Smtp-Source: AGHT+IFF6P3tQni6rWHeSyFdEtAovmeyd1+Z3ZedhbDgKt4C2Df/yfxi85eDpdP80lPDDufmA/p//YrdNqObxSXeqSA= X-Received: by 2002:a5d:68c6:0:b0:362:26d:613 with SMTP id ffacd0b85a97d-366e3266613mr752128f8f.8.1719048220839; Sat, 22 Jun 2024 02:23:40 -0700 (PDT) In-Reply-To: X-Mailman-Approved-At: Sat, 22 Jun 2024 07:13:10 -0400 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:287695 Archived-At: Sorry, it's the ~:file-handler t~, not the connection-type. Thanks Iurie On Sat, 22 Jun 2024 at 11:18, Iurie Marian wrote: > > Might it be related to the ~:connection-type 'pipe~? > If I remove it I get the expected results. > > Many thanks > Iurie > > On Sat, 22 Jun 2024 at 11:10, Iurie Marian wrote: > > > > Hello Michael, > > > > Could you please try the below snippet? > > Evaluate it in a local and _remote_ buffer. > > ``` > > ;; -*- lexical-binding: t; -*- > > > > (let ((.test-buffer (get-buffer-create "*test buffer*")) > > (.remote? (file-remote-p default-directory))) > > (with-current-buffer .test-buffer > > (goto-char (max-char)) > > (insert "====================\n") > > (insert (if .remote? "Remote:\n" "Local :\n"))) > > > > (make-process :file-handler t > > :connection-type 'pipe > > :name "test proc" > > :stderr .test-buffer > > :noquery t > > :command (list "echo" "Hello!") > > :filter (lambda (proc str) > > (with-current-buffer .test-buffer > > (goto-char (max-char)) > > (insert "test proc output: " str))))) > > ``` > > > > I get the below output: > > ``` > > ==================== > > Local : > > > > Process test proc stderr finished > > test proc output: Hello! > > ==================== > > Remote: > > /usr/bin/cat: /tmp/tramp.J0RZDc: No such file or directory > > ``` > > > > I would expect "Hello!" output from _remote_ as well. Isn't it? > > It seems that the process is not executed and the output > > "/usr/bin/cat: /tmp/tramp.J0RZDc: No such file or directory" is from > > stderr. > > > > Kind Regards, > > Iurie > > > > > > On Sat, 22 Jun 2024 at 09:31, Michael Albinus wrote: > > > > > > Iurie Marian writes: > > > > > > > Hello Michael, > > > > > > Hi Iurie, > > > > > > > After updating emacs today I got strange errors while running > > > > consult-find in a remote container, for example: > > > > ``` > > > > /usr/bin/cat: /tmp/tramp.gBbQP1: No such file or directory > > > > /usr/bin/cat: /tmp/tramp.SWKx2Y: No such file or directory > > > > ``` > > > > > > > > I checked the consult-find (which also points out to a "tramp bug"), > > > > then I checked the tramp's latest changes and applied that one-line > > > > from the patch, which fixed my issue. > > > > (In fact that line `(stderr (plist-get args :stderr))' actually > > > > nullifies the `stderr', so probably that's why it worked and I had a > > > > feeling that it is a solution) > > > > > > > > Please see below: > > > > * consult-find: https://github.com/minad/consult/blob/main/consult.el#L4965 > > > > * consult--async-process: > > > > https://github.com/minad/consult/blob/main/consult.el#L2287C1-L2296C69 > > > > > > Sorry, I don't use consult, and I don't know its code. If we want to > > > hunt a Tramp bug, we should run a use case with vanilla Emacs, invoking > > > Tramp's remote make-process. > > > > > > > I guess, to reproduce the issue, it's enough to invoke `make-process' > > > > on a remote location and with a non-nil `:stderr' argument (a buffer > > > > in `consult-find''s case). > > > > > > Tramp has a very comprehensive test library, see .../test/lisp/net/tramp-tests.el > > > The test case tramp-test30-make-process runs extensive tests over > > > make-process, including a non-empty stderr. And of course, I always run > > > the whole testsuite before I commit serious Tramp changes. > > > > > > So pls show a recipe how to reproduce the problem, starting with 'emacs > > > -Q'. And pls contact the consult author(s); they might report a Tramp > > > problem when they detect such. > > > > > > > Kind Regards, > > > > Iurie > > > > > > Best regards, Michael.