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:18:16 +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="38691"; 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:38 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 1sKyhZ-0009t0-Je for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 Jun 2024 13:14:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKyh3-0003ve-Tz; Sat, 22 Jun 2024 07:14:05 -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-0003uT-8D 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 1sKyh1-0007CF-WD 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 1sKyh1-0004Aj-Ms for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2024 07:14:03 -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:03 +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.171905479515918 (code B ref 71709); Sat, 22 Jun 2024 11:14:03 +0000 Original-Received: (at 71709) by debbugs.gnu.org; 22 Jun 2024 11:13:15 +0000 Original-Received: from localhost ([127.0.0.1]:44567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKygE-00048Z-CO for submit@debbugs.gnu.org; Sat, 22 Jun 2024 07:13:14 -0400 Original-Received: from mail-wr1-f43.google.com ([209.85.221.43]:56546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKwuC-00016l-Mp for 71709@debbugs.gnu.org; Sat, 22 Jun 2024 05:19:33 -0400 Original-Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-364a3d5d901so1999836f8f.0 for <71709@debbugs.gnu.org>; Sat, 22 Jun 2024 02:19:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719047907; x=1719652707; 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=QfE42POmn4ewc6oeh6W0GLzxZBiIpjQvBmuL00thMMg=; b=Z/tY7ksnLyLSFppP4XSDR/BbN+ikDrCS9RQsEhILpvJEjhp2tcX2ze3DTs3paKmXha eHOj/9Qlp6CVFWWIF1JADZi/gzxajl9vIzDqlcTS0HEeTAueZa+LMtmZCeIndnR5eM6L U0b7mktOsxuwVH2PIPOVC73aDNNwxyh8fCZXYw8vQ2ek7CsAUDJKWBFl65dVQNM5IbYj bP4hmqcpFGg01h82kB7u0hXHuoclnvkUIkdE40akFM8sgskZOyVbgj2AEPhcoZAArtF3 DE/taNSmkXfftAkUhkHV4NVHUkjP6aZkCDyeP95wm5hmgh/zix58cGqCAE5i6ESz+sqG xfvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719047907; x=1719652707; 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=QfE42POmn4ewc6oeh6W0GLzxZBiIpjQvBmuL00thMMg=; b=H3sj9GCeiv4ioKnTRU6Fozcs0PANmFlOXFJbbXKsiQGzMSSWqV9VLMisrwEK0NdFCU RzhDdiTr/VSae86yGpGFefoyKuBY1SlzXjXIOg55XkBu6ZmQkbUS0Sd4BcdmnF6tUAQ9 kZ/F3NV5FSPA83YR1x7NXVYzarbWfnat1/kzXyeU6Ntm1bEadMAcf5Q2NgIrKcbuEp3F W6gJoVV8DUyZrHDep90l/dmtfP3OU9F12+ArbkYORfyFhrJMKXbFiVPL8mfHQXBRqIfv HI4ujL38i+goJkEEKfPQmJEgU0i1h3mbU+jZeOnnvwyMDvhKCPQM3cCbCC1x5+T74Z+D ksUA== X-Gm-Message-State: AOJu0YwdmepNR6Qu1WlF7aaJyjSQ/Az3GIKjJzWIQrqEmRWZ2a+k2h7l MJpit34KtRhC/udRwa5kp7oyQDkpNLQXX1QGOum2h+7EEPG3lQHK8dDr3s8aQuvk/tlwEVLQeeU aNALg+4bc4Nh5z0WDRxTp1GJa+JhmbGbA95U= X-Google-Smtp-Source: AGHT+IGVQM/N1QQjbwnJN2jXgJfwZraxgyfaVQDQFHA7uhKDwd/H6qrJCX8jpatge7t+bYswQxJ+XdQykSDslMLJrNU= X-Received: by 2002:a5d:6152:0:b0:360:81a1:5b63 with SMTP id ffacd0b85a97d-363170eca61mr7709147f8f.13.1719047906926; Sat, 22 Jun 2024 02:18:26 -0700 (PDT) In-Reply-To: X-Mailman-Approved-At: Sat, 22 Jun 2024 07:13:09 -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:287696 Archived-At: 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.