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:10:15 +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="39699"; 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:51 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 1sKyhl-000A8n-W9 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 Jun 2024 13:14:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKyh3-0003vQ-MG; 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 1sKyh1-0003uJ-OY for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2024 07:14:03 -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-0007C5-GL for bug-gnu-emacs@gnu.org; Sat, 22 Jun 2024 07:14:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sKyh1-0004Ab-70 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.171905479415910 (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:14 +0000 Original-Received: from localhost ([127.0.0.1]:44565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKygD-00048S-MB for submit@debbugs.gnu.org; Sat, 22 Jun 2024 07:13:14 -0400 Original-Received: from mail-lj1-f172.google.com ([209.85.208.172]:46472) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKwmS-0000si-8z for 71709@debbugs.gnu.org; Sat, 22 Jun 2024 05:11:34 -0400 Original-Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-2ebeefb9a6eso27305781fa.1 for <71709@debbugs.gnu.org>; Sat, 22 Jun 2024 02:11:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719047426; x=1719652226; 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=HZbJpgMKkA2UNwbCs3cbfEUqfpMFkoW7nEdKo5F6TkM=; b=Po4S5ecerKjaNawaO3wwts+DEVoCseA3WIiy9DDTabuopqQ4QkOaRWArLLE4vrdA6Y 7oVVsajZGmfyWRajMsooiXppZU9trhr9SiA/MKNXR8Xzq0soJWkv2I5wy4bHHYrlSVFE dOWvYACSQL8Zlqgj1wwU2FzElFfZ/HWZxn6eJO/v8JShc5rFgL4T0nEzS+0rCx092OXR t3bbML7kO2Hiv4It0jAQ/LxXG5Ly2dJg17oTcFMDD5w4IcwRQd+DbEpDdf/D1Nm3u8vo kpr4iiopN3gDids3Roz1qnMHBXaRehUjWABv7lktOW41l+zKx3p37MvfIpo6aXrQR6oO qH7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719047426; x=1719652226; 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=HZbJpgMKkA2UNwbCs3cbfEUqfpMFkoW7nEdKo5F6TkM=; b=jaIHOZyyI+7xFUkH0DHuME9v7XFgtxhJpzzCO9B9I166pr4HBLTRCtplVRCEta/Bn8 qeaynj1FzpvWY+SZf77c2/QG16bb1SJccoeSclTD3mw+MFIdJeDYLMgMEAQERAijg1EM GW2es0bHLFjTG9jD4ifnhX6Hz0Z7pyF+0SwwU2LxLKAyu/62Uh0dOWn9OFYkqXlFQ06Z dVAvFNMLLfYi9A7j/4l/tJaPOICWlFOYY+p/3tvwIrTwpLy4LHQzbny6Fc3olSXDLxuy HTnxFcXyZ6ApVRVdkPj/vqqzs5EPkQwPGKb+jnYsqwUNJBHsXR+ltJQhVYdVRmJ4+sd1 auqw== X-Gm-Message-State: AOJu0Yzi8T6Bc+YYQ+JoNZX1IQCFz3Sjyg5Af8bA4+KMGmNm+cmI4hGI sg+nqGiQDrcslVYB17Wna1ETqtgiHR4gb2dSWe3ooDnBK3zsaXICkfW7/aRqfHsynsMZ2EXANSd RxMNkbKXGNBkvDJzFmcA6yoFvTTI= X-Google-Smtp-Source: AGHT+IEtFh5dosQyLnXoA6W8OWsRvje+kOlHVKmiZSzWul4gSxyhQwBTQmyb0+ibl1JjA5TCQ6wWJCvmpoDmZ749C1c= X-Received: by 2002:ac2:4471:0:b0:52c:86eb:a2e6 with SMTP id 2adb3069b0e04-52ce063d744mr33007e87.4.1719047426252; Sat, 22 Jun 2024 02:10:26 -0700 (PDT) In-Reply-To: <87iky1qvqu.fsf@gmx.de> 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:287698 Archived-At: 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.