# tch, csh, ksh hang



## lpb2ha (Aug 29, 2008)

Hi, we first experienced experienced this problem a few weeks ago. All of a sudden, on 3 different macs (Mac Pro 10.5.4 OS X Server, Mac Pro 10.5.4, and 2004 xserve, 10.4.*  OS X Server), within the space of a few days, the 3 machines' were incapable of launching a shell.


When I try to log in to the machine through ssh remotely, after receiving my password, the terminal hangs.
 Terminal hangs on launch
 iTerm hangs on launch
 xterm  hangs on launch
 Double clicking on tcsh, csh or ksh from Finder in /bin launches a Terminal window that hangs.

In all cases, I would not get a login prompt.

I tried from different users accounts that have different default shells (bash vs. tcsh). I tried changing the login shell from default to tcsh to zsh.

This I find to be very bizarre. I don't know what the commonality is for those applications. I don't think there is a common .login script that is used.

The computers otherwise seem to be working fine. I have web services, mysql, applications all seeming to work normally.

I can't see anything suspicious in my Console log files.

Last time I solved the problem on the 3 compouters by rebooting. But it has happened again (2-3 weeks later). This time I am tempted to let it be for a while until I come up with a possible solution that I can try (but not having remote access to the machine is not something that I can sustain.)

Anyone have a clue?


----------



## Giaguara (Aug 29, 2008)

What do those remote computers show at console logs for the time the ssh hung?
What does top show?


----------



## lpb2ha (Aug 29, 2008)

Thanks for asking.
I don't see much in my System.log on the client side. Terminal tells me it has launched a shell:
Aug 29 16:23:10 LBMBP login[41674]: USER_PROCESS: 41674 ttys002
but that is before I ssh.
The server responds to my login with some text that I will include with my next post (so I can copy and paste from the server), which indicates to me that the login attempt was in fact successful. I'm sure all is well from the client side since I get the same problems if I launch on the server itself.

I don't notice anything special about tops (activity monitor) on the server. One particularlity maybe is that I am running VNC (only accepts connections via ssh). Also, there is more than one sshd for some reason that I ignore. I'll paste the activity monitor output from the other machine in a few minutes.


----------



## Mikuro (Aug 29, 2008)

It sounds a bit like this problem: http://macosx.com/forums/mac-os-x-system-mac-software/299080-using-terminal.html . Short version: Try using Onyx to run the cron scripts and clear your font cache.


----------



## lpb2ha (Aug 29, 2008)

server side system log when I log in from remote host to the server via ssh (which does not give me back a login prompt)

Aug 29 16:23:28 www com.apple.SecurityServer[55]: checkpw() succeeded, creating credential for user lucb
Aug 29 16:23:28 www com.apple.SecurityServer[55]: checkpw() succeeded, creating shared credential for user lucb
Aug 29 16:23:28 www com.apple.SecurityServer[55]: Succeeded authorizing right system.login.tty by client /usr/sbin/sshd for authorization created by /usr/sbin/sshd.
Aug 29 16:23:28 www sshd[69280]: Accepted keyboard-interactive/pam for lucb from 142.58.54.15 port 60614 ssh2
Aug 29 16:24:14 www sshd[69311]: /etc/sshd_config line 70: Unsupported option KerberosGetAFSToken
Aug 29 16:26:14 www sshd[69315]: error: ssh_msg_send: write

And the server's activity monitor:
69361	 Activity Monitor	admin	1.8	7	11.18 MB	976.68 MB	Intel	
201	 AirPort Base Station Agent	admin	0.0	1	2.88 MB	890.56 MB	Intel	
82616	 AppleSpell.service	admin	0.0	1	1.60 MB	601.20 MB	Intel	
210	 AppleVNCServer	admin	0.0	4	2.27 MB	850.67 MB	Intel	
213	 ATSServer	admin	0.0	2	5.38 MB	641.68 MB	Intel	
32398	 AutoUpdate	admin	3.3	2	27.23 MB	1.04 GB	PowerPC	
68226	 Console	admin	0.0	6	10.16 MB	957.75 MB	Intel	
90842	 DiskImages UI Agent	admin	0.0	1	6.70 MB	925.44 MB	Intel	
90840	 diskimages-helpe	admin	0.1	4	7.20 MB	605.59 MB	Intel	
214	 Dock	admin	0.0	3	17.98 MB	943.20 MB	Intel	
217	 Finder	admin	0.0	16	20.93 MB	978.03 MB	Intel	
90985	 Firefox	admin	4.5	13	88.70 MB	1,014.30 MB	Intel	
196	 launchd	admin	0.0	3	556.00 KB	585.74 MB	Intel	
85	 loginwindow	admin	0.0	3	6.87 MB	926.61 MB	Intel	
69327	 mdworker	admin	0.0	4	2.06 MB	598.96 MB	Intel	
8129	 MySQL Query Browser	admin	0.0	2	6.67 MB	928.00 MB	Intel	
90687	 OSXvnc-server (Not Responding)	admin	0.0	4	3.54 MB	877.05 MB	Intel	
209	 pboard	admin	0.0	1	588.00 KB	586.62 MB	Intel	
69356	 Quick Look Server	admin	0.0	5	2.57 MB	855.50 MB	Intel	
82599	 Safari	admin	0.0	10	71.89 MB	1,006.30 MB	Intel	
68174	 smbclient	admin	0.0	1	620.00 KB	586.83 MB	Intel	
68173	 smbclient	admin	0.0	1	620.00 KB	586.83 MB	Intel	
207	 Spotlight	admin	0.0	4	3.98 MB	861.00 MB	Intel	
66119	 sshd	admin	0.0	1	528.00 KB	589.65 MB	Intel	
66091	 sshd	admin	0.0	1	528.00 KB	589.65 MB	Intel	
67962	 sshd	admin	0.0	1	516.00 KB	589.65 MB	Intel	
69120	 sshd	admin	0.0	1	528.00 KB	589.65 MB	Intel	
7571	 System Preferences	admin	0.0	6	26.60 MB	980.33 MB	Intel	
216	 SystemUIServer	admin	0.1	9	8.14 MB	926.51 MB	Intel	
231	 Terminal	admin	0.0	6	11.04 MB	929.75 MB	Intel	
208	 UserEventAgent	admin	0.0	2	2.21 MB	844.75 MB	Intel	
3805	 Vine Server	admin	0.0	5	8.82 MB	928.67 MB	Intel	
36605	 Workgroup Manager	admin	0.0	5	13.46 MB	938.85 MB	Intel


----------



## lpb2ha (Aug 29, 2008)

Mikuro said:


> It sounds a bit like this problem: http://macosx.com/forums/mac-os-x-system-mac-software/299080-using-terminal.html . Short version: Try using Onyx to run the cron scripts and clear your font cache.



I _could_ try this. But I wouldn't know that this solved the problem, since previously I found that rebooting gave me a few weeks of respite. I don't think it's a font problem because I have the same problem from remote ssh. Also, xterm fonts I believe are different (at least they were in the old days). When you remote ssh, no font information is exchanged between the client and the server.

A colleague pointed me at the following thread from Apple:
http://discussions.apple.com/thread.jspa?messageID=7813879
in my case however, Terminal does not hang.

The problem started soon after we installed some OS X updates (10.5.4 and some 10.4 update I believe--i.e., we have a mixture of OS's, but as I recall rounds of patches became available at the same time). I strongly suspect an OS X bug. This would explain why 3 servers showed the same problem.


----------

