all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* remote tramp hangs
@ 2009-12-01 11:03 Raphaël Berbain
  2009-12-01 18:16 ` Andreas Politz
                   ` (7 more replies)
  0 siblings, 8 replies; 26+ messages in thread
From: Raphaël Berbain @ 2009-12-01 11:03 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I am having problems making tramp work.  In a nutshell, "/remotehost:"
works, but "/root@remotehost:" doesn't work, though I can passwordlessly
ssh/scp root@remotehost.  It hangs with the message "Tramp: Found remote
shell prompt on `remotehost'".

Data that may or may not help: miaou=localhost is ubuntu 9.10,
harry=remotehost is openbsd 4.5.  emacs is compiled from
http://bzr.savannah.gnu.org/r/emacs/trunk, revno 98852.  M-x version
says "GNU Emacs 23.1.50.1 (x86_64-unknown-linux-gnu) of 2009-11-30 on
miaou", M-x tramp-version says "2.1.18-pre".  I get the same results
with emacs23* / emacs-snapshot* ubuntu packages and/or tramp cvs,
though.  I also tried a bunch of different tramp methods (ssh, sshx,
scpc, ...) and always get the same behaviour.

What I am doing:

rgb@miaou:~$ emacs -Q
M-: (require 'tramp) RET
M-: (setq debug-on-quit t tramp-verbose 10) RET
C-x C-f /root@harry: RET

then I wait for some time, and when it appears hung interrupt with C-g.

Messages:

("emacs")
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading tramp... [3 times]
compiling byte-compile-normal-call...done
compiling byte-compile-form...done
compiling byte-compile-body...done
compiling byte-compile-top-level...done
compiling byte-compile-out-toplevel...done
compiling byte-compile-constant...done
compiling byte-compile-variable-ref...done
compiling byte-optimize-form...done
compiling byte-optimize-body...done
compiling byte-optimize-predicate...done
compiling byte-optimize-binary-predicate...done
compiling byte-optimize-form-code-walker...done
compiling byte-optimize-lapcode...done
tramp
10 (#o12, #xa)
Tramp: Opening connection for root@harry using scp...
Tramp: Waiting 60s for local shell to come up...
Tramp: Sending command `ssh harry -l root  -q -e none && exit || exit'
Tramp: Waiting for prompts from remote shell
Tramp: Found remote shell prompt on `harry'
Entering debugger...

Backtrace:

Debugger entered--Lisp error: (quit)
  accept-process-output(#<process *tramp/scp root@harry*> 1 nil)
  (progn (accept-process-output proc timeout timeout-msecs))
  (setq with-timeout-value (progn (accept-process-output proc timeout timeout-msecs)))
  (progn (setq with-timeout-timer (run-with-timer ... nil ... with-timeout-tag)) (push with-timeout-timer with-timeout-timers) (setq with-timeout-value (progn ...)) nil)
  (catch with-timeout-tag (progn (setq with-timeout-timer ...) (push with-timeout-timer with-timeout-timers) (setq with-timeout-value ...) nil))
  (if (catch with-timeout-tag (progn ... ... ... nil)) (progn) (cancel-timer with-timeout-timer) with-timeout-value)
  (let ((with-timeout-tag ...) with-timeout-value with-timeout-timer (with-timeout-timers with-timeout-timers)) (if (catch with-timeout-tag ...) (progn) (cancel-timer with-timeout-timer) with-timeout-value))
  (with-timeout ((or timeout 1)) (accept-process-output proc timeout timeout-msecs))
  (let (buffer-read-only last-coding-system-used) (with-timeout (...) (accept-process-output proc timeout timeout-msecs)))
  (save-current-buffer (set-buffer (process-buffer proc)) (tramp-message proc 10 "%s %s" proc (process-status proc)) (let (buffer-read-only last-coding-system-used) (with-timeout ... ...)) (tramp-message proc 10 "\n%s" (buffer-string)))
  (with-current-buffer (process-buffer proc) (tramp-message proc 10 "%s %s" proc (process-status proc)) (let (buffer-read-only last-coding-system-used) (with-timeout ... ...)) (tramp-message proc 10 "\n%s" (buffer-string)))
  tramp-accept-process-output(#<process *tramp/scp root@harry*> 1)
  (while (not found) (tramp-accept-process-output proc 1) (unless (memq ... ...) (tramp-error-with-buffer nil proc ... "Process has died")) (setq found (tramp-check-for-regexp proc regexp)))
  (cond (timeout (while ... ...)) (t (while ... ... ... ...)))
  (let ((found ...) (start-time ...)) (cond (timeout ...) (t ...)) (tramp-message proc 6 "\n%s" (buffer-string)) (when (not found) (if timeout ... ...)) found)
  (save-current-buffer (set-buffer (process-buffer proc)) (let (... ...) (cond ... ...) (tramp-message proc 6 "\n%s" ...) (when ... ...) found))
  (with-current-buffer (process-buffer proc) (let (... ...) (cond ... ...) (tramp-message proc 6 "\n%s" ...) (when ... ...) found))
  tramp-wait-for-regexp(#<process *tramp/scp root@harry*> nil "\\(^\\|

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
  2009-12-01 11:03 remote tramp hangs Raphaël Berbain
@ 2009-12-01 18:16 ` Andreas Politz
  2009-12-01 19:04 ` Peter Dyballa
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 26+ messages in thread
From: Andreas Politz @ 2009-12-01 18:16 UTC (permalink / raw)
  To: help-gnu-emacs

raphael.berbain@gmail.com (Raphaël Berbain) writes:

> Hi,
>
> I am having problems making tramp work.  In a nutshell, "/remotehost:"
> works, but "/root@remotehost:" doesn't work, though I can passwordlessly
> ssh/scp root@remotehost.  It hangs with the message "Tramp: Found remote
> shell prompt on `remotehost'".
>
>
> Messages:
>

Tramp logs everything in some *tramp-debug* buffer, probably
tramp-verbose dependent.  I suspect the contents of this buffer would be
even more helpfull to you or others.

-ap





^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
  2009-12-01 11:03 remote tramp hangs Raphaël Berbain
  2009-12-01 18:16 ` Andreas Politz
@ 2009-12-01 19:04 ` Peter Dyballa
  2009-12-01 19:47 ` Harry Putnam
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 26+ messages in thread
From: Peter Dyballa @ 2009-12-01 19:04 UTC (permalink / raw)
  To: Raphaël Berbain; +Cc: help-gnu-emacs


Am 01.12.2009 um 12:03 schrieb Raphaël Berbain:

> In a nutshell, "/remotehost:" works, but "/root@remotehost:" doesn't  
> work


Because don't give the method! Your debug output shows that scp is  
being used...

--
Greetings

   Pete

When people run around and around in circles we say they are crazy.  
When planets do it we say they are orbiting.





^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
  2009-12-01 11:03 remote tramp hangs Raphaël Berbain
  2009-12-01 18:16 ` Andreas Politz
  2009-12-01 19:04 ` Peter Dyballa
@ 2009-12-01 19:47 ` Harry Putnam
  2009-12-01 20:12 ` Michael Albinus
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 26+ messages in thread
From: Harry Putnam @ 2009-12-01 19:47 UTC (permalink / raw)
  To: help-gnu-emacs

raphael.berbain@gmail.com (Raphaël Berbain) writes:

> Hi,
>
> I am having problems making tramp work.  In a nutshell, "/remotehost:"
> works, but "/root@remotehost:" doesn't work, though I can passwordlessly
> ssh/scp root@remotehost.  It hangs with the message "Tramp: Found remote
> shell prompt on `remotehost'".

I think Peter D has put you on the right track but since no one here
has mentioned it so far, another way to gather some info and maybe see
how the root shell is responding is to do a direct ssh but with the -v
set and even -vv:

ssh -vv root@problemhost





^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
  2009-12-01 11:03 remote tramp hangs Raphaël Berbain
                   ` (2 preceding siblings ...)
  2009-12-01 19:47 ` Harry Putnam
@ 2009-12-01 20:12 ` Michael Albinus
       [not found] ` <mailman.11972.1259694305.2239.help-gnu-emacs@gnu.org>
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 26+ messages in thread
From: Michael Albinus @ 2009-12-01 20:12 UTC (permalink / raw)
  To: help-gnu-emacs

raphael.berbain@gmail.com (Raphaël Berbain) writes:

> Hi,

Hi,

> What I am doing:
>
> rgb@miaou:~$ emacs -Q
> M-: (require 'tramp) RET
> M-: (setq debug-on-quit t tramp-verbose 10) RET

That is good. Please show the resulting buffer *debug tramp/scp root@harry*

Best regards, Michael.




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
       [not found] ` <mailman.11972.1259694305.2239.help-gnu-emacs@gnu.org>
@ 2009-12-01 21:46   ` Raphaël Berbain
  0 siblings, 0 replies; 26+ messages in thread
From: Raphaël Berbain @ 2009-12-01 21:46 UTC (permalink / raw)
  To: help-gnu-emacs

* Peter Dyballa:

> Am 01.12.2009 um 12:03 schrieb Raphaël Berbain:
>
>> In a nutshell, "/remotehost:" works, but "/root@remotehost:" doesn't
>> work
>
> Because don't give the method! Your debug output shows that scp is
> being used...

My understanding of the docs is that /remotehost: as well as
/root@remotehost: are valid tramp paths.  'tramp-default-method' being
"scp", they are equivalent to /scp:localusername@
remotehost:remoteuserhomedir (resp. /scp:root@remotehost:roothomedir).
And (again my understanding of the docs), "scp" seems to be the method I
actually want to use.

Regardless of what parts are actually optional in a tramp pathname, I
see the same behaviour with e.g. '/scp:root@remotehost:/root/.profile'.
Or any other functionally equivalent method (ssh, sshx, scpc, ...).


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
       [not found] ` <mailman.11976.1259697012.2239.help-gnu-emacs@gnu.org>
@ 2009-12-01 21:54   ` Raphaël Berbain
  0 siblings, 0 replies; 26+ messages in thread
From: Raphaël Berbain @ 2009-12-01 21:54 UTC (permalink / raw)
  To: help-gnu-emacs

* Harry Putnam:

> raphael.berbain@gmail.com (Raphaël Berbain) writes:
>
>> Hi,
>>
>> I am having problems making tramp work.  In a nutshell, "/remotehost:"
>> works, but "/root@remotehost:" doesn't work, though I can passwordlessly
>> ssh/scp root@remotehost.  It hangs with the message "Tramp: Found remote
>> shell prompt on `remotehost'".
>
> I think Peter D has put you on the right track but since no one here
> has mentioned it so far, another way to gather some info and maybe see
> how the root shell is responding is to do a direct ssh but with the -v
> set and even -vv:
>
> ssh -vv root@problemhost

rgb@miaou:~$ ssh -vv root@harry
OpenSSH_5.1p1 Debian-6ubuntu2, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to harry [192.168.12.1] port 22.
debug1: Connection established.
debug1: identity file /home/rgb/.ssh/identity type -1
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type '-----END'
debug1: identity file /home/rgb/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/rgb/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.2
debug1: match: OpenSSH_5.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1p1 Debian-6ubuntu2
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 134/256
debug2: bits set: 508/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'harry' is known and matches the RSA host key.
debug1: Found key in /home/rgb/.ssh/known_hosts:8
debug2: bits set: 517/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/rgb/.ssh/id_rsa (0x7f36b5808a90)
debug2: key: /home/rgb/.ssh/identity ((nil))
debug2: key: /home/rgb/.ssh/id_dsa ((nil))
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key: /home/rgb/.ssh/id_rsa
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug2: input_userauth_pk_ok: fp 75:4c:f6:0e:95:51:4c:75:39:9d:33:7c:e1:15:0e:5e
debug1: Authentication succeeded (publickey).
debug2: fd 6 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug2: callback start
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug1: Sending environment.
debug2: channel 0: request shell confirm 1
debug2: fd 3 setting TCP_NODELAY
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel_input_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel 0: rcvd adjust 2097152
debug2: channel_input_confirm: type 99 id 0
debug2: shell request accepted on channel 0
# ^D
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: channel 0: close_write
debug2: channel 0: output drain -> closed
debug2: channel 0: rcvd close
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
Connection to harry closed.
Transferred: sent 2528, received 2360 bytes, in 3.5 seconds
Bytes per second: sent 731.6, received 683.0
debug1: Exit status 0


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
       [not found] ` <mailman.11977.1259698390.2239.help-gnu-emacs@gnu.org>
@ 2009-12-01 21:55   ` Raphaël Berbain
  2009-12-02  9:23     ` Michael Albinus
       [not found]     ` <mailman.12019.1259745826.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 26+ messages in thread
From: Raphaël Berbain @ 2009-12-01 21:55 UTC (permalink / raw)
  To: help-gnu-emacs

* Michael Albinus:

> That is good. Please show the resulting buffer *debug tramp/scp root@harry*

* Andreas Politz:

> Tramp logs everything in some *tramp-debug* buffer, probably
> tramp-verbose dependent.  I suspect the contents of this buffer would be
> even more helpfull to you or others.

Please have a look at my original post again.  I set tramp-verbose 10
and the content of the debug buffer is included below the backtrace.


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
  2009-12-01 21:55   ` Raphaël Berbain
@ 2009-12-02  9:23     ` Michael Albinus
       [not found]     ` <mailman.12019.1259745826.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 26+ messages in thread
From: Michael Albinus @ 2009-12-02  9:23 UTC (permalink / raw)
  To: help-gnu-emacs

raphael.berbain@gmail.com (Raphaël Berbain) writes:

> * Michael Albinus:
>
>> That is good. Please show the resulting buffer *debug tramp/scp root@harry*
>
> * Andreas Politz:
>
>> Tramp logs everything in some *tramp-debug* buffer, probably
>> tramp-verbose dependent.  I suspect the contents of this buffer would be
>> even more helpfull to you or others.
>
> Please have a look at my original post again.  I set tramp-verbose 10
> and the content of the debug buffer is included below the backtrace.

You have posted the contents of the *Messages* buffer, and the backtrace
when you have quit Tramp. I do not see the *debug tramp/scp root@harry*
buffer.

Am I blind?

Best regards, Michael.




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
       [not found]     ` <mailman.12019.1259745826.2239.help-gnu-emacs@gnu.org>
@ 2009-12-02  9:56       ` Raphaël Berbain
  2009-12-02 10:15         ` Tim X
                           ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Raphaël Berbain @ 2009-12-02  9:56 UTC (permalink / raw)
  To: help-gnu-emacs

* Michael Albinus:

> You have posted the contents of the *Messages* buffer, and the backtrace
> when you have quit Tramp. I do not see the *debug tramp/scp root@harry*
> buffer.

Have a look at line 180 & after in my first post.

> Am I blind?

Either that, or I am dense <g>.


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
  2009-12-02  9:56       ` Raphaël Berbain
@ 2009-12-02 10:15         ` Tim X
  2009-12-02 13:56           ` Raphaël Berbain
  2009-12-02 13:01         ` Michael Albinus
       [not found]         ` <mailman.12025.1259758918.2239.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 26+ messages in thread
From: Tim X @ 2009-12-02 10:15 UTC (permalink / raw)
  To: help-gnu-emacs

raphael.berbain@gmail.com (Raphaël Berbain) writes:

> * Michael Albinus:
>
>> You have posted the contents of the *Messages* buffer, and the backtrace
>> when you have quit Tramp. I do not see the *debug tramp/scp root@harry*
>> buffer.
>
> Have a look at line 180 & after in my first post.
>
>> Am I blind?
>
> Either that, or I am dense <g>.

Not sure about anyone else, but I am blind! I have possibly missed the
vital post, but the one I saw with debug was only the debug stuff from
ssh, nothing from tramp. 

However, I did have a thought....

If you can connect via tramp to a user account OK, but it appears to
fail when you attempt to connect as root AND if you are able to connect
as root just using ssh outside of emacs/tramp, then my guess would be
that tramp may be having problem detecting the shell prompt. 

On most Linux boxes, the prompt you get as a regular user is slightly
different from the prompt you get when logged in as the root user. I
have had problems with tramp in the past where the prompt was different
from what you normally get (so different that tramp got confused and
failed to connect). 

This is just a shot in the dark and may not be the issue, but thought it
was worth mentioning. 

The tramp debug output may shed more accurate info.

Tim

-- 
tcross (at) rapttech dot com dot au


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
  2009-12-02  9:56       ` Raphaël Berbain
  2009-12-02 10:15         ` Tim X
@ 2009-12-02 13:01         ` Michael Albinus
  2009-12-02 17:02           ` Andreas Politz
       [not found]         ` <mailman.12025.1259758918.2239.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 26+ messages in thread
From: Michael Albinus @ 2009-12-02 13:01 UTC (permalink / raw)
  To: help-gnu-emacs

raphael.berbain@gmail.com (Raphaël Berbain) writes:

> * Michael Albinus:
>
>> You have posted the contents of the *Messages* buffer, and the backtrace
>> when you have quit Tramp. I do not see the *debug tramp/scp root@harry*
>> buffer.
>
> Have a look at line 180 & after in my first post.

Your original post is

Message-ID: <yzvfx7wroju.fsf@did75-11-82-231-40-223.fbx.proxad.net>

There are less than 180 lines. Or I am still blind.

Please, post the debug buffer again :-)

Best regards, Michael.




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
       [not found]         ` <mailman.12025.1259758918.2239.help-gnu-emacs@gnu.org>
@ 2009-12-02 13:56           ` Raphaël Berbain
  2009-12-02 21:33             ` Michael Albinus
       [not found]             ` <mailman.12053.1259789634.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 26+ messages in thread
From: Raphaël Berbain @ 2009-12-02 13:56 UTC (permalink / raw)
  To: help-gnu-emacs

* Michael Albinus:

> raphael.berbain@gmail.com (Raphaël Berbain) writes:
>
>> * Michael Albinus:
>>
>>> You have posted the contents of the *Messages* buffer, and the backtrace
>>> when you have quit Tramp. I do not see the *debug tramp/scp root@harry*
>>> buffer.
>>
>> Have a look at line 180 & after in my first post.
>
> Your original post is
>
> Message-ID: <yzvfx7wroju.fsf@did75-11-82-231-40-223.fbx.proxad.net>
>
> There are less than 180 lines. Or I am still blind.
>
> Please, post the debug buffer again :-)
>
> Best regards, Michael.

Ah, finding it through google groups shows that the post got truncated
where the backtrace included a null character.  My newsreader shows it
in full, so I guess my news server has a full copy; the ^@ may have
messed up article propagation or something.  I did try to sanitize the
backtrace -- what's the correct way to gather & post a backtrace safely?

Either way, here is the output:

;; GNU Emacs: 23.1.50.1 Tramp: 2.1.18-pre -*- mode: outline; -*-
11:52:52.719159 tramp-maybe-open-connection (3) # Opening connection for root@harry using scp...
11:52:52.719504 tramp-get-connection-property (7) # process-name nil
11:52:52.719706 tramp-get-connection-property (7) # process-buffer nil
11:52:52.741698 tramp-maybe-open-connection (6) # /bin/sh
11:52:52.742435 tramp-maybe-open-connection (3) # Waiting 60s for local shell to come up...
11:52:52.742934 tramp-get-connection-property (7) # check-remote-echo nil
11:52:52.743347 tramp-get-connection-property (7) # check-remote-echo nil
11:52:52.744312 tramp-accept-process-output (10) # *tramp/scp root@harry* run
11:52:52.744827 tramp-accept-process-output (10) # 
$ 
11:52:52.745238 tramp-get-connection-property (7) # check-remote-echo nil
11:52:52.745646 tramp-get-connection-property (7) # check-remote-echo nil
11:52:52.746067 tramp-wait-for-regexp (6) # 
$ 
11:52:52.746539 tramp-get-file-property (8) #  gateway nil
11:52:52.747034 tramp-set-connection-property (7) # temp-file /tmp/tramp.19095EWP
11:52:52.748140 tramp-maybe-open-connection (3) # Sending command `ssh harry -l root  -q -e none && exit || exit'
11:52:52.748570 tramp-get-connection-property (7) # process-name nil
11:52:52.749015 tramp-get-connection-property (7) # remote-echo nil
11:52:52.749397 tramp-send-command (6) # ssh harry -l root  -q -e none && exit || exit
11:52:52.749781 tramp-get-connection-property (7) # process-name nil
11:52:52.750248 tramp-get-connection-property (7) # chunksize nil
11:52:52.750672 tramp-set-connection-property (7) # last-cmd-time (19220 62852 750533)
11:52:52.751081 tramp-send-string (10) # ssh harry -l root  -q -e none && exit || exit
11:52:52.751475 tramp-get-connection-property (7) # process-buffer nil
11:52:52.751972 tramp-set-connection-property (7) # first-password-request t
11:52:52.752575 tramp-process-actions (3) # Waiting for prompts from remote shell
11:52:52.753023 tramp-accept-process-output (10) # *tramp/scp root@harry* run
11:52:53.753649 tramp-accept-process-output (10) # 
11:52:53.754075 tramp-process-one-action (5) # Looking for regexp "\(.*ogin\( .*\)?: *\)\'" from remote shell
11:52:53.754532 tramp-get-connection-property (7) # check-remote-echo nil
11:52:53.754970 tramp-get-connection-property (7) # check-remote-echo nil
11:52:53.755402 tramp-process-one-action (5) # Looking for regexp "\(^.*\([pP]assword\|[pP]assphrase\).*:.? *\)\'" from remote shell
11:52:53.755833 tramp-get-connection-property (7) # check-remote-echo nil
11:52:53.756268 tramp-get-connection-property (7) # check-remote-echo nil
11:52:53.756719 tramp-process-one-action (5) # Looking for regexp "\(^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|N\(?:ame or service not known\|o supported authentication methods left to try!\)\|Permission denied\|Sorry, try again\.\).*\|^.*\(Received signal [0-9]+\).*\)\'" from remote shell
11:52:53.757170 tramp-get-connection-property (7) # check-remote-echo nil
11:52:53.757595 tramp-get-connection-property (7) # check-remote-echo nil
11:52:53.758043 tramp-process-one-action (5) # Looking for regexp "\(^[^#$%>
]*[#$%>] *\)\'" from remote shell
11:52:53.758494 tramp-get-connection-property (7) # check-remote-echo nil
11:52:53.758904 tramp-get-connection-property (7) # check-remote-echo nil
11:52:53.759326 tramp-process-one-action (5) # Looking for regexp "\(\(?:^\|\)[^#$%>
]*[#$%>] *\(.\[[0-9;]*[a-zA-Z] *\)*\)\'" from remote shell
11:52:53.759773 tramp-get-connection-property (7) # check-remote-echo nil
11:52:53.760182 tramp-get-connection-property (7) # check-remote-echo nil
11:52:53.760629 tramp-process-one-action (5) # Looking for regexp "\(\(Are you sure you want to continue connecting (yes/no)\?\)\s-*\)\'" from remote shell
11:52:53.761087 tramp-get-connection-property (7) # check-remote-echo nil
11:52:53.761497 tramp-get-connection-property (7) # check-remote-echo nil
11:52:53.761920 tramp-process-one-action (5) # Looking for regexp "\(\(\(?:Store key in cache\? (y/\|Update cached key\? (y/n, Return cancels connectio\)n)\)\s-*\)\'" from remote shell
11:52:53.762377 tramp-get-connection-property (7) # check-remote-echo nil
11:52:53.762811 tramp-get-connection-property (7) # check-remote-echo nil
11:52:53.763217 tramp-process-one-action (5) # Looking for regexp "\(\(TERM = (.*)\|Terminal type\? \[.*\]\)\s-*\)\'" from remote shell
11:52:53.763673 tramp-get-connection-property (7) # check-remote-echo nil
11:52:53.764101 tramp-get-connection-property (7) # check-remote-echo nil
11:52:53.764549 tramp-process-one-action (5) # Looking for regexp "\(\)\'" from remote shell
11:52:53.764996 tramp-get-connection-property (7) # check-remote-echo nil
11:52:53.765427 tramp-get-connection-property (7) # check-remote-echo nil
11:52:53.765818 tramp-process-one-action (5) # Call `tramp-action-process-alive'
11:52:53.766283 tramp-accept-process-output (10) # *tramp/scp root@harry* run
11:52:54.690481 tramp-accept-process-output (10) # 
# 
11:52:54.690914 tramp-process-one-action (5) # Looking for regexp "\(.*ogin\( .*\)?: *\)\'" from remote shell
11:52:54.691373 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.691809 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.692233 tramp-process-one-action (5) # Looking for regexp "\(^.*\([pP]assword\|[pP]assphrase\).*:.? *\)\'" from remote shell
11:52:54.692666 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.693111 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.693550 tramp-process-one-action (5) # Looking for regexp "\(^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|N\(?:ame or service not known\|o supported authentication methods left to try!\)\|Permission denied\|Sorry, try again\.\).*\|^.*\(Received signal [0-9]+\).*\)\'" from remote shell
11:52:54.694001 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.694433 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.694861 tramp-process-one-action (5) # Looking for regexp "\(^[^#$%>
]*[#$%>] *\)\'" from remote shell
11:52:54.695296 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.695730 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.696142 tramp-process-one-action (5) # Call `tramp-action-succeed'
11:52:54.696558 tramp-get-connection-property (7) # process-buffer nil
11:52:54.725933 tramp-process-actions (6) # 
# 
11:52:54.726458 tramp-maybe-open-connection (3) # Found remote shell prompt on `harry'
11:52:54.726753 tramp-get-connection-property (7) # process-name nil
11:52:54.726981 tramp-get-connection-property (7) # remote-echo nil
11:52:54.727166 tramp-send-command (6) # exec env ENV='' PROMPT_COMMAND='' PS1=\$\  PS2='' PS3='' /bin/sh
11:52:54.727363 tramp-get-connection-property (7) # process-name nil
11:52:54.727577 tramp-get-connection-property (7) # chunksize nil
11:52:54.727783 tramp-set-connection-property (7) # last-cmd-time (19220 62854 727716)
11:52:54.727982 tramp-send-string (10) # exec env ENV='' PROMPT_COMMAND='' PS1=\$\  PS2='' PS3='' /bin/sh
11:52:54.728179 tramp-get-connection-property (7) # process-buffer nil
11:52:54.728429 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.728631 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.728843 tramp-accept-process-output (10) # *tramp/scp root@harry* run
11:52:54.742004 tramp-accept-process-output (10) # 
exec env ENV='' PROMPT_
11:52:54.742438 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.742841 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.743252 tramp-accept-process-output (10) # *tramp/scp root@harry* run
11:52:54.751752 tramp-accept-process-output (10) # 
exec env ENV='' PROMPT_COMM
11:52:54.752175 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.752574 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.752984 tramp-accept-process-output (10) # *tramp/scp root@harry* run
11:52:54.760382 tramp-accept-process-output (10) # 
exec env ENV='' PROMPT_COMMAND=
11:52:54.760801 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.761205 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.761616 tramp-accept-process-output (10) # *tramp/scp root@harry* run
11:52:54.770393 tramp-accept-process-output (10) # 
exec env ENV='' PROMPT_COMMAND='' PS
11:52:54.770814 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.771227 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.771652 tramp-accept-process-output (10) # *tramp/scp root@harry* run
11:52:54.780386 tramp-accept-process-output (10) # 
exec env ENV='' PROMPT_COMMAND='' PS1=\$\
11:52:54.780818 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.781228 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.781650 tramp-accept-process-output (10) # *tramp/scp root@harry* run
11:52:54.790386 tramp-accept-process-output (10) # 
exec env ENV='' PROMPT_COMMAND='' PS1=\$\  PS2
11:52:54.790818 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.791267 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.791693 tramp-accept-process-output (10) # *tramp/scp root@harry* run
11:52:54.800388 tramp-accept-process-output (10) # 
exec env ENV='' PROMPT_COMMAND='' PS1=\$\  PS2='' P
11:52:54.800824 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.801235 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.801662 tramp-accept-process-output (10) # *tramp/scp root@harry* run
11:52:54.810387 tramp-accept-process-output (10) # 
exec env ENV='' PROMPT_COMMAND='' PS1=\$\  PS2='' PS3=''
11:52:54.810817 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.811229 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.811658 tramp-accept-process-output (10) # *tramp/scp root@harry* run
11:52:54.820413 tramp-accept-process-output (10) # 
exec env ENV='' PROMPT_COMMAND='' PS1=\$\  PS2='' PS3='' /bin
11:52:54.820847 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.821258 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.821690 tramp-accept-process-output (10) # *tramp/scp root@harry* run
11:52:54.830378 tramp-accept-process-output (10) # 
exec env ENV='' PROMPT_COMMAND='' PS1=\$\  PS2='' PS3='' /bin/sh
11:52:54.830783 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.831197 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.831627 tramp-accept-process-output (10) # *tramp/scp root@harry* run
11:52:54.880378 tramp-accept-process-output (10) # 
exec env ENV='' PROMPT_COMMAND='' PS1=\$\  PS2='' PS3='' /bin/sh
# 
11:52:54.880808 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.881223 tramp-get-connection-property (7) # check-remote-echo nil
11:52:54.881656 tramp-accept-process-output (10) # *tramp/scp root@harry* run
11:52:55.883214 tramp-accept-process-output (10) # 
exec env ENV='' PROMPT_COMMAND='' PS1=\$\  PS2='' PS3='' /bin/sh
# 


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
  2009-12-02 10:15         ` Tim X
@ 2009-12-02 13:56           ` Raphaël Berbain
  0 siblings, 0 replies; 26+ messages in thread
From: Raphaël Berbain @ 2009-12-02 13:56 UTC (permalink / raw)
  To: help-gnu-emacs

* Tim X.:

> However, I did have a thought....
>
> If you can connect via tramp to a user account OK, but it appears to
> fail when you attempt to connect as root AND if you are able to connect
> as root just using ssh outside of emacs/tramp, then my guess would be
> that tramp may be having problem detecting the shell prompt. 

Actually though about that too;  root's PS1 on remote is '# '.  Regular
user prompt is '$ '.  Both use openbsd ksh as their shell.  That openbsd
install is pretty much default, at least wrt. user/root env.


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
  2009-12-02 13:01         ` Michael Albinus
@ 2009-12-02 17:02           ` Andreas Politz
  0 siblings, 0 replies; 26+ messages in thread
From: Andreas Politz @ 2009-12-02 17:02 UTC (permalink / raw)
  To: help-gnu-emacs

Michael Albinus <michael.albinus@gmx.de> writes:

> raphael.berbain@gmail.com (Raphaël Berbain) writes:
>
>> * Michael Albinus:
>>
>>> You have posted the contents of the *Messages* buffer, and the backtrace
>>> when you have quit Tramp. I do not see the *debug tramp/scp root@harry*
>>> buffer.
>>
>> Have a look at line 180 & after in my first post.
>
> Your original post is
>
> Message-ID: <yzvfx7wroju.fsf@did75-11-82-231-40-223.fbx.proxad.net>
>
> There are less than 180 lines. Or I am still blind.
>
> Please, post the debug buffer again :-)
>
> Best regards, Michael.

Can't see it either.  What is the probability of 3 people in this group
becoming blind at almost the same time ?

-ap





^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
  2009-12-02 13:56           ` Raphaël Berbain
@ 2009-12-02 21:33             ` Michael Albinus
       [not found]             ` <mailman.12053.1259789634.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 26+ messages in thread
From: Michael Albinus @ 2009-12-02 21:33 UTC (permalink / raw)
  To: help-gnu-emacs

raphael.berbain@gmail.com (Raphaël Berbain) writes:

> Ah, finding it through google groups shows that the post got truncated
> where the backtrace included a null character.  My newsreader shows it
> in full, so I guess my news server has a full copy; the ^@ may have
> messed up article propagation or something.  I did try to sanitize the
> backtrace -- what's the correct way to gather & post a backtrace
> safely?

MIME attachment.

> Either way, here is the output:
>
> 11:52:52.741698 tramp-maybe-open-connection (6) # /bin/sh
> 11:52:52.746067 tramp-wait-for-regexp (6) # 
> $ 

Tramp opens a local shell, the prompt is "$ ". OK.

> 11:52:52.749397 tramp-send-command (6) # ssh harry -l root  -q -e none && exit || exit
> 11:52:54.725933 tramp-process-actions (6) # 
> # 

Tramp applies the ssh command to the remote host. The prompt is "# ". That
is OK; tramp-shell-prompt-pattern covers this.

> 11:52:54.727166 tramp-send-command (6) # exec env ENV='' PROMPT_COMMAND='' PS1=\$\  PS2='' PS3='' /bin/sh
> 11:52:55.883214 tramp-accept-process-output (10) # 
> exec env ENV='' PROMPT_COMMAND='' PS1=\$\  PS2='' PS3='' /bin/sh
> # 

Tramp starts /bin/sh on the remote host, and expects "$ " as prompt (see
PS1). But the prompt is still "# ". That is NOT OK.

Is there something in the .profile of root, which overrides the PS1 settings?
What happens, if you manually apply "ssh harry -l root -q -e none" and
then, afterwards, "exec env ENV='' PROMPT_COMMAND='' PS1=\$\ PS2='' PS3='' /bin/sh"?

Best regards, Michael.




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
  2009-12-01 11:03 remote tramp hangs Raphaël Berbain
                   ` (6 preceding siblings ...)
       [not found] ` <mailman.11977.1259698390.2239.help-gnu-emacs@gnu.org>
@ 2009-12-02 22:03 ` notbob
  7 siblings, 0 replies; 26+ messages in thread
From: notbob @ 2009-12-02 22:03 UTC (permalink / raw)
  To: help-gnu-emacs

On 2009-12-01, Raphaël Berbain <raphael.berbain@gmail.com> wrote:

> I am having problems making tramp work.  

Hence the term, tramp, instead of gainfully employed person.

nb


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
       [not found]             ` <mailman.12053.1259789634.2239.help-gnu-emacs@gnu.org>
@ 2009-12-03  9:35               ` Raphaël Berbain
  2009-12-03 11:22                 ` Raphaël Berbain
  0 siblings, 1 reply; 26+ messages in thread
From: Raphaël Berbain @ 2009-12-03  9:35 UTC (permalink / raw)
  To: help-gnu-emacs

* Michael Albinus:

>> 11:52:54.727166 tramp-send-command (6) # exec env ENV='' PROMPT_COMMAND='' PS1=\$\  PS2='' PS3='' /bin/sh
>> 11:52:55.883214 tramp-accept-process-output (10) # 
>> exec env ENV='' PROMPT_COMMAND='' PS1=\$\  PS2='' PS3='' /bin/sh
>> # 
>
> Tramp starts /bin/sh on the remote host, and expects "$ " as prompt (see
> PS1). But the prompt is still "# ". That is NOT OK.
>
> Is there something in the .profile of root, which overrides the PS1
> settings?

Not that I know of, but then...

> What happens, if you manually apply "ssh harry -l root -q -e none" and
> then, afterwards, "exec env ENV='' PROMPT_COMMAND='' PS1=\$\ PS2='' PS3='' /bin/sh"?

...prompt is '# ', so there's obviously something messing with it.

Ok, now going to track where that comes from.  Thanks for your help.


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
  2009-12-03  9:35               ` Raphaël Berbain
@ 2009-12-03 11:22                 ` Raphaël Berbain
  2009-12-03 20:58                   ` Michael Albinus
       [not found]                   ` <mailman.12120.1259873928.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 26+ messages in thread
From: Raphaël Berbain @ 2009-12-03 11:22 UTC (permalink / raw)
  To: help-gnu-emacs

* Raphaël Berbain:

> * Michael Albinus:
>
>>> 11:52:54.727166 tramp-send-command (6) # exec env ENV='' PROMPT_COMMAND='' PS1=\$\  PS2='' PS3='' /bin/sh
>>> 11:52:55.883214 tramp-accept-process-output (10) # 
>>> exec env ENV='' PROMPT_COMMAND='' PS1=\$\  PS2='' PS3='' /bin/sh
>>> # 
>>
>> Tramp starts /bin/sh on the remote host, and expects "$ " as prompt (see
>> PS1). But the prompt is still "# ". That is NOT OK.
>>
>> Is there something in the .profile of root, which overrides the PS1
>> settings?
>
> Not that I know of, but then...

More on that:  Host is openbsd 4.5, where sh actually is ksh.
http://www.openbsd.org/cgi-bin/man.cgi?query=ksh&apropos=0&sektion=0&manpath=OpenBSD+4.5&arch=i386&format=html says:

"""The default prompt is `$ ' for non-root users, `# ' for root.  If ksh
is invoked by root and PS1 does not contain a `#' character, the default
value will be used even if PS1 already exists in the environment."""

Curiously, "sh" man page doesn't say that... but sh still does it.

Changing the PS1 sent by tramp to include '#' (i.e. "#$ ") works around
that shell behaviour.


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
  2009-12-03 11:22                 ` Raphaël Berbain
@ 2009-12-03 20:58                   ` Michael Albinus
       [not found]                   ` <mailman.12120.1259873928.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 26+ messages in thread
From: Michael Albinus @ 2009-12-03 20:58 UTC (permalink / raw)
  To: help-gnu-emacs

raphael.berbain@gmail.com (Raphaël Berbain) writes:

> More on that:  Host is openbsd 4.5, where sh actually is ksh.
> http://www.openbsd.org/cgi-bin/man.cgi?query=ksh&apropos=0&sektion=0&manpath=OpenBSD+4.5&arch=i386&format=html says:
>
> """The default prompt is `$ ' for non-root users, `# ' for root.  If ksh
> is invoked by root and PS1 does not contain a `#' character, the default
> value will be used even if PS1 already exists in the environment."""
>
> Curiously, "sh" man page doesn't say that... but sh still does it.
>
> Changing the PS1 sent by tramp to include '#' (i.e. "#$ ") works around
> that shell behaviour.

Thanks for the analysis! I'll fix it next week in Tramp (just leaving
for some days).

Best regards, Michael.




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
       [not found]                   ` <mailman.12120.1259873928.2239.help-gnu-emacs@gnu.org>
@ 2009-12-03 22:50                     ` Raphaël Berbain
  2009-12-07  6:43                       ` Michael Albinus
       [not found]                       ` <mailman.12409.1260168197.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 26+ messages in thread
From: Raphaël Berbain @ 2009-12-03 22:50 UTC (permalink / raw)
  To: help-gnu-emacs

* Michael Albinus:

> Thanks for the analysis! I'll fix it next week in Tramp (just leaving
> for some days).

It seems to me I should be the one thanking you for your help & your
work.  In case it helps, here's the (minimal, I made no effort to do it
the right way) diff I use right now:

--- tramp.el.orig   2009-12-03 23:39:12.630193000 +0100
+++ tramp.el    2009-12-03 12:10:02.970187559 +0100
@@ -1521,7 +1521,7 @@
 
 (defvar tramp-end-of-output
   (format
-   "%s///%s%s"
+   "#%s///%s%s"
    tramp-rsh-end-of-line
    (md5 (concat (prin1-to-string process-environment)
   (current-time-string)))                                            
    tramp-rsh-end-of-line)
@@ -5992,7 +5992,7 @@
     (tramp-send-command
      vec
      (format
-      "exec env ENV='' PROMPT_COMMAND='' PS1='$ ' PS2='' PS3='' %s"
+      "exec env ENV='' PROMPT_COMMAND='' PS1='#$ ' PS2='' PS3='' %s"
       (tramp-get-method-parameter
        (tramp-file-name-method vec) 'tramp-remote-sh))
      t)

tramp.el.orig comes from ubuntu's emacs23-el package (versionned
23.1+1-4ubuntu3.1) -- tramp-version says 2.1.15.


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
  2009-12-03 22:50                     ` Raphaël Berbain
@ 2009-12-07  6:43                       ` Michael Albinus
       [not found]                       ` <mailman.12409.1260168197.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 26+ messages in thread
From: Michael Albinus @ 2009-12-07  6:43 UTC (permalink / raw)
  To: help-gnu-emacs

raphael.berbain@gmail.com (Raphaël Berbain) writes:

> In case it helps, here's the (minimal, I made no effort to do it
> the right way) diff I use right now:

I've committed a similar patch, handling other cases as well.

Thanks, and best regards, Michael.




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
       [not found]                       ` <mailman.12409.1260168197.2239.help-gnu-emacs@gnu.org>
@ 2009-12-14 14:20                         ` Raphaël Berbain
  2009-12-15  6:27                           ` Michael Albinus
       [not found]                           ` <mailman.12991.1260858434.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 26+ messages in thread
From: Raphaël Berbain @ 2009-12-14 14:20 UTC (permalink / raw)
  To: help-gnu-emacs

* Michael Albinus:

> raphael.berbain@gmail.com (Raphaël Berbain) writes:
>
>> In case it helps, here's the (minimal, I made no effort to do it
>> the right way) diff I use right now:
>
> I've committed a similar patch, handling other cases as well.

Hi again,

I tried my use-case with CVS head tramp (tramp-version 2.1.18-pre,
tramp.el CVS revision 2.757) and I am sorry to report that it doesn't
work for me.  What I am doing is: 

$ emacs -Q --eval "(progn (add-to-list 'load-path \
\"~/sandbox/sw/tramp/install/share/emacs/site-lisp\") (require \
'tramp) (setq debug-on-quit t tramp-verbose 10))" /root@harry:

it hangs with message "Tramp: Found remote shell prompt on `harry'".

Debug output (non-printable characters replaced with '.'):

;; GNU Emacs: 23.1.1 Tramp: 2.1.18-pre -*- mode: outline; -*-
15:06:46.365637 tramp-maybe-open-connection (3) # Opening connection for root@harry using scp...
15:06:46.365860 tramp-get-connection-property (7) # process-name nil
15:06:46.365982 tramp-get-connection-property (7) # process-buffer nil
15:06:46.366561 tramp-maybe-open-connection (6) # /bin/sh
15:06:46.366993 tramp-maybe-open-connection (3) # Waiting 60s for local shell to come up...
15:06:46.367154 tramp-get-connection-property (7) # check-remote-echo nil
15:06:46.367274 tramp-get-connection-property (7) # check-remote-echo nil
15:06:46.367425 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:46.367604 tramp-accept-process-output (10) # 
#$ 
15:06:46.367720 tramp-get-connection-property (7) # check-remote-echo nil
15:06:46.367837 tramp-get-connection-property (7) # check-remote-echo nil
15:06:46.367965 tramp-wait-for-regexp (6) # 
#$ 
15:06:46.368099 tramp-get-file-property (8) #  gateway nil
15:06:46.368263 tramp-set-connection-property (7) # temp-file /tmp/tramp.47922Zk
15:06:46.368688 tramp-maybe-open-connection (3) # Sending command `exec ssh harry -l root  -q -e none'
15:06:46.368809 tramp-get-connection-property (7) # process-name nil
15:06:46.368944 tramp-get-connection-property (7) # remote-echo nil
15:06:46.369058 tramp-send-command (6) # exec ssh harry -l root  -q -e none
15:06:46.369172 tramp-get-connection-property (7) # process-name nil
15:06:46.369303 tramp-get-connection-property (7) # chunksize nil
15:06:46.369429 tramp-set-connection-property (7) # last-cmd-time (19238 18038 369379)
15:06:46.369552 tramp-send-string (10) # exec ssh harry -l root  -q -e none
15:06:46.369666 tramp-get-connection-property (7) # process-buffer nil
15:06:46.369831 tramp-set-connection-property (7) # first-password-request t
15:06:46.370050 tramp-process-actions (3) # Waiting for prompts from remote shell
15:06:46.370182 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:47.370526 tramp-accept-process-output (10) # 
15:06:47.370761 tramp-process-one-action (5) # Looking for regexp "\(.*ogin\( .*\)?: *\)\'" from remote shell
15:06:47.371018 tramp-get-connection-property (7) # check-remote-echo nil
15:06:47.371258 tramp-get-connection-property (7) # check-remote-echo nil
15:06:47.371507 tramp-process-one-action (5) # Looking for regexp "\(^.*\([pP]assword\|[pP]assphrase\).*:.? *\)\'" from remote shell
15:06:47.371782 tramp-get-connection-property (7) # check-remote-echo nil
15:06:47.372022 tramp-get-connection-property (7) # check-remote-echo nil
15:06:47.372287 tramp-process-one-action (5) # Looking for regexp "\(^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|N\(?:ame or service not known\|o supported authentication methods left to try!\)\|Permission denied\|Sorry, try again\.\).*\|^.*\(Received signal [0-9]+\).*\)\'" from remote shell
15:06:47.372546 tramp-get-connection-property (7) # check-remote-echo nil
15:06:47.372799 tramp-get-connection-property (7) # check-remote-echo nil
15:06:47.373082 tramp-process-one-action (5) # Looking for regexp "\(^[^#$%>
]*[#$%>] *\)\'" from remote shell
15:06:47.373325 tramp-get-connection-property (7) # check-remote-echo nil
15:06:47.373564 tramp-get-connection-property (7) # check-remote-echo nil
15:06:47.373805 tramp-process-one-action (5) # Looking for regexp "\(\(?:^\|.\)[^#$%>
]*#?[#$%>] *\(.\[[0-9;]*[a-zA-Z] *\)*\)\'" from remote shell
15:06:47.374048 tramp-get-connection-property (7) # check-remote-echo nil
15:06:47.374304 tramp-get-connection-property (7) # check-remote-echo nil
15:06:47.374554 tramp-process-one-action (5) # Looking for regexp "\(\(Are you sure you want to continue connecting (yes/no)\?\)\s-*\)\'" from remote shell
15:06:47.374807 tramp-get-connection-property (7) # check-remote-echo nil
15:06:47.375044 tramp-get-connection-property (7) # check-remote-echo nil
15:06:47.375288 tramp-process-one-action (5) # Looking for regexp "\(\(\(?:Store key in cache\? (y/\|Update cached key\? (y/n, Return cancels connectio\)n)\)\s-*\)\'" from remote shell
15:06:47.375564 tramp-get-connection-property (7) # check-remote-echo nil
15:06:47.375804 tramp-get-connection-property (7) # check-remote-echo nil
15:06:47.376050 tramp-process-one-action (5) # Looking for regexp "\(\(TERM = (.*)\|Terminal type\? \[.*\]\)\s-*\)\'" from remote shell
15:06:47.376295 tramp-get-connection-property (7) # check-remote-echo nil
15:06:47.376532 tramp-get-connection-property (7) # check-remote-echo nil
15:06:47.376790 tramp-process-one-action (5) # Looking for regexp "\(\)\'" from remote shell
15:06:47.377029 tramp-get-connection-property (7) # check-remote-echo nil
15:06:47.377269 tramp-get-connection-property (7) # check-remote-echo nil
15:06:47.377503 tramp-process-one-action (5) # Call `tramp-action-process-alive'
15:06:47.377750 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:48.331614 tramp-accept-process-output (10) # 
Terminal type? [dumb] 
15:06:48.331867 tramp-process-one-action (5) # Looking for regexp "\(.*ogin\( .*\)?: *\)\'" from remote shell
15:06:48.332120 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.332363 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.332648 tramp-process-one-action (5) # Looking for regexp "\(^.*\([pP]assword\|[pP]assphrase\).*:.? *\)\'" from remote shell
15:06:48.332896 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.333158 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.333424 tramp-process-one-action (5) # Looking for regexp "\(^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|N\(?:ame or service not known\|o supported authentication methods left to try!\)\|Permission denied\|Sorry, try again\.\).*\|^.*\(Received signal [0-9]+\).*\)\'" from remote shell
15:06:48.333689 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.333929 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.334184 tramp-process-one-action (5) # Looking for regexp "\(^[^#$%>
]*[#$%>] *\)\'" from remote shell
15:06:48.334456 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.334698 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.334944 tramp-process-one-action (5) # Looking for regexp "\(\(?:^\|.\)[^#$%>
]*#?[#$%>] *\(.\[[0-9;]*[a-zA-Z] *\)*\)\'" from remote shell
15:06:48.335190 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.335436 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.335712 tramp-process-one-action (5) # Looking for regexp "\(\(Are you sure you want to continue connecting (yes/no)\?\)\s-*\)\'" from remote shell
15:06:48.335962 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.336204 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.336447 tramp-process-one-action (5) # Looking for regexp "\(\(\(?:Store key in cache\? (y/\|Update cached key\? (y/n, Return cancels connectio\)n)\)\s-*\)\'" from remote shell
15:06:48.336698 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.336965 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.337213 tramp-process-one-action (5) # Looking for regexp "\(\(TERM = (.*)\|Terminal type\? \[.*\]\)\s-*\)\'" from remote shell
15:06:48.337461 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.337703 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.337950 tramp-process-one-action (5) # Call `tramp-action-terminal'
15:06:48.338206 tramp-action-terminal (5) # Setting `dumb' as terminal type.
15:06:48.338439 tramp-get-connection-property (7) # process-buffer nil
15:06:48.338692 tramp-action-terminal (6) # 
Terminal type? [dumb] 
15:06:48.338924 tramp-get-connection-property (7) # process-name nil
15:06:48.339205 tramp-get-connection-property (7) # chunksize nil
15:06:48.339488 tramp-set-connection-property (7) # last-cmd-time (19238 18040 339357)
15:06:48.339742 tramp-send-string (10) # dumb
15:06:48.339977 tramp-get-connection-property (7) # process-buffer nil
15:06:48.340264 tramp-process-one-action (5) # Looking for regexp "\(\)\'" from remote shell
15:06:48.340526 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.340786 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.341022 tramp-process-one-action (5) # Call `tramp-action-process-alive'
15:06:48.341269 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:48.381492 tramp-accept-process-output (10) # 
# 
15:06:48.381732 tramp-process-one-action (5) # Looking for regexp "\(.*ogin\( .*\)?: *\)\'" from remote shell
15:06:48.381998 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.382248 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.382485 tramp-process-one-action (5) # Looking for regexp "\(^.*\([pP]assword\|[pP]assphrase\).*:.? *\)\'" from remote shell
15:06:48.382759 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.383002 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.383256 tramp-process-one-action (5) # Looking for regexp "\(^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification failed\.\|Login \(?:[Ii]ncorrect\)\|N\(?:ame or service not known\|o supported authentication methods left to try!\)\|Permission denied\|Sorry, try again\.\).*\|^.*\(Received signal [0-9]+\).*\)\'" from remote shell
15:06:48.383549 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.383792 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.384029 tramp-process-one-action (5) # Looking for regexp "\(^[^#$%>
]*[#$%>] *\)\'" from remote shell
15:06:48.384280 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.384522 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.384784 tramp-process-one-action (5) # Call `tramp-action-succeed'
15:06:48.385018 tramp-get-connection-property (7) # process-buffer nil
15:06:48.385266 tramp-process-actions (6) # 
# 
15:06:48.385810 tramp-maybe-open-connection (3) # Found remote shell prompt on `harry'
15:06:48.386127 tramp-get-connection-property (7) # process-name nil
15:06:48.386425 tramp-get-connection-property (7) # remote-echo nil
15:06:48.386653 tramp-send-command (6) # exec env ENV='' PROMPT_COMMAND='' PS1=\#\$\  PS2='' PS3='' /bin/sh
15:06:48.386882 tramp-get-connection-property (7) # process-name nil
15:06:48.387146 tramp-get-connection-property (7) # chunksize nil
15:06:48.387402 tramp-set-connection-property (7) # last-cmd-time (19238 18040 387299)
15:06:48.387669 tramp-send-string (10) # exec env ENV='' PROMPT_COMMAND='' PS1=\#\$\  PS2='' PS3='' /bin/sh
15:06:48.387900 tramp-get-connection-property (7) # process-buffer nil
15:06:48.388203 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.388444 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.388699 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:48.421466 tramp-accept-process-output (10) # 
exec env ENV='' PROMPT_COMMAND='' PS1=\#\$\  PS2='' PS3='' /bin/sh.
15:06:48.421705 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.421963 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.422221 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:48.471518 tramp-accept-process-output (10) # 
exec env ENV='' PROMPT_COMMAND='' PS1=\#\$\  PS2='' PS3='' /bin/sh.
#$ 
15:06:48.471790 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.472041 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.472304 tramp-wait-for-regexp (6) # 
exec env ENV='' PROMPT_COMMAND='' PS1=\#\$\  PS2='' PS3='' /bin/sh.
#$ 
15:06:48.472556 tramp-open-connection-setup-interactive-shell (5) # Setting up remote shell environment
15:06:48.472797 tramp-get-connection-property (7) # process-name nil
15:06:48.473066 tramp-get-connection-property (7) # remote-echo nil
15:06:48.473291 tramp-send-command (6) # stty -inlcr -echo kill '^U' erase '^H'
15:06:48.473516 tramp-get-connection-property (7) # process-name nil
15:06:48.473782 tramp-get-connection-property (7) # chunksize nil
15:06:48.474066 tramp-set-connection-property (7) # last-cmd-time (19238 18040 473963)
15:06:48.474313 tramp-send-string (10) # stty -inlcr -echo kill '^U' erase '^H'
15:06:48.474538 tramp-get-connection-property (7) # process-buffer nil
15:06:48.474840 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.475077 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.475310 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:48.501462 tramp-accept-process-output (10) # 
stty -inlcr -echo kill '^U' erase '^H'.
15:06:48.501676 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.501914 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.502161 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:48.511467 tramp-accept-process-output (10) # 
stty -inlcr -echo kill '^U' erase '^H'.
#$ 
15:06:48.511702 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.511938 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.512189 tramp-wait-for-regexp (6) # 
stty -inlcr -echo kill '^U' erase '^H'.
#$ 
15:06:48.512427 tramp-get-connection-property (7) # process-name nil
15:06:48.512703 tramp-get-connection-property (7) # remote-echo nil
15:06:48.512925 tramp-send-command (6) # echo foo
15:06:48.513148 tramp-get-connection-property (7) # process-name nil
15:06:48.513413 tramp-get-connection-property (7) # chunksize nil
15:06:48.513664 tramp-set-connection-property (7) # last-cmd-time (19238 18040 513562)
15:06:48.513908 tramp-send-string (10) # echo foo
15:06:48.514134 tramp-get-connection-property (7) # process-buffer nil
15:06:48.514428 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.514664 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.514900 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:48.531453 tramp-accept-process-output (10) # 
echo foo.
foo
#$ 
15:06:48.531689 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.531925 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.532171 tramp-wait-for-regexp (6) # 
echo foo.
foo
#$ 
15:06:48.532427 tramp-set-connection-property (7) # remote-echo t
15:06:48.532654 tramp-open-connection-setup-interactive-shell (5) # Remote echo still on. Ok.
15:06:48.532870 tramp-get-connection-property (7) # process-name nil
15:06:48.533122 tramp-get-connection-property (7) # remote-echo t
15:06:48.533360 tramp-set-connection-property (7) # check-remote-echo t
15:06:48.533579 tramp-send-command (6) # _echo\b\b\b\b\bstty icanon erase ^H cols 32767_echo\b\b\b\b\b
15:06:48.533798 tramp-get-connection-property (7) # process-name nil
15:06:48.534048 tramp-get-connection-property (7) # chunksize nil
15:06:48.534287 tramp-set-connection-property (7) # last-cmd-time (19238 18040 534195)
15:06:48.534519 tramp-send-string (10) # _echo\b\b\b\b\bstty icanon erase ^H cols 32767_echo\b\b\b\b\b
15:06:48.534739 tramp-get-connection-property (7) # process-buffer nil
15:06:48.535020 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.535267 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.535501 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:48.561471 tramp-accept-process-output (10) # 
_echo\b \b\b \b\b \b\b \b\b \bstty icanon erase ^H cols 32767_echo\b \b\b \b\b \b\b \b\b \b.
15:06:48.561688 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.561942 tramp-set-connection-property (7) # check-remote-echo nil
15:06:48.562182 tramp-check-for-regexp (5) # echo-mark found
15:06:48.562418 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.562673 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:48.571457 tramp-accept-process-output (10) # 
#$ 
15:06:48.571697 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.571939 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.572181 tramp-wait-for-regexp (6) # 
#$ 
15:06:48.572441 tramp-open-connection-setup-interactive-shell (5) # Setting shell prompt
15:06:48.572696 tramp-get-connection-property (7) # process-name nil
15:06:48.572964 tramp-get-connection-property (7) # remote-echo t
15:06:48.573213 tramp-set-connection-property (7) # check-remote-echo t
15:06:48.573444 tramp-send-command (6) # _echo\b\b\b\b\bPS1=///f91d08a5c9f7a0fe8dcbcc3043d7186b\#\$_echo\b\b\b\b\b
15:06:48.573666 tramp-get-connection-property (7) # process-name nil
15:06:48.573928 tramp-get-connection-property (7) # chunksize nil
15:06:48.574180 tramp-set-connection-property (7) # last-cmd-time (19238 18040 574079)
15:06:48.574421 tramp-send-string (10) # _echo\b\b\b\b\bPS1=///f91d08a5c9f7a0fe8dcbcc3043d7186b\#\$_echo\b\b\b\b\b
15:06:48.574649 tramp-get-connection-property (7) # process-buffer nil
15:06:48.574949 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.575191 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.575428 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:48.601465 tramp-accept-process-output (10) # 
_echo\b \b\b \b\b \b\b \b\b \bPS1=///f91d08a5c9f7a0fe8dcbcc3043d7186b\#\$_echo\b \b\b \b\b \b\b \b\b \b.
///f91d08a5c9f7a0fe8dcbcc3043d7186b#$
15:06:48.601711 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.601963 tramp-set-connection-property (7) # check-remote-echo nil
15:06:48.602202 tramp-check-for-regexp (5) # echo-mark found
15:06:48.602441 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.602714 tramp-wait-for-regexp (6) # 
///f91d08a5c9f7a0fe8dcbcc3043d7186b#$
15:06:48.603048 tramp-get-connection-property (7) # process-name nil
15:06:48.603316 tramp-get-connection-property (7) # remote-echo t
15:06:48.603571 tramp-set-connection-property (7) # check-remote-echo t
15:06:48.603800 tramp-send-command (6) # _echo\b\b\b\b\bPS2=''_echo\b\b\b\b\b
15:06:48.604026 tramp-get-connection-property (7) # process-name nil
15:06:48.604291 tramp-get-connection-property (7) # chunksize nil
15:06:48.604546 tramp-set-connection-property (7) # last-cmd-time (19238 18040 604441)
15:06:48.604789 tramp-send-string (10) # _echo\b\b\b\b\bPS2=''_echo\b\b\b\b\b
15:06:48.605016 tramp-get-connection-property (7) # process-buffer nil
15:06:48.605316 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.605557 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.605792 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:48.621456 tramp-accept-process-output (10) # 
_echo\b \b\b \b\b \b\b \b\b \bPS2=''_echo\b \b\b \b\b \b\b \b\b \b.
15:06:48.621670 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.621925 tramp-set-connection-property (7) # check-remote-echo nil
15:06:48.622168 tramp-check-for-regexp (5) # echo-mark found
15:06:48.622403 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.622656 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:48.631458 tramp-accept-process-output (10) # 
///f91d08a5c9f7a0fe8dcbcc3043d7186b#$
15:06:48.631699 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.631945 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.632192 tramp-wait-for-regexp (6) # 
///f91d08a5c9f7a0fe8dcbcc3043d7186b#$
15:06:48.632518 tramp-get-connection-property (7) # process-name nil
15:06:48.632796 tramp-get-connection-property (7) # remote-echo t
15:06:48.633048 tramp-set-connection-property (7) # check-remote-echo t
15:06:48.633275 tramp-send-command (6) # _echo\b\b\b\b\bPS3=''_echo\b\b\b\b\b
15:06:48.633501 tramp-get-connection-property (7) # process-name nil
15:06:48.633767 tramp-get-connection-property (7) # chunksize nil
15:06:48.634021 tramp-set-connection-property (7) # last-cmd-time (19238 18040 633917)
15:06:48.634264 tramp-send-string (10) # _echo\b\b\b\b\bPS3=''_echo\b\b\b\b\b
15:06:48.634489 tramp-get-connection-property (7) # process-buffer nil
15:06:48.634786 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.635031 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.635266 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:48.651491 tramp-accept-process-output (10) # 
_echo\b \b\b \b\b \b\b \b\b \bPS3=''_echo\b \b\b \b\b \b\b \b\b \b.
///f91d08a5c9f7a0fe8dcbcc3043d7186b#$
15:06:48.651746 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.652002 tramp-set-connection-property (7) # check-remote-echo nil
15:06:48.652245 tramp-check-for-regexp (5) # echo-mark found
15:06:48.652485 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.652748 tramp-wait-for-regexp (6) # 
///f91d08a5c9f7a0fe8dcbcc3043d7186b#$
15:06:48.653080 tramp-get-connection-property (7) # process-name nil
15:06:48.653357 tramp-get-connection-property (7) # remote-echo t
15:06:48.653613 tramp-set-connection-property (7) # check-remote-echo t
15:06:48.653843 tramp-send-command (6) # _echo\b\b\b\b\bPROMPT_COMMAND=''_echo\b\b\b\b\b
15:06:48.654070 tramp-get-connection-property (7) # process-name nil
15:06:48.654338 tramp-get-connection-property (7) # chunksize nil
15:06:48.654599 tramp-set-connection-property (7) # last-cmd-time (19238 18040 654496)
15:06:48.654852 tramp-send-string (10) # _echo\b\b\b\b\bPROMPT_COMMAND=''_echo\b\b\b\b\b
15:06:48.655084 tramp-get-connection-property (7) # process-buffer nil
15:06:48.655410 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.655656 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.655896 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:48.671471 tramp-accept-process-output (10) # 
_echo\b \b\b \b\b \b\b \b\b \bPROMPT_COMMAND=''_echo\b \b\b \b\b \b\b \b\b \b.
15:06:48.671693 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.671981 tramp-set-connection-property (7) # check-remote-echo nil
15:06:48.672229 tramp-check-for-regexp (5) # echo-mark found
15:06:48.672476 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.672741 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:48.673060 tramp-accept-process-output (10) # 
///f91d08a5c9f7a0fe8dcbcc3043d7186b#$
15:06:48.673335 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.673638 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.673894 tramp-wait-for-regexp (6) # 
///f91d08a5c9f7a0fe8dcbcc3043d7186b#$
15:06:48.674219 tramp-open-connection-setup-interactive-shell (5) # Determining coding system
15:06:48.674451 tramp-get-connection-property (7) # process-name nil
15:06:48.674737 tramp-get-connection-property (7) # remote-echo t
15:06:48.674997 tramp-set-connection-property (7) # check-remote-echo t
15:06:48.675229 tramp-send-command (6) # _echo\b\b\b\b\becho foo ; echo bar_echo\b\b\b\b\b
15:06:48.675461 tramp-get-connection-property (7) # process-name nil
15:06:48.675740 tramp-get-connection-property (7) # chunksize nil
15:06:48.676030 tramp-set-connection-property (7) # last-cmd-time (19238 18040 675903)
15:06:48.676280 tramp-send-string (10) # _echo\b\b\b\b\becho foo ; echo bar_echo\b\b\b\b\b
15:06:48.676512 tramp-get-connection-property (7) # process-buffer nil
15:06:48.676818 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.677074 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.677315 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:48.691459 tramp-accept-process-output (10) # 
_echo\b \b\b \b\b \b\b \b\b \becho foo ; echo bar_echo\b \b\b \b\b \b\b \b\b \b.
15:06:48.691679 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.711752 tramp-set-connection-property (7) # check-remote-echo nil
15:06:48.712037 tramp-check-for-regexp (5) # echo-mark found
15:06:48.712292 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.712537 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:48.713006 tramp-accept-process-output (10) # 
foo
bar
///f91d08a5c9f7a0fe8dcbcc3043d7186b#$
15:06:48.713249 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.713492 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.713744 tramp-wait-for-regexp (6) # 
foo
bar
///f91d08a5c9f7a0fe8dcbcc3043d7186b#$
15:06:48.714094 tramp-open-connection-setup-interactive-shell (5) # Setting coding system to `utf-8-unix' and `utf-8-unix'
15:06:48.714392 tramp-get-connection-property (7) # process-name nil
15:06:48.714661 tramp-get-connection-property (7) # remote-echo t
15:06:48.714914 tramp-set-connection-property (7) # check-remote-echo t
15:06:48.715147 tramp-send-command (6) # _echo\b\b\b\b\bset +o vi +o emacs_echo\b\b\b\b\b
15:06:48.715377 tramp-get-connection-property (7) # process-name nil
15:06:48.715640 tramp-get-connection-property (7) # chunksize nil
15:06:48.715895 tramp-set-connection-property (7) # last-cmd-time (19238 18040 715792)
15:06:48.716142 tramp-send-string (10) # _echo\b\b\b\b\bset +o vi +o emacs_echo\b\b\b\b\b
15:06:48.716368 tramp-get-connection-property (7) # process-buffer nil
15:06:48.716681 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.716919 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.717155 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:48.741462 tramp-accept-process-output (10) # 
_echo\b \b\b \b\b \b\b \b\b \bset +o vi +o emacs_echo\b \b\b \b\b \b\b \b\b \b.
///f91d08a5c9f7a0fe8dcbcc3043d7186b#$
15:06:48.741705 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.741958 tramp-set-connection-property (7) # check-remote-echo nil
15:06:48.742201 tramp-check-for-regexp (5) # echo-mark found
15:06:48.742441 tramp-get-connection-property (7) # check-remote-echo nil
15:06:48.742700 tramp-wait-for-regexp (6) # 
///f91d08a5c9f7a0fe8dcbcc3043d7186b#$
15:06:48.743019 tramp-open-connection-setup-interactive-shell (5) # Checking system information
15:06:48.743242 tramp-get-connection-property (7) # uname OpenBSD 4.5
15:06:48.743476 tramp-get-connection-property (7) # process-name nil
15:06:48.743746 tramp-get-connection-property (7) # last-cmd-time (19238 18040 715792)
15:06:48.744008 tramp-get-connection-property (7) # process-name nil
15:06:48.744274 tramp-get-connection-property (7) # remote-echo t
15:06:48.744524 tramp-set-connection-property (7) # check-remote-echo t
15:06:48.744758 tramp-send-command (6) # _echo\b\b\b\b\becho \"`uname -sr`\" 2>/dev/null; echo tramp_exit_status $?_echo\b\b\b\b\b
15:06:48.745002 tramp-get-connection-property (7) # process-name nil
15:06:48.745270 tramp-get-connection-property (7) # chunksize nil
15:06:48.745524 tramp-set-connection-property (7) # last-cmd-time (19238 18040 745422)
15:06:48.745770 tramp-send-string (10) # _echo\b\b\b\b\becho \"`uname -sr`\" 2>/dev/null; echo tramp_exit_status $?_echo\b\b\b\b\b
15:06:48.746000 tramp-get-connection-property (7) # process-buffer nil
15:06:48.746297 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.746537 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.746775 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:48.811461 tramp-accept-process-output (10) # 
"OpenBSD 4.5"
tramp_exit_status 0
15:06:48.811679 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.811920 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.812153 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:48.821459 tramp-accept-process-output (10) # 
"OpenBSD 4.5"
tramp_exit_status 0
///f91d08a5c9f7a0fe8dcbcc3043d7186b#$
15:06:48.821698 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.821942 tramp-get-connection-property (7) # check-remote-echo t
15:06:48.822175 tramp-accept-process-output (10) # *tramp/scp root@harry* run
15:06:49.823553 tramp-accept-process-output (10) # 
"OpenBSD 4.5"
tramp_exit_status 0
///f91d08a5c9f7a0fe8dcbcc3043d7186b#$

[and it loops there.]


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
  2009-12-14 14:20                         ` Raphaël Berbain
@ 2009-12-15  6:27                           ` Michael Albinus
       [not found]                           ` <mailman.12991.1260858434.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 26+ messages in thread
From: Michael Albinus @ 2009-12-15  6:27 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1247 bytes --]

raphael.berbain@gmail.com (Raphaël Berbain) writes:

> Hi again,

Hi,

> I tried my use-case with CVS head tramp (tramp-version 2.1.18-pre,
> tramp.el CVS revision 2.757) and I am sorry to report that it doesn't
> work for me.

> 15:06:48.386653 tramp-send-command (6) # exec env ENV='' PROMPT_COMMAND='' PS1=\#\$\  PS2='' PS3='' /bin/sh
> 15:06:48.472304 tramp-wait-for-regexp (6) # 
> exec env ENV='' PROMPT_COMMAND='' PS1=\#\$\  PS2='' PS3='' /bin/sh.
> #$ 

At least, we have fixed the prompt problem :-)

> 15:06:48.533579 tramp-send-command (6) # _echo\b\b\b\b\bstty icanon erase ^H cols 32767_echo\b\b\b\b\b
> 15:06:48.561471 tramp-accept-process-output (10) # 
> _echo\b \b\b \b\b \b\b \b\b \bstty icanon erase ^H cols 32767_echo\b \b\b \b\b \b\b \b\b \b.

Your shell on the remote side cannot suppress echoing the sent
command. Therefore, Tramp applies some special workarounds.

> 15:06:48.746775 tramp-accept-process-output (10) # *tramp/scp root@harry* run
> 15:06:48.811461 tramp-accept-process-output (10) # 
> "OpenBSD 4.5"
> tramp_exit_status 0

Surprisingly, your remote shell stops to echo the sent command. Tramp
looks for the echo, and is confused ...

Could you, please, test the appended fix?

Best regards, Michael.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1065 bytes --]

*** /home/albinus/src/tramp/lisp/tramp.el.~2.757.~	2009-12-09 10:06:48.000000000 +0100
--- /home/albinus/src/tramp/lisp/tramp.el	2009-12-15 07:18:45.000000000 +0100
***************
*** 6562,6568 ****
  	  (delete-region begin (point))
  	  (goto-char (point-min)))))
  
!     (when (not (tramp-get-connection-property proc "check-remote-echo" nil))
        ;; No echo to be handled, now we can look for the regexp.
        (goto-char (point-min))
        (re-search-forward regexp nil t))))
--- 6562,6573 ----
  	  (delete-region begin (point))
  	  (goto-char (point-min)))))
  
!     (when (or (not (tramp-get-connection-property proc "check-remote-echo" nil))
! 	      ;; Sometimes, the echo string is suppressed on the remote side.
! 	      (not (string-equal
! 		    (substring-no-properties
! 		     tramp-echo-mark-marker 0 (min 5 (1- (point-max))))
! 		    (buffer-substring-no-properties 1 (min 6 (point-max))))))
        ;; No echo to be handled, now we can look for the regexp.
        (goto-char (point-min))
        (re-search-forward regexp nil t))))

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
       [not found]                           ` <mailman.12991.1260858434.2239.help-gnu-emacs@gnu.org>
@ 2009-12-15  8:14                             ` Raphaël Berbain
  2009-12-15 21:17                               ` Michael Albinus
  0 siblings, 1 reply; 26+ messages in thread
From: Raphaël Berbain @ 2009-12-15  8:14 UTC (permalink / raw)
  To: help-gnu-emacs

* Michael Albinus:

> Your shell on the remote side cannot suppress echoing the sent
> command. Therefore, Tramp applies some special workarounds.
>
>> 15:06:48.746775 tramp-accept-process-output (10) # *tramp/scp root@harry* run
>> 15:06:48.811461 tramp-accept-process-output (10) # 
>> "OpenBSD 4.5"
>> tramp_exit_status 0
>
> Surprisingly, your remote shell stops to echo the sent command. Tramp
> looks for the echo, and is confused ...

What a shell, eh?

> Could you, please, test the appended fix?

It works.  Thank you!


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remote tramp hangs
  2009-12-15  8:14                             ` Raphaël Berbain
@ 2009-12-15 21:17                               ` Michael Albinus
  0 siblings, 0 replies; 26+ messages in thread
From: Michael Albinus @ 2009-12-15 21:17 UTC (permalink / raw)
  To: help-gnu-emacs

raphael.berbain@gmail.com (Raphaël Berbain) writes:

>> Surprisingly, your remote shell stops to echo the sent command. Tramp
>> looks for the echo, and is confused ...
>
> What a shell, eh?

Hmm. Yes. Not boring. Hmm.

>> Could you, please, test the appended fix?
>
> It works.  Thank you!

Thanks for testing. I've committed (a slightly modified version of) the
patch to the repositories.

Best regards, Michael.




^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2009-12-15 21:17 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-01 11:03 remote tramp hangs Raphaël Berbain
2009-12-01 18:16 ` Andreas Politz
2009-12-01 19:04 ` Peter Dyballa
2009-12-01 19:47 ` Harry Putnam
2009-12-01 20:12 ` Michael Albinus
     [not found] ` <mailman.11972.1259694305.2239.help-gnu-emacs@gnu.org>
2009-12-01 21:46   ` Raphaël Berbain
     [not found] ` <mailman.11976.1259697012.2239.help-gnu-emacs@gnu.org>
2009-12-01 21:54   ` Raphaël Berbain
     [not found] ` <mailman.11977.1259698390.2239.help-gnu-emacs@gnu.org>
2009-12-01 21:55   ` Raphaël Berbain
2009-12-02  9:23     ` Michael Albinus
     [not found]     ` <mailman.12019.1259745826.2239.help-gnu-emacs@gnu.org>
2009-12-02  9:56       ` Raphaël Berbain
2009-12-02 10:15         ` Tim X
2009-12-02 13:56           ` Raphaël Berbain
2009-12-02 13:01         ` Michael Albinus
2009-12-02 17:02           ` Andreas Politz
     [not found]         ` <mailman.12025.1259758918.2239.help-gnu-emacs@gnu.org>
2009-12-02 13:56           ` Raphaël Berbain
2009-12-02 21:33             ` Michael Albinus
     [not found]             ` <mailman.12053.1259789634.2239.help-gnu-emacs@gnu.org>
2009-12-03  9:35               ` Raphaël Berbain
2009-12-03 11:22                 ` Raphaël Berbain
2009-12-03 20:58                   ` Michael Albinus
     [not found]                   ` <mailman.12120.1259873928.2239.help-gnu-emacs@gnu.org>
2009-12-03 22:50                     ` Raphaël Berbain
2009-12-07  6:43                       ` Michael Albinus
     [not found]                       ` <mailman.12409.1260168197.2239.help-gnu-emacs@gnu.org>
2009-12-14 14:20                         ` Raphaël Berbain
2009-12-15  6:27                           ` Michael Albinus
     [not found]                           ` <mailman.12991.1260858434.2239.help-gnu-emacs@gnu.org>
2009-12-15  8:14                             ` Raphaël Berbain
2009-12-15 21:17                               ` Michael Albinus
2009-12-02 22:03 ` notbob

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.