Warum bleibt Tramp hängen, wenn Perl-Skripte an den Remote-Host gesendet werden?

Warum bleibt Tramp hängen, wenn Perl-Skripte an den Remote-Host gesendet werden?

Ich weiß, dass dies nicht direkt mit der Programmierung zusammenhängt, aber ich bin ratlos, und da Emacs mein wichtigstes Programmiertool ist ...

Ich versuche, Tramp so einzurichten, dass es eine Verbindung zu meinem Testhost herstellt. Ich rufe es entweder mit /ssh:host:.bashrcoder /scp:host:.bashrcauf, aber beide führen früher oder später zum selben Problem.

Sie kommen nur bis zum ersten Versuch, ein Perl-Skript zu senden, bevor der Prozess abbricht und ich gezwungen bin, die SSH-Sitzung von einem Client aus zu beenden.

Zum Beispiel:

tramp: Opening connection for username@host using scp...
tramp: Waiting 60s for local shell to come up...
tramp: Sending command `ssh host -l username  -e none || exit'
tramp: Waiting for prompts from remote shell
tramp: Waiting 60s for prompt from remote shell on host host
tramp: Found remote shell prompt on `host'
tramp: Waiting 30s for remote `/bin/sh' to come up...
tramp: Setting up remote shell environment
tramp: Determining coding system
tramp: Waiting 30s for `HISTFILE=$HOME/.tramp_history; HISTSIZE=1; export HISTFILE; export HISTSIZE'
tramp: Waiting 30s for `set +o vi +o emacs'
tramp: Waiting 30s for `unset MAIL MAILCHECK MAILPATH'
tramp: Waiting 30s for `unset CDPATH'
tramp: Setting shell prompt
tramp: Remote `/bin/sh' groks tilde expansion, good
tramp: Finding command to check if file exists
tramp: Finding a suitable `ls' command
tramp: Checking remote `/bin/ls' command for `-n' option
tramp: Testing remote command `/bin/ls' for -n...okay
tramp: Using remote command `/bin/ls' for getting directory listings
tramp: Sending the Perl script `tramp_file_attributes'...
tramp-wait-for-output: Process has died

Dieser Trace verwendet die scpMethode. Die sshMethode sieht folgendermaßen aus:

tramp: Opening connection for username@host using ssh...
tramp: Waiting 60s for local shell to come up...
tramp: Sending command `ssh host -l username  -e none || exit'
tramp: Waiting for prompts from remote shell
tramp: Waiting 60s for prompt from remote shell on host host
tramp: Found remote shell prompt on `host'
tramp: Waiting 30s for remote `/bin/sh' to come up...
tramp: Setting up remote shell environment
tramp: Determining coding system
tramp: Waiting 30s for `HISTFILE=$HOME/.tramp_history; HISTSIZE=1; export HISTFILE; export HISTSIZE'
tramp: Waiting 30s for `set +o vi +o emacs'
tramp: Waiting 30s for `unset MAIL MAILCHECK MAILPATH'
tramp: Waiting 30s for `unset CDPATH'
tramp: Setting shell prompt
tramp: Remote `/bin/sh' groks tilde expansion, good
tramp: Finding command to check if file exists
tramp: Finding a suitable `ls' command
tramp: Checking remote `/bin/ls' command for `-n' option
tramp: Testing remote command `/bin/ls' for -n...okay
tramp: Using remote command `/bin/ls' for getting directory listings
tramp: Sending the Perl `mime-encode' implementations.
tramp-wait-for-output: Process has died

Wie Sie sehen, wird als letztes versucht, das Perl-Skript zu senden. Der Prozess wird beendet, weil ich ihn in einer anderen Shell beende, sonst kommt Emacs nie wieder davon zurück.

Ich verbinde mich FreeBSD 6.2-RELEASE-p5von OSX 10.5.7 aus, falls das einen Unterschied macht, und verwende Tramp 2.0.58-preim Carbon Emacs 22.3.1 Build.

Antwort1

Vielleicht zeigt Ihnen strace auf der PID von sshd auf der Empfangsseite (dem FreeBSD-Server), wo es hängt. Sie müssen untergeordnete Prozesse mit -f verfolgen. Wenn die PID von sshd 3125 ist:

sudo strace -vfp 3125 -o sshdStraceDump.txt

verwandte Informationen