Perl 스크립트를 원격 호스트로 보낼 때 Tramp가 정지되는 이유는 무엇입니까?

Perl 스크립트를 원격 호스트로 보낼 때 Tramp가 정지되는 이유는 무엇입니까?

이것이 프로그래밍과 직접적인 관련이 없다는 것은 알지만 어리둥절하고, Emacs가 나의 주요 프로그래밍 도구이기 때문에…

테스트 호스트에 연결하기 위해 Tramp를 설정하려고 합니다. /ssh:host:.bashrc또는 를 사용하여 호출하고 있지만 /scp:host:.bashrc둘 다 조만간 동일한 문제에 직면하게 됩니다.

프로세스가 중단되기 전에 Perl 스크립트를 보내려는 첫 번째 시도까지만 도달하고 클라이언트에서 SSH 세션을 종료해야 합니다.

예를 들어:

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

이 추적은 메서드를 사용하고 있습니다 scp. 방법 ssh은 다음과 같습니다.

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

보시다시피 마지막으로 일어나는 일은 Perl 스크립트를 보내려는 것입니다. 다른 쉘에서 프로세스를 종료하기 때문에 프로세스가 죽어가고 있습니다. 그렇지 않으면 emacs가 이 프로세스에서 다시 돌아오지 않습니다.

FreeBSD 6.2-RELEASE-p5차이점이 있다면 2.0.58-preCarbon Emacs 22.3.1 빌드에서 Tramp를 사용하여 OSX 10.5.7에서 연결하겠습니다 .

답변1

아마도 수신측(FreeBSD 서버)의 sshd pid에 대한 strace를 수행하면 어디가 잠겨 있는지 알 수 있을 것입니다. -f를 사용하여 하위 프로세스를 따라야 합니다. SSHD의 PID가 3125인 경우:

sudo strace -vfp 3125 -o sshdStraceDump.txt

관련 정보