[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

sshd freezed on my (@#$%&^*!)



I have an extremely annoying problem I hope someone can help me with, or
at least make some suggestion.  The environment is complex,
unfortunately, but...


I work remotely from home.  I'm running Debian "sarge" on both the local
and work systems.

I do a lot of work in Emacs, and rather than start a graphical Emacs and
DISPLAY through the VPN, which is slow (yes, I know about VNC etc.; I'm
happy with my current method for various reasons), I start a terminal
here, ssh to my system at work, and run "emacs -nw" to force TTY-mode
Emacs.  So basically I run something like this:

  rxvt -e ssh -t <remotehost> emacs -nw

This works fine EXCEPT... every so often it will completely freeze up.
Nothing I type is seen by the Emacs session.  The only way I can get out
of this is to kill the sshd on the remote system.  All my other
sessions/terminals/etc. continue to run fine, by the way, and if I start
another Emacs that works fine too.  It's nothing like that.


As best as I can tell, the problem is that the remote sshd gets wedged.
Here is my debugging so far that supports this supposition.  First, the
processes look like this:

  me -> keyboard -> X server -> rxvt -> ssh ->...network...-> sshd -> emacs

  * I've attached strace to the local rxvt, the local ssh, and the
    remote emacs processes.  When I type a key, I see that the local
    rxvt does a bunch of processing, and the local ssh sends the info to
    the remote sshd.  However, the remote Emacs never gets that
    keypress.

    However, the Emacs process is working (it is waiting on select() and
    every now and then wakes up to do stuff like autosave, etc.)

  * I cannot attach strace to the remote sshd process, even as root: it
    has some kind of security mode enabled.  So, I don't know whether it
    receives any info.  Anyone know how I can tell if it's getting
    anything from the network?

  * If I kill the Emacs, nothing happens; the kill is ignored.  If I
    kill -9 emacs, then I get a defunct Emacs process: so, the sshd is
    not noticing the SIGCHLD.  This leads me to believe sshd is wedged
    somewhere.

  * If I kill the sshd, then the whole thing comes down immediately: the
    local ssh realizes the remote server has gone away and closes, and
    the rxvt closes as well.


Even though Emacs autosaves everything so I don't lose any work, it's
really frustrating to have to restart my Emacs and recover all the
buffers.  This happens once or twice a day, it seems like.

Ideas?  Pointers on how to get further with debugging?

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@nortel.com>           HASMAT--HA Software Mthds & Tools
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.



Reply to: