On Sun, 2006-06-25 at 14:20 -0500, Larry Vaden wrote:
Hello,
Is anyone else having problems with the ssh session output stalling when ssh'd to another system and the command is running via sudo and a pager is being used (e.g., more)?
Too highly reproducible :( to date, all known occurrences have involved Centos 4.3 servers; makes no difference whether client is RHEL WS 4.3, Centos 4.3 or FC 5 or WinDoze. Makes no difference if terminal emulator is Gnome's stock issue or Konsole or Putty. Not sure about SecureCRT.
If sudo is removed from the mix, does it still happen?
Sometimes one can break loose the logjam; if so: . terminal prompts are stacked left to right vs. vertically . keyboard input is not echo'd
These two tell us that end-of-line and other terminal settings (usually NL on *IX systems, but I don't know about ssh) are getting lost before the pager is seeing them. Possibly doing stty against the pseudo-terms involved will give a clue?
. in this event, terminal clear/reset doesn't end if so.
Any thoughts?
Generally, having a pager involved when there are interactive prompts ("terminal prompts are stacked...") is a bad idea. Commands often issue prompts with no EOL so that you see on one line something like
Enter reply [Y/N/Q] -
and the cursor is after the dash. The pager usually works on *lines* not *characters*, although some used to have timeouts that could be applied to force output flushing (don't know if this applies anymore).
Wish I had more to offer than just a couple Qs that might get you going.
rgds/ldv
[vaden@mx1 ~]$ ps auxw | grep -i pts/0 vaden 2475 0.0 0.1 37444 3064 ? S 04:53 0:00 sshd: vaden@pts/0 vaden 2476 0.0 0.0 53964 1480 pts/0 Ss 04:53 0:00 -bash root 2511 0.0 0.0 71284 1312 pts/0 S 04:53 0:00 su - root 2512 0.0 0.0 53968 1492 pts/0 S 04:53 0:00 -bash root 3426 0.0 0.0 2376 288 pts/0 S+ 13:57 0:00 sesh /bin/grep -i unknown /var/log/maillog root 3427 0.1 0.0 51128 784 pts/0 S+ 13:57 0:00 /bin/grep -i unknown /var/log/maillog vaden 3434 0.0 0.0 51072 540 pts/1 R+ 13:58 0:00 grep -i pts/0
<snip sig stuff>