This is the mail archive of the
cygwin-xfree
mailing list for the Cygwin XFree86 project.
1.7.2: ssh -X unresponsive until xauth PPID killed
- From: Mark McConnell <markd dot mcconnell at gmail dot com>
- To: cygwin-xfree at cygwin dot com
- Date: Sat, 27 Mar 2010 14:27:21 -0700
- Subject: 1.7.2: ssh -X unresponsive until xauth PPID killed
- Reply-to: cygwin-xfree at cygwin dot com
After installing Cygwin 1.7.2 for the first time on Windows Server 2008 SP2,
I discovered that I could not connect to a remote host using Cygwin's ssh,
if X is forwarded.
ssh -X host or ssh -Y host : program becomes unresponsive.
I've attached the output of cygcheck -s -v -r to this message, and
/var/log/XWin.0.log. I should mention as an aside that there are other
clues that my Cygwin installation is flawed (a local gvim gui will not
display, man dumps core).
Below, I describe two experiments that indicate that my X forwarding problem
is somehow related to xauth* and its PPID:
### 'ssh -X host gui' displays if the PPID of xauth* is killed ###
First, I open a new mintty window within the Cygwin environment and issue
the command to start gvim on the remote server, using the forwarded X
display. No gui is displayed. The cursor returns below the prompt. ^d or
^c do not terminate the process ( however, I can suspend it from that window
by typing ^z, and I can return it to the foreground with "fg <job>" ).
pt0 $ ssh -X dasftp gvim
|
I open a second mintty instance and look at the process running locally:
pt1 $ ps
PID PPID PGID WINPID TTY UID STIME COMMAND
4532 1 4532 5296 con 11137 11:40:42 /usr/bin/XWin
3432 4532 3432 4244 ? 11137 13:15:21 /usr/bin/mintty
3364 3432 3364 3688 0 11137 13:15:21 /usr/bin/bash
5972 3364 5972 2436 0 11137 13:15:39 /usr/bin/ssh
5792 5972 5972 5792 0 11137 13:15:39 /usr/bin/sh
2632 5792 5972 2548 0 11137 13:15:39 /usr/bin/xauth
In the second terminal I kill the sh* process that is the parent of xauth*.
The remote gvim gui immediately appears. xauth* is now running with PPID 1
pt1 $ ps | grep /usr/bin/sh | sed -e 's/^\s*//' | kill `sed -e 's/\s.*//'` ;
ps
PID PPID PGID WINPID TTY UID STIME COMMAND
4532 1 4532 5296 con 11137 11:40:42 /usr/bin/XWin
3432 4532 3432 4244 ? 11137 13:15:21 /usr/bin/mintty
3364 3432 3364 3688 0 11137 13:15:21 /usr/bin/bash
5972 3364 5972 2436 0 11137 13:15:39 /usr/bin/ssh
2632 1 5972 2548 0 11137 13:15:39 /usr/bin/xauth
After closing gvim, I take a peek at the processes left behind. ssh* has
terminated, bash* has been idle, xauth* continues to run even if X is
closed. Its PPID has changed to 1
pt1 $ ps
PID PPID PGID WINPID TTY UID STIME COMMAND
4532 1 4532 5296 con 11137 11:40:42 /usr/bin/XWin
3432 4532 3432 4244 ? 11137 13:15:21 /usr/bin/mintty
I 3364 3432 3364 3688 0 11137 13:15:21 /usr/bin/bash
2632 1 5972 2548 0 11137 13:15:39 /usr/bin/xauth
pt1 $ kill 2632
bash: kill: (2632) - Resource temporarily unavailable
Summarizing: SSH authentication succeeds but the ssh* is unresponsive when
started with X forwarding. Killing the PPID of xauth* leaves it running in
the background. xauth* will remain running even after the X server is
closed. To kill the zombie xauth* I use Windows Task Manager.
## 'ssh -X host' succeeds after PPID of xauth* is killed ##
Here's a simplified version of the experiment.
In terminal 1:
pt0 $ ssh -v -v -X dasftp 2> ssh.out
In terminal 2, I kill the PPID of xauth* (/usr/bin/sh):
pt1 $ ps | grep /usr/bin/sh | sed -e 's/^\s*//' | kill `sed -e 's/\s.*//'` ;
In terminal 1 (connected to 'host'):
Welcome to dasftp
pt3 $
I have attached ssh.out also, which is the debug output of "ssh -v -v -X
host". I can provide a much more detailed description of the steps I've
followed, if that would be helpful.
Many thanks,
Mark
--
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ: http://x.cygwin.com/docs/faq/