* bug#63633: Emacs becomes unresponsive when trying to ssh into localhost (MacOS)
@ 2023-05-21 22:11 Arteen Abrishami
2023-05-22 8:14 ` Michael Albinus
0 siblings, 1 reply; 9+ messages in thread
From: Arteen Abrishami @ 2023-05-21 22:11 UTC (permalink / raw)
To: 63633
[-- Attachment #1: Type: text/plain, Size: 748 bytes --]
I have a Linux VM that I ssh into from my MacOS machine. From the terminal, in shell, this looks like: `ssh user@localhost -p 2222`. This works.
I also am able to use tramp to ssh into a different machine. On the terminal, this looks like `ssh machinename`. For tramp I use `M-x dired <RET> /ssh:machinename:/home/user <RET>`.
I am trying to ssh into the localhost via emacs. I use `M-x dired <RET> /ssh:user@localhost#2222:/ <RET>`. This does not work. The message it will show is “Opening connection will for user@localhost using ssh…” forever.
Emacs will become unresponsive, and I will hear my fans very loudly. This continues for as long as I’ve let it. I have to Force Quit emacs. I am running GNU Emacs 30.0.50.
- Arteen
[-- Attachment #2: Type: text/html, Size: 1147 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#63633: Emacs becomes unresponsive when trying to ssh into localhost (MacOS)
2023-05-21 22:11 bug#63633: Emacs becomes unresponsive when trying to ssh into localhost (MacOS) Arteen Abrishami
@ 2023-05-22 8:14 ` Michael Albinus
2023-05-22 17:01 ` Arteen Abrishami
0 siblings, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2023-05-22 8:14 UTC (permalink / raw)
To: Arteen Abrishami; +Cc: 63633
Arteen Abrishami <arteen1000@gmail.com> writes:
Hi Arteen,
> I am trying to ssh into the localhost via emacs. I use `M-x dired
> <RET> /ssh:user@localhost#2222:/ <RET>`. This does not work. The
> message it will show is “Opening connection will for user@localhost
> using ssh…” forever.
>
> Emacs will become unresponsive, and I will hear my fans very loudly.
> This continues for as long as I’ve let it. I have to Force Quit emacs.
> I am running GNU Emacs 30.0.50.
Please run from the terminal
--8<---------------cut here---------------start------------->8---
# emacs -Q --eval '(setq tramp-verbose 10)' /ssh:user@localhost#2222:/
--8<---------------cut here---------------end--------------->8---
Interrupt with C-g if it hangs. There will be a buffer "*debug tramp/ssh
user@localhost#2222*" which will tell us what's up.
> - Arteen
Best regards, Michael.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#63633: Emacs becomes unresponsive when trying to ssh into localhost (MacOS)
2023-05-22 8:14 ` Michael Albinus
@ 2023-05-22 17:01 ` Arteen Abrishami
2023-05-22 17:23 ` Michael Albinus
0 siblings, 1 reply; 9+ messages in thread
From: Arteen Abrishami @ 2023-05-22 17:01 UTC (permalink / raw)
To: Michael Albinus; +Cc: 63633
> On May 22, 2023, at 1:14 AM, Michael Albinus <michael.albinus@gmx.de> wrote:
Hi Michael,
>
> --8<---------------cut here---------------start------------->8---
> # emacs -Q --eval '(setq tramp-verbose 10)' /ssh:user@localhost#2222:/
> --8<---------------cut here---------------end--------------->8—
>
Here’s the trace:
‘''
backtrace()
tramp-error(nil quit "")
tramp-signal-hook-function(quit nil)
signal(quit nil)
tramp-maybe-open-connection((tramp-file-name "ssh" "cs111" nil "localhost" "2222" "/" nil))
tramp-send-command((tramp-file-name "ssh" "cs111" nil "localhost" "2222" "/" nil) "test 0 2>/dev/null; echo tramp_exit_status $?")
tramp-send-command-and-check((tramp-file-name "ssh" "cs111" nil "localhost" "2222" "/" nil) "test 0")
tramp-get-test-command((tramp-file-name "ssh" "cs111" nil "localhost" "2222" "/" nil))
tramp-run-test((tramp-file-name "ssh" "cs111" nil "localhost" "2222" "/" nil) "-d" "/")
tramp-sh-handle-file-directory-p("/ssh:cs111@localhost#2222:/")
tramp-sh-file-name-handler(file-directory-p "/ssh:cs111@localhost#2222:/")
apply(tramp-sh-file-name-handler file-directory-p "/ssh:cs111@localhost#2222:/")
tramp-file-name-handler(file-directory-p "/ssh:cs111@localhost#2222:/")
file-directory-p("/ssh:cs111@localhost#2222:/")
find-file-noselect("/ssh:cs111@localhost#2222:/")
command-line-1(("--eval" "(setq tramp-verbose 10)" "/ssh:cs111@localhost#2222:/"))
command-line()
normal-top-level()
‘''
I also confirmed that an ssh from my terminal outside of emacs works.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#63633: Emacs becomes unresponsive when trying to ssh into localhost (MacOS)
2023-05-22 17:01 ` Arteen Abrishami
@ 2023-05-22 17:23 ` Michael Albinus
[not found] ` <3F1F258D-B45F-4550-9442-218CADB4C419@gmail.com>
0 siblings, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2023-05-22 17:23 UTC (permalink / raw)
To: Arteen Abrishami; +Cc: 63633
Arteen Abrishami <arteen1000@gmail.com> writes:
> Hi Michael,
Hi Arteen,
>> --8<---------------cut here---------------start------------->8---
>> # emacs -Q --eval '(setq tramp-verbose 10)' /ssh:user@localhost#2222:/
>> --8<---------------cut here---------------end--------------->8—
>
> Here’s the trace:
This is not what I've asked for. There is a Tramp debug buffer, which I
need to see. Please send it completely, as attachment.
Best regards, Michael.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#63633: Emacs becomes unresponsive when trying to ssh into localhost (MacOS)
[not found] ` <3F1F258D-B45F-4550-9442-218CADB4C419@gmail.com>
@ 2023-05-22 19:25 ` Michael Albinus
2023-05-22 21:33 ` Arteen Abrishami
2023-05-23 2:34 ` Eli Zaretskii
1 sibling, 1 reply; 9+ messages in thread
From: Michael Albinus @ 2023-05-22 19:25 UTC (permalink / raw)
To: Arteen Abrishami; +Cc: 63633
Arteen Abrishami <arteen1000@gmail.com> writes:
Hi Arteen,
> The trace I sent was under ‘*debug tramp*’. There is also another under *debug tramp/ssh cs111@localhost#2222*’. I’m attaching both. The second is quite large.
Thanks. I know it is large, but this is part of the analysis.
--8<---------------cut here---------------start------------->8---
> 11:21:04.120251 tramp-send-command (6) # exec ssh -l cs111 -p 2222 -o ControlMaster=auto -o ControlPath=tramp.%C -o ControlPersist=no -e none localhost
> 11:21:17.538440 tramp-search-regexp (1) # Quit: "Quit", ""
> Last login: Mon May 22 04:19:56 2023 from 10.0.2.2
> % [01;32mcs111@cs111[00m [01;34m~[00m [00m [?2004h
--8<---------------cut here---------------end--------------->8---
Tramp has sent the "ssh -l ..." command. As result, it tries to detect
the shell prompt. It fails, because there are escape control sequences.
Pls teach your remote host NOT to send these characters. The Tramp
manual discusses the case.
If your remote shell is zsh, for example, you must add to the remote
~/.zshrc file
--8<---------------cut here---------------start------------->8---
[[ $TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && return
--8<---------------cut here---------------end--------------->8---
Best regards, Michael.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#63633: Emacs becomes unresponsive when trying to ssh into localhost (MacOS)
2023-05-22 19:25 ` Michael Albinus
@ 2023-05-22 21:33 ` Arteen Abrishami
2023-05-23 7:42 ` Michael Albinus
0 siblings, 1 reply; 9+ messages in thread
From: Arteen Abrishami @ 2023-05-22 21:33 UTC (permalink / raw)
To: Michael Albinus; +Cc: 63633
Thanks. This works.
As an aside, I am finding that within the ssh session, inside eshell, if I update directory contents (via “rm” for example), it takes about 10 seconds for “ls” to recognize the fact that the file has been removed, and for the first few “ls” after removal it will note that the file is still there.
Would this be a separate issue?
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#63633: Emacs becomes unresponsive when trying to ssh into localhost (MacOS)
[not found] ` <3F1F258D-B45F-4550-9442-218CADB4C419@gmail.com>
2023-05-22 19:25 ` Michael Albinus
@ 2023-05-23 2:34 ` Eli Zaretskii
2023-05-23 7:16 ` Michael Albinus
1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2023-05-23 2:34 UTC (permalink / raw)
To: Arteen Abrishami; +Cc: 63633, michael.albinus
> Cc: 63633@debbugs.gnu.org
> Resent-To: 63633-quiet@debbugs.gnu.org
> From: Arteen Abrishami <arteen1000@gmail.com>
> Date: Mon, 22 May 2023 11:28:22 -0700
>
> > This is not what I've asked for. There is a Tramp debug buffer, which I
> > need to see. Please send it completely, as attachment.
> >
> The trace I sent was under ‘*debug tramp*’. There is also another under *debug tramp/ssh cs111@localhost#2222*’. I’m attaching both. The second is quite large.
Please always compress large (> 1MB) attachments. This one was 15MB.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#63633: Emacs becomes unresponsive when trying to ssh into localhost (MacOS)
2023-05-23 2:34 ` Eli Zaretskii
@ 2023-05-23 7:16 ` Michael Albinus
0 siblings, 0 replies; 9+ messages in thread
From: Michael Albinus @ 2023-05-23 7:16 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 63633, Arteen Abrishami
Eli Zaretskii <eliz@gnu.org> writes:
Hi Eli,
>> > This is not what I've asked for. There is a Tramp debug buffer, which I
>> > need to see. Please send it completely, as attachment.
>> >
>> The trace I sent was under ‘*debug tramp*’. There is also another under *debug tramp/ssh cs111@localhost#2222*’. I’m attaching both. The second is quite large.
>
> Please always compress large (> 1MB) attachments. This one was 15MB.
This was my fault, not the fault of Arteen. Sorry.
I'll try to be more precise with the instructions for traces I give to
users.
Best regards, Michael.
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#63633: Emacs becomes unresponsive when trying to ssh into localhost (MacOS)
2023-05-22 21:33 ` Arteen Abrishami
@ 2023-05-23 7:42 ` Michael Albinus
0 siblings, 0 replies; 9+ messages in thread
From: Michael Albinus @ 2023-05-23 7:42 UTC (permalink / raw)
To: Arteen Abrishami; +Cc: 63633-done
Arteen Abrishami <arteen1000@gmail.com> writes:
> Thanks. This works.
Thanks for the confirmation. Closing the bug.
> As an aside, I am finding that within the ssh session, inside eshell,
> if I update directory contents (via “rm” for example), it takes about
> 10 seconds for “ls” to recognize the fact that the file has been
> removed, and for the first few “ls” after removal it will note that
> the file is still there.
>
> Would this be a separate issue?
I cannot reproduce it here. Please check, which "rm" command you use,
you'll see it in the *eshell* buffer:
--8<---------------cut here---------------start------------->8---
~ $ which rm
eshell/rm is a byte-compiled Lisp function in ‘em-unix.el’.
--8<---------------cut here---------------end--------------->8---
If it is the same for you, please write a new bug report. Append the
contents of your *eshell* buffer in order to see the commands, and in
order to reproduce it locally.
Best regards, Michael.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-05-23 7:42 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-21 22:11 bug#63633: Emacs becomes unresponsive when trying to ssh into localhost (MacOS) Arteen Abrishami
2023-05-22 8:14 ` Michael Albinus
2023-05-22 17:01 ` Arteen Abrishami
2023-05-22 17:23 ` Michael Albinus
[not found] ` <3F1F258D-B45F-4550-9442-218CADB4C419@gmail.com>
2023-05-22 19:25 ` Michael Albinus
2023-05-22 21:33 ` Arteen Abrishami
2023-05-23 7:42 ` Michael Albinus
2023-05-23 2:34 ` Eli Zaretskii
2023-05-23 7:16 ` Michael Albinus
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).