GNU bug report logs - #50748
28.0.50; tramp-sh.el uses mknod file p which is not available on macos

Previous Next

Package: emacs;

Reported by: Damien Merenne <dam <at> cosinux.org>

Date: Thu, 23 Sep 2021 06:31:02 UTC

Severity: normal

Found in version 28.0.50

Fixed in version 28.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50748 in the body.
You can then email your comments to 50748 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#50748; Package emacs. (Thu, 23 Sep 2021 06:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Damien Merenne <dam <at> cosinux.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 23 Sep 2021 06:31:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Damien Merenne <dam <at> cosinux.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; tramp-sh.el uses mknod file p which is not available on macos
Date: Thu, 23 Sep 2021 08:29:53 +0200
I'm trying to use eglot over tramp using `emacs -Q -f package-initialize
-L /path/to/my/eglot -l eglot.el`. From what I understand, to
capture the remote process stderr, tramp creates a fifo, in
`tramp-sh-handle-make-process`, `tramp-sh.el:2889`. The MacOS mknod
command does not support the "p" parameter, so the communication with
the process does not work. Also no error is reported while the mknod
command is failing. I tried replacing `mknod %s p` with `mkfifo %s` or using gnu coreutils mknod. This
fixes the fifo creation but the process communication is still
broken after that.

I can reproduce the problem with

(let ((default-directory "/ssh:macos-laptop:"))
  (make-process
   :name "TEST"
   :buffer "*TEST*"
   :command '("sh" "-c" "while sleep 1; do echo $(hostname) out; echo $(hostname) err >&2; done")
   :connection-type 'pipe
   :coding 'utf-8-emacs-unix
   :noquery t
   :stderr (get-buffer-create "*TEST stderr*")
   :file-handler t))

And it works correctly with

(let ((default-directory "/ssh:localhost:"))
  (make-process
   :name "TEST"
   :buffer "*TEST*"
   :command '("sh" "-c" "while sleep 1; do echo $(hostname) out; echo $(hostname) err >&2; done")
   :connection-type 'pipe
   :coding 'utf-8-emacs-unix
   :noquery t
   :stderr (get-buffer-create "*TEST stderr*")
   :file-handler t))



In GNU Emacs 28.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.24.25, cairo version 1.16.0)
 of 2021-09-16 built on workstation.lan
Repository revision: 7f53446a10eaf029f73e637bba3c9c6bf7c33111
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101001
System Description: Ubuntu 21.04

Configured using:
 'configure --with-native-compilation --with-mailutils --with-gnutls
 --with-modules --with-json --without-gpm --with-file-notification=yes
 --with-xwidgets --without-selinux --with-libsystemd --with-jpeg
 --with-tiff --with-gif --with-png --with-rsvg --with-imagemagick
 CC=gcc-10'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ
IMAGEMAGICK JPEG JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP
NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM XWIDGETS GTK3 ZLIB

Important settings:
  value of $LC_MONETARY: fr_BE.UTF-8
  value of $LC_NUMERIC: fr_BE.UTF-8
  value of $LC_TIME: fr_BE.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: C++//lw

Minor modes in effect:
  cov-mode: t
  bloom-global-minor-mode: t
  bloom-minor-mode: t
  eglot--managed-mode: t
  flymake-mode: t
  flyspell-mode: t
  bug-reference-prog-mode: t
  magit-wip-after-apply-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  dtrt-indent-global-mode: t
  dtrt-indent-mode: t
  test-runner-mode: t
  pdf-occur-global-minor-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  subword-mode: t
  smartparens-global-mode: t
  smartparens-mode: t
  show-paren-mode: t
  auto-revert-mode: t
  marginalia-mode: t
  selectrum-mode: t
  corfu-global-mode: t
  corfu-mode: t
  global-ligature-mode: t
  ligature-mode: t
  shell-dirtrack-mode: t
  envrc-global-mode: t
  envrc-mode: t
  bepo-global-mode: t
  which-key-mode: t
  savehist-mode: t
  global-so-long-mode: t
  override-global-mode: t
  straight-use-package-mode: t
  straight-package-neutering-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  auto-fill-function: yas--auto-fill
  transient-mark-mode: t
  abbrev-mode: t

Load-path shadows:
/home/dam/.emacs.d/straight/build/transient/transient hides /usr/local/share/emacs/28.0.50/lisp/transient
/home/dam/.emacs.d/straight/build/jsonrpc/jsonrpc hides /usr/local/share/emacs/28.0.50/lisp/jsonrpc
/home/dam/.emacs.d/straight/build/xref/xref hides /usr/local/share/emacs/28.0.50/lisp/progmodes/xref
/home/dam/.emacs.d/straight/build/flymake/flymake hides /usr/local/share/emacs/28.0.50/lisp/progmodes/flymake
/home/dam/.emacs.d/straight/build/project/project hides /usr/local/share/emacs/28.0.50/lisp/progmodes/project
/home/dam/.emacs.d/straight/build/let-alist/let-alist hides /usr/local/share/emacs/28.0.50/lisp/emacs-lisp/let-alist
/home/dam/.emacs.d/straight/build/eldoc/eldoc hides /usr/local/share/emacs/28.0.50/lisp/emacs-lisp/eldoc

Features:
(shadow sort mail-extr pulse sh-script executable conf-mode rect
mm-archive network-stream url-cache goto-addr emacsbug sendmail helpful
trace edebug info-look help-fns elisp-refs tramp-cmds misearch
multi-isearch cov elquery mule-util terraform-mode hcl-mode vterm term
disp-table ehelp vterm-module term/xterm xterm face-remap vc-mtn vc-hg
vc-git vc-bzr vc-src vc-sccs vc-cvs vc-rcs vc vc-dispatcher checkdoc
form-feed bloomlife bloom-mode eglot array jsonrpc ert ewoc debug
backtrace bloom-sensor gdb-mi bloom-tools bloom-magit
bloom-magit-bitbucket atlassian-bitbucket bloom-magit-build
bloom-project bloom-test-runner bloom-build bloom-cmake bloom-conan
bloom-bbw bloom-target bloom-common bloom-pkg bloomlife-autoloads
autoload radix-tree lisp-mnt sonar sonar-autoloads circleci
circleci-autoloads atlassian atlassian-jira atlassian-common request
atlassian-autoloads request-autoloads magit-async-section
magit-async-section-autoloads terraform-mode-autoloads
hcl-mode-autoloads cargo-autoloads racer smartparens-rust rust-utils
rust-mode rust-rustfmt rust-playpen rust-compile rust-cargo
racer-autoloads pos-tip-autoloads rust-mode-autoloads rubocop
rubocop-autoloads robe etags fileloop generator inf-ruby robe-autoloads
inf-ruby-autoloads rbenv rbenv-autoloads ruby-mode smie
smartparens-python python tramp-sh smartparens-scala scala-mode
scala-mode-prettify-symbols scala-mode-imenu scala-mode-map
scala-mode-fontlock scala-mode-indent scala-mode-paragraph
scala-mode-syntax scala-mode-lib scala-mode-autoloads java-imports
pcache eieio-base java-imports-autoloads pcache-autoloads
form-feed-autoloads elisp-format flymake-proc flymake flyspell
elisp-format-autoloads test-runner-ert elfmt elfmt-autoloads cask-mode
cask-mode-autoloads docker docker-volume docker-network docker-machine
docker-image docker-container docker-faces docker-compose docker-utils
json-mode json-reformat json-snatcher smartparens-javascript js
docker-core docker-autoloads json-mode-autoloads json-snatcher-autoloads
json-reformat-autoloads docker-tramp-autoloads docker-tramp tramp-cache
dockerfile-mode-autoloads djinni-mode djinni-mode-autoloads
cov-autoloads elquery-autoloads gud-lldb cmake-api cmake-api-autoloads
test-runner-catch2 test-runner-catch2-autoloads eglot-clangd-autoloads
eldoc-cmake eldoc-cmake-autoloads cmake-font-lock-autoloads cmake-mode
smartparens-rst rst cmake-mode-autoloads android android-autoloads pbuf
pbuf-autoloads gud xref forge-list forge-commands forge-semi
forge-bitbucket buck forge-gogs gogs forge-gitea gtea forge-gitlab glab
forge-github forge-notify forge-revnote forge-pullreq forge-issue
forge-topic yaml bug-reference forge-post forge-repo forge forge-core
forge-db forge-autoloads yaml-autoloads closql emacsql-sqlite emacsql
emacsql-compiler closql-autoloads emacsql-sqlite-autoloads
emacsql-autoloads ghub-graphql treepy gsexp ghub url-http url-gw nsm
url-auth ghub-autoloads treepy-autoloads magit-extras magit-bookmark
magit-submodule magit-obsolete magit-blame magit-stash magit-reflog
magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote
magit-commit magit-sequence magit-notes magit-worktree magit-tag
magit-merge magit-branch magit-reset magit-files magit-refs magit-status
magit magit-repos magit-apply magit-wip magit-log which-func magit-diff
smerge-mode diff-mode git-commit log-edit message rmc rfc822 mml mml-sec
epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader pcvs-util add-log
magit-core magit-autorevert magit-margin magit-transient magit-process
with-editor server magit-mode transient comp comp-cstr warnings
magit-git magit-section magit-utils magit-autoloads
magit-section-autoloads git-commit-autoloads with-editor-autoloads
transient-autoloads eglot-autoloads project-autoloads xref-autoloads
flymake-autoloads eldoc-autoloads jsonrpc-autoloads dtrt-indent
dtrt-indent-autoloads diff ispell reformatter reformatter-autoloads
test-runner project test-runner-autoloads vterm-autoloads ag vc-svn
find-dired ag-autoloads dired-collapse dired-collapse-autoloads
dired-rainbow dired-rainbow-autoloads dired-narrow delsel
dired-narrow-autoloads dired-ranger-autoloads dired-subtree-autoloads
dired-filter f s dired-hacks-utils dired-x dired-filter-autoloads
dired-hacks-utils-autoloads dired-aux yaml-mode-autoloads plantuml-mode
plantuml-mode-autoloads pdf-occur ibuf-ext ibuffer ibuffer-loaddefs
tablist tablist-filter semantic/wisent/comp semantic/wisent
semantic/wisent/wisent semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw mode-local find-func cedet
pdf-isearch let-alist pdf-misc imenu pdf-tools package pdf-view
jka-compr pdf-cache pdf-info tq pdf-util pdf-macs pdf-tools-autoloads
let-alist-autoloads tablist-autoloads xwwp eww xdg url-queue shr kinsoku
svg dom mm-url gnus nnheader gnus-util rmail rmail-loaddefs rfc2047
rfc2045 ietf-drums mail-utils mm-util mail-prsvr xwwp-autoloads xwidget
url-handlers image-mode dired dired-loaddefs exif browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap osx-browse-autoloads
browse-url-dwim-autoloads string-utils-autoloads list-utils-autoloads cl
smartparens-markdown markdown-mode url-parse url-vars noutline outline
markdown-mode-autoloads nov-autoloads esxml-autoloads kv-autoloads
yasnippet yasnippet-autoloads wgrep grep compile wgrep-autoloads
cap-words superword subword string-inflection
string-inflection-autoloads smartparens-config smartparens-text
smartparens-c smartparens-ruby smartparens dash smartparens-autoloads
cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs paren mmm-mode mmm-univ mmm-class mmm-region mmm-auto
mmm-vars mmm-utils mmm-compat mmm-mode-autoloads iedit iedit-lib
iedit-autoloads autorevert filenotify marginalia marginalia-autoloads
embark-consult-autoloads embark-autoloads consult-selectrum selectrum
minibuf-eldef crm selectrum-autoloads orderless orderless-autoloads
corfu corfu-autoloads ns-auto-titlebar-autoloads
all-the-icons-dired-autoloads all-the-icons all-the-icons-faces
data-material data-weathericons data-octicons data-fileicons
data-faicons data-alltheicons all-the-icons-autoloads rx ligature
ligature-autoloads solarized-dark-high-contrast-theme solarized-palettes
solarized-theme solarized solarized-faces color
solarized-theme-autoloads use-theme use-theme-autoloads tramp
tramp-loaddefs trampver tramp-integration files-x tramp-compat shell
pcomplete comint ring parse-time iso8601 time-date ls-lisp auth-source
eieio eieio-core eieio-loaddefs password-cache envrc inheritenv
ansi-color envrc-autoloads inheritenv-autoloads eshell esh-cmd esh-ext
esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util bepo
which-key advice which-key-autoloads time savehist edmacro
helpful-autoloads elisp-refs-autoloads f-autoloads s-autoloads
dash-autoloads exec-path-from-shell exec-path-from-shell-autoloads
so-long diminish diminish-autoloads consult-dash pcase consult recentf
tree-widget kmacro bookmark text-property-search consult-dash-autoloads
consult-autoloads dash-docs use-package-dash-docs gnutls puny thingatpt
format-spec xml json map dash-docs-autoloads async async-autoloads
no-littering no-littering-autoloads finder-inf
use-package-ensure-system-package system-packages
use-package-ensure-system-package-autoloads system-packages-autoloads
use-package use-package-ensure use-package-delight use-package-diminish
use-package-bind-key bind-key easy-mmode use-package-core
use-package-autoloads bind-key-autoloads cus-edit pp cus-load wid-edit
straight-autoloads info cl-seq cl-extra help-mode seq byte-opt straight
subr-x cl-macs gv cl-loaddefs cl-lib bytecomp byte-compile cconv
iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads
xwidget-internal dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit
x multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 1171416 99492)
 (symbols 48 48827 4)
 (strings 32 188566 42756)
 (string-bytes 1 7819478)
 (vectors 16 95165)
 (vector-slots 8 2534894 561288)
 (floats 8 840 2000)
 (intervals 56 71789 3857)
 (buffers 992 60))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50748; Package emacs. (Thu, 23 Sep 2021 12:40:01 GMT) Full text and rfc822 format available.

Message #8 received at 50748 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Damien Merenne <dam <at> cosinux.org>
Cc: 50748 <at> debbugs.gnu.org
Subject: Re: bug#50748: 28.0.50; tramp-sh.el uses mknod file p which is not
 available on macos
Date: Thu, 23 Sep 2021 14:39:20 +0200
Damien Merenne <dam <at> cosinux.org> writes:

Hi Damien,

> I'm trying to use eglot over tramp using `emacs -Q -f package-initialize
> -L /path/to/my/eglot -l eglot.el`. From what I understand, to
> capture the remote process stderr, tramp creates a fifo, in
> `tramp-sh-handle-make-process`, `tramp-sh.el:2889`. The MacOS mknod
> command does not support the "p" parameter, so the communication with
> the process does not work. Also no error is reported while the mknod
> command is failing.

Thanks for the bug report.

I've pushed a fix to the master branch, checking for a proper mknod or
mkfifo command on the remote side.

> I tried replacing `mknod %s p` with `mkfifo %s` or using gnu coreutils mknod. This
> fixes the fifo creation but the process communication is still
> broken after that.

I don't use macOS, so it's hard to test. Testing it locally, on a remote
Fedora machine, using mkfifo instead of mknod, works fine.

Could you please check whether my patch works for you? In case it
doesn't, please reproduce the problem with `tramp-verbose' set to
6. Show us the Tramp debug buffer then.

Btw, what would be the macOS equivalent to `mknod <file> p`?

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50748; Package emacs. (Thu, 23 Sep 2021 13:51:01 GMT) Full text and rfc822 format available.

Message #11 received at 50748 <at> debbugs.gnu.org (full text, mbox):

From: Damien Merenne <dam <at> cosinux.org>
To: 50748 <at> debbugs.gnu.org
Subject: Re: bug#50748: Acknowledgement (28.0.50; tramp-sh.el uses mknod file
 p which is not available on macos)
Date: Thu, 23 Sep 2021 13:50:22 +0000
[Message part 1 (text/plain, inline)]
Thanks for looking at this so quickly!

No idea about the equivalent mknod command. Using strace on Linux shows
that both `mknod p` and `mkfifo` results in the exact same `mknodat` system
call so `mkfifo` could probably be always used ?

It's still not working, I don't see any error regarding the mkfifo now, I
attached the tramp debug buffer. I tried creating the fifo manually on the
macos laptop and running the command

cd /Users/dam/ &&  exec  2>'/tmp/tramp.EIPAXu' env
INSIDE_EMACS\=28.0.50\,tramp\:2.5.2-pre PS1\=/ssh\:laptop.lan\:/Users/dam/\
\#\$\  sh -c while\ sleep\ 1\;\ do\ echo\ \$\(hostname\)\ out\;\ echo\
\$\(hostname\)\ err\ \>\&2\;\ done

And there, it's working, I can cat the fifo and see the stderr output. No
idea why tramp seems to stall. Running over tramp there is just no output
in the stdout nor the stderr buffer.


Le jeu. 23 sept. 2021 à 06:31, GNU bug Tracking System <help-debbugs <at> gnu.org>
a écrit :

> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
>  bug-gnu-emacs <at> gnu.org
>
> If you wish to submit further information on this problem, please
> send it to 50748 <at> debbugs.gnu.org.
>
> Please do not send mail to help-debbugs <at> gnu.org unless you wish
> to report a problem with the Bug-tracking system.
>
> --
> 50748: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=50748
> GNU Bug Tracking System
> Contact help-debbugs <at> gnu.org with problems
>
[Message part 2 (text/html, inline)]
[tramp-debug.txt (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50748; Package emacs. (Thu, 23 Sep 2021 14:59:02 GMT) Full text and rfc822 format available.

Message #14 received at 50748 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Damien Merenne <dam <at> cosinux.org>
Cc: 50748 <at> debbugs.gnu.org
Subject: Re: bug#50748: Acknowledgement (28.0.50; tramp-sh.el uses mknod
 file p which is not available on macos)
Date: Thu, 23 Sep 2021 16:58:20 +0200
Damien Merenne <dam <at> cosinux.org> writes:

Hi Damien,

> No idea about the equivalent mknod command. Using strace on Linux
> shows that both `mknod p` and `mkfifo` results in the exact same
> `mknodat` system call so `mkfifo` could probably be always used ?

Nope. There are GNU/Linux systems, which do not offer the mkfifo
command. For example, my QNAP NAS (which I misuse as test target).

> It's still not working, I don't see any error regarding the mkfifo
> now, I attached the tramp debug buffer. I tried creating the fifo
> manually on the macos laptop and running the command
>
> cd /Users/dam/ &&  exec  2>'/tmp/tramp.EIPAXu' env
> INSIDE_EMACS\=28.0.50\,tramp\:2.5.2-pre
> PS1\=/ssh\:laptop.lan\:/Users/dam/\ \#\$\  sh -c while\ sleep\ 1\;\
> do\ echo\ \$\(hostname\)\ out\;\ echo\ \$\(hostname\)\ err\ \>\&2\;\
> done
>
> And there, it's working, I can cat the fifo and see the stderr output.
> No idea why tramp seems to stall. Running over tramp there is just no
> output in the stdout nor the stderr buffer.

Hmm. The provided traces look as they should. Perhaps we're missing
accept-process-output calls?

Could you, please, add to your test:

(while t
  (accept-process-output)
  (sit-for 0.1))

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50748; Package emacs. (Fri, 24 Sep 2021 17:00:02 GMT) Full text and rfc822 format available.

Message #17 received at 50748 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Damien Merenne <dam <at> cosinux.org>
Cc: 50748 <at> debbugs.gnu.org
Subject: Re: bug#50748: Acknowledgement (28.0.50; tramp-sh.el uses mknod
 file p which is not available on macos)
Date: Fri, 24 Sep 2021 18:59:14 +0200
Damien Merenne <dam <at> cosinux.org> writes:

Hi Damien,

> That's the culprit, it working without the `stty -icrnl` command. I
> tried in on a normal ssh session and that command is not failing, so I
> guess its not behaving as expected, no idea why...

Ah, good. Pls revert the patch, set tramp-verbose to 10, and rerun the
test. Send the resulting Tramp debug buffer.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50748; Package emacs. (Sat, 25 Sep 2021 07:45:02 GMT) Full text and rfc822 format available.

Message #20 received at 50748 <at> debbugs.gnu.org (full text, mbox):

From: Damien Merenne <dam <at> cosinux.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 50748 <at> debbugs.gnu.org
Subject: Re: bug#50748: Acknowledgement (28.0.50; tramp-sh.el uses mknod file
 p which is not available on macos)
Date: Sat, 25 Sep 2021 07:44:36 +0000
[Message part 1 (text/plain, inline)]
Here it is, I also attached one with the stty command commented out for
reference.
-- 
Damien MERENNE   <dam <at> cosinux.org>


Le ven. 24 sept. 2021 à 16:59, Michael Albinus <michael.albinus <at> gmx.de> a
écrit :

> Damien Merenne <dam <at> cosinux.org> writes:
>
> Hi Damien,
>
> > That's the culprit, it working without the `stty -icrnl` command. I
> > tried in on a normal ssh session and that command is not failing, so I
> > guess its not behaving as expected, no idea why...
>
> Ah, good. Pls revert the patch, set tramp-verbose to 10, and rerun the
> test. Send the resulting Tramp debug buffer.
>
> Best regards, Michael.
>
[Message part 2 (text/html, inline)]
[tramp-l10.log (text/x-log, attachment)]
[tramp-without-stty.log (text/x-log, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50748; Package emacs. (Sat, 25 Sep 2021 13:04:01 GMT) Full text and rfc822 format available.

Message #23 received at 50748 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Damien Merenne <dam <at> cosinux.org>
Cc: 50748 <at> debbugs.gnu.org
Subject: Re: bug#50748: Acknowledgement (28.0.50; tramp-sh.el uses mknod
 file p which is not available on macos)
Date: Sat, 25 Sep 2021 15:03:31 +0200
[Message part 1 (text/plain, inline)]
Damien Merenne <dam <at> cosinux.org> writes:

Hi Damien,

> Here it is, I also attached one with the stty command commented out
> for reference.

Nothing special in the traces, everything looks normal. So I would apply
the following patch, could you pls test?

[Message part 2 (text/x-patch, inline)]
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 7f1a52fa93..81b99b7c3c 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2938,7 +2938,11 @@ tramp-sh-handle-make-process
 			    (process-put p 'remote-pid pid)
 			    (tramp-set-connection-property p "remote-pid" pid))
 			  ;; Disable carriage return to newline translation.
-			  (when (memq connection-type '(nil pipe))
+			  (when (and (memq connection-type '(nil pipe))
+                                     (not (string-match-p
+		                           "Darwin"
+		                           (tramp-get-connection-property
+                                            v "uname" ""))))
 			    (tramp-send-command v "stty -icrnl"))
 			  ;; `tramp-maybe-open-connection' and
 			  ;; `tramp-send-command-and-read' could have
[Message part 3 (text/plain, inline)]
Best regards, Michael.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50748; Package emacs. (Sun, 26 Sep 2021 08:43:02 GMT) Full text and rfc822 format available.

Message #26 received at 50748 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Damien Merenne <dam <at> cosinux.org>
Cc: 50748 <at> debbugs.gnu.org
Subject: Re: bug#50748: Acknowledgement (28.0.50; tramp-sh.el uses mknod
 file p which is not available on macos)
Date: Sun, 26 Sep 2021 10:42:23 +0200
Michael Albinus <michael.albinus <at> gmx.de> writes:

Hi Damien,

>> Here it is, I also attached one with the stty command commented out
>> for reference.
>
> Nothing special in the traces, everything looks normal. So I would apply
> the following patch, could you pls test?

I have pushed this (slightly extended) to the master branch.

Additionally to your own tests, could you pls also run the following,
and show the result?

# make -C test tramp-tests SELECTOR=tramp-test30-make-process

I have instrumented this test case for macOS, so I can adapt it for
proper results then.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50748; Package emacs. (Tue, 28 Sep 2021 08:11:02 GMT) Full text and rfc822 format available.

Message #29 received at 50748 <at> debbugs.gnu.org (full text, mbox):

From: Damien Merenne <dam <at> cosinux.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 50748 <at> debbugs.gnu.org
Subject: Re: bug#50748: Acknowledgement (28.0.50; tramp-sh.el uses mknod file
 p which is not available on macos)
Date: Tue, 28 Sep 2021 08:10:27 +0000
[Message part 1 (text/plain, inline)]
Hello,

It's working now:

$ make -C test tramp-tests SELECTOR=tramp-test30-make-process
make: Entering directory '/home/dam/.local/Cellar/emacs/test'
make[1]: Entering directory '/home/dam/.local/Cellar/emacs/test'
  GEN      lisp/net/tramp-tests.log
Running 1 tests (2021-09-28 10:09:22+0200, selector
`tramp-test30-make-process')
   passed  1/1  tramp-test30-make-process (0.585906 sec)

Ran 1 tests, 1 results as expected, 0 unexpected (2021-09-28 10:09:22+0200,
0.586014 sec)

My test is also okay.

A big thank you for your help and time!

-- 
Damien MERENNE   <dam <at> cosinux.org>


Le dim. 26 sept. 2021 à 08:42, Michael Albinus <michael.albinus <at> gmx.de> a
écrit :

> Michael Albinus <michael.albinus <at> gmx.de> writes:
>
> Hi Damien,
>
> >> Here it is, I also attached one with the stty command commented out
> >> for reference.
> >
> > Nothing special in the traces, everything looks normal. So I would apply
> > the following patch, could you pls test?
>
> I have pushed this (slightly extended) to the master branch.
>
> Additionally to your own tests, could you pls also run the following,
> and show the result?
>
> # make -C test tramp-tests SELECTOR=tramp-test30-make-process
>
> I have instrumented this test case for macOS, so I can adapt it for
> proper results then.
>
> Best regards, Michael.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50748; Package emacs. (Tue, 28 Sep 2021 09:37:02 GMT) Full text and rfc822 format available.

Message #32 received at 50748 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Damien Merenne <dam <at> cosinux.org>
Cc: 50748 <at> debbugs.gnu.org
Subject: Re: bug#50748: Acknowledgement (28.0.50; tramp-sh.el uses mknod
 file p which is not available on macos)
Date: Tue, 28 Sep 2021 11:36:35 +0200
Damien Merenne <dam <at> cosinux.org> writes:

> Hello,

Hi Damien,

> It's working now:
>
> $ make -C test tramp-tests SELECTOR=tramp-test30-make-process
> make: Entering directory '/home/dam/.local/Cellar/emacs/test'
> make[1]: Entering directory '/home/dam/.local/Cellar/emacs/test'
>   GEN      lisp/net/tramp-tests.log
> Running 1 tests (2021-09-28 10:09:22+0200, selector
> `tramp-test30-make-process')
>    passed  1/1  tramp-test30-make-process (0.585906 sec)
>
> Ran 1 tests, 1 results as expected, 0 unexpected (2021-09-28
> 10:09:22+0200, 0.586014 sec)

Thanks. However, I made an error: Running Tramp tests like this, only a
connection to the local host is tested. Could you please try instead

$ env REMOTE_TEMPORARY_FILE_DIRECTORY='/ssh:laptop.lan:/tmp' make -C test tramp-tests SELECTOR=tramp-test30-make-process

This will give me the required information for macOS.

> My test is also okay.

Good to know.

> A big thank you for your help and time!

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50748; Package emacs. (Tue, 28 Sep 2021 12:02:01 GMT) Full text and rfc822 format available.

Message #35 received at 50748 <at> debbugs.gnu.org (full text, mbox):

From: Damien Merenne <dam <at> cosinux.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 50748 <at> debbugs.gnu.org
Subject: Re: bug#50748: Acknowledgement (28.0.50; tramp-sh.el uses mknod file
 p which is not available on macos)
Date: Tue, 28 Sep 2021 12:00:44 +0000
[Message part 1 (text/plain, inline)]
> $ env REMOTE_TEMPORARY_FILE_DIRECTORY='/ssh:laptop.lan:/tmp' make -C test
tramp-tests SELECTOR=tramp-test30-make-process

env REMOTE_TEMPORARY_FILE_DIRECTORY='/ssh:laptop.lan:/tmp' make -C test
tramp-tests SELECTOR=tramp-test30-make-process
make: Entering directory '/home/dam/.local/Cellar/emacs/test'
make[1]: Entering directory '/home/dam/.local/Cellar/emacs/test'
  GEN      lisp/net/tramp-tests.log
Running 1 tests (2021-09-28 13:59:35+0200, selector
`tramp-test30-make-process')
process-connection-type nil
"66\n6F\n6F\n0A\n0A\n"
process-connection-type pipe
"66\n6F\n6F\n0A\n0A\n"
process-connection-type t
"66\n6F\n6F\n0A\n0A\n"
process-connection-type pty
"66\n6F\n6F\n0A\n0A\n"
process-connection-type nil
"66\n6F\n6F\n0A\n0A\n"
process-connection-type pipe
"66\n6F\n6F\n0A\n0A\n"
process-connection-type t
"66\n6F\n6F\n0A\n0A\n"
process-connection-type pty
"66\n6F\n6F\n0A\n0A\n"
   passed  1/1  tramp-test30-make-process (10.930992 sec)

Ran 1 tests, 1 results as expected, 0 unexpected (2021-09-28 13:59:46+0200,
10.931095 sec)
-- 
Damien MERENNE   <dam <at> cosinux.org>
[Message part 2 (text/html, inline)]

Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Tue, 28 Sep 2021 14:07:01 GMT) Full text and rfc822 format available.

Notification sent to Damien Merenne <dam <at> cosinux.org>:
bug acknowledged by developer. (Tue, 28 Sep 2021 14:07:01 GMT) Full text and rfc822 format available.

Message #40 received at 50748-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Damien Merenne <dam <at> cosinux.org>
Cc: 50748-done <at> debbugs.gnu.org
Subject: Re: bug#50748: Acknowledgement (28.0.50; tramp-sh.el uses mknod
 file p which is not available on macos)
Date: Tue, 28 Sep 2021 16:06:03 +0200
Version: 28.1

Damien Merenne <dam <at> cosinux.org> writes:

Hi Damien,

>> $ env REMOTE_TEMPORARY_FILE_DIRECTORY='/ssh:laptop.lan:/tmp' make -C
> test tramp-tests SELECTOR=tramp-test30-make-process
>
> env REMOTE_TEMPORARY_FILE_DIRECTORY='/ssh:laptop.lan:/tmp' make -C
> test tramp-tests SELECTOR=tramp-test30-make-process
> make: Entering directory '/home/dam/.local/Cellar/emacs/test'
> make[1]: Entering directory '/home/dam/.local/Cellar/emacs/test'
>   GEN      lisp/net/tramp-tests.log
> Running 1 tests (2021-09-28 13:59:35+0200, selector
> `tramp-test30-make-process')
> process-connection-type nil
> "66\n6F\n6F\n0A\n0A\n"
> process-connection-type pipe
> "66\n6F\n6F\n0A\n0A\n"
> process-connection-type t
> "66\n6F\n6F\n0A\n0A\n"
> process-connection-type pty
> "66\n6F\n6F\n0A\n0A\n"
> process-connection-type nil
> "66\n6F\n6F\n0A\n0A\n"
> process-connection-type pipe
> "66\n6F\n6F\n0A\n0A\n"
> process-connection-type t
> "66\n6F\n6F\n0A\n0A\n"
> process-connection-type pty
> "66\n6F\n6F\n0A\n0A\n"
>    passed  1/1  tramp-test30-make-process (10.930992 sec)
>
> Ran 1 tests, 1 results as expected, 0 unexpected (2021-09-28
> 13:59:46+0200, 10.931095 sec)

Thanks, this looks like expected. So I have adapted tramp-tests.el, and
pushed it to master. Closing the bug report.

As you know, I have no macOS machine for testing. Perhaps you could run
the whole test suite, and see whether there are problems? The call is

$ env REMOTE_TEMPORARY_FILE_DIRECTORY='/ssh:laptop.lan:/tmp' make -C test tramp-tests

Thanks, and best regards, Michael.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 27 Oct 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 174 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.