Bug 2816 - tty misbehaving
Summary: tty misbehaving
Status: CLOSED INVALID
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: 7.6p1
Hardware: SPARC Solaris
: P5 major
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-05 09:30 AEDT by Ted Carr
Modified: 2021-04-23 14:53 AEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ted Carr 2018-01-05 09:30:48 AEDT
I recently compiled 7.6p1, same as I did 7.4p1.  After successfully logging into the server now running 7.6p1 resizing my terminal window is not reflected in my ssh session.  The tty remains fixed at 80 cols / 24 lines.  For example, I am using SecureCRT to connect to the test system and after resizing my window to 194x43, tput lines still returns 24 and tput cols returns 80.  Shrinking the terminal window to 54x10 also has no effect.  Bash shell and 'checkwinsize' set to 'on'.

Oracle Developer Studio 12.6

Build Environment:
LDFLAGS=-xlang=c99 -m64 -fast
CXXCPP=CC -E
CPPFLAGS=-xlang=c99 -m64 -mt -fast -xcode=pic32
CXXFLAGS=-m64
CPP=cc -E
SOFLAGS=-G
LD=cc
CXX=CC
CFLAGS=-m64
CC=cc
Comment 1 Ted Carr 2018-01-05 09:33:19 AEDT
Build machine is 5.10 Generic_150400-52 SPARC-Enterprise-T5220
Comment 2 Darren Tucker 2018-01-05 10:51:52 AEDT
Is the client on Solaris, the server on Solaris or both?

Could you please attach (vie "Add an attacment") the generated config.h files from both 7.4p1 and 7.6p1 builds?

Also please log in using ssh -vvv and try resizing your window.  You should see something like this:

$ stty | grep rows
rows = 24; columns = 86; ypixels = 0; xpixels = 0;
[resize here]
debug2: client_check_window_change: changed
debug2: channel 0: request window-change confirm 0
debug3: send packet: type 98
$ stty | grep rows
rows = 24; columns = 87; ypixels = 0; xpixels = 0;

That should help narrow it down to whether or not the client is sending the window change messages.  (actually please attach the entire output of this ssh session too).
Comment 3 Ted Carr 2018-01-05 11:05:06 AEDT
Hi Darren,

Thanks for having a look.  Unfortunately I did not save the config.h from the 7.4p1 build.  I am in the middle of rebuilding both versions to ensure that it is not me that is causing the issue.  My client is SecureCRT running on my Mac and OpenSSH 7.6p1 running on Solaris 10 SPARC.  I will upload the new config.h files once I have them.

Here is the output from the SecureCRT session with trace turned on.  It printed out the [LOCAL] messages as I resized the window.

●[ted.carr@testldom01:~]
[18:56:01] -> [LOCAL] : SEND[0]: window-change (rows: 42, cols: 189)
[LOCAL] : SEND[0]: window-change (rows: 36, cols: 161)
[LOCAL] : SEND[0]: window-change (rows: 31, cols: 140)
[LOCAL] : SEND[0]: window-change (rows: 28, cols: 128)
[LOCAL] : SEND[0]: window-change (rows: 26, cols: 123)
[LOCAL] : SEND[0]: window-change (rows: 26, cols: 122)
[LOCAL] : SEND[0]: window-change (rows: 26, cols: 121)
[LOCAL] : SEND[0]: window-change (rows: 26, cols: 123)
[LOCAL] : SEND[0]: window-change (rows: 28, cols: 136)
[LOCAL] : SEND[0]: window-change (rows: 31, cols: 148)
[LOCAL] : SEND[0]: window-change (rows: 33, cols: 160)
[LOCAL] : SEND[0]: window-change (rows: 35, cols: 168)
[LOCAL] : SEND[0]: window-change (rows: 38, cols: 178)
[LOCAL] : SEND[0]: window-change (rows: 40, cols: 188)
[LOCAL] : SEND[0]: window-change (rows: 41, cols: 190)
[LOCAL] : SEND[0]: window-change (rows: 42, cols: 193)
[LOCAL] : SEND[0]: window-change (rows: 43, cols: 194)
[18:56:01] -> stty | grep rows
●[ted.carr@testldom01:~]
[18:56:50] -> stty
speed 9600 baud;
swtch = <undef>;
tab3
●[ted.carr@testldom01:~]
[18:57:17] ->
Comment 4 Darren Tucker 2018-01-05 11:10:52 AEDT
I just tried to reproduce on a Solaris 10 VM I have here (with an OpenSSH on Linux client) and it resized OK.

Can you try it with a different client?  OS X ships with OpenSSH so you should have one available.
Comment 5 Ted Carr 2018-01-06 06:35:48 AEDT
From the OpenSSH client on the mac I do see the debug messages, however, the output from 'tput lines' and 'tput cols' never changes.

●[ted.carr@testldom01:~]
[14:23:36] -> tput lines
24
●[ted.carr@testldom01:~]
[14:23:40] -> tput cols
80
●[ted.carr@testldom01:~]
[14:23:45] -> debug2: client_check_window_change: changed
debug2: channel 0: request window-change confirm 0
debug3: send packet: type 98
debug2: client_check_window_change: changed
debug2: channel 0: request window-change confirm 0
debug3: send packet: type 98
debug2: client_check_window_change: changed
debug2: channel 0: request window-change confirm 0
debug3: send packet: type 98
debug2: client_check_window_change: changed
debug2: channel 0: request window-change confirm 0
debug3: send packet: type 98
debug2: client_check_window_change: changed
debug2: channel 0: request window-change confirm 0
debug3: send packet: type 98
debug2: client_check_window_change: changed
debug2: channel 0: request window-change confirm 0
debug3: send packet: type 98
[14:23:45] -> tput lines
24
●[ted.carr@testldom01:~]
[14:25:53] -> tput cols
80

Running stty on my system does not output anything other than:

●[ted.carr@testldom01:~]
[14:26:12] -> stty
speed 9600 baud;
swtch = <undef>;
tab3

Just an FYI.
Comment 6 Darren Tucker 2018-01-06 13:40:03 AEDT
(In reply to Ted Carr from comment #5)
> From the OpenSSH client on the mac I do see the debug messages,
> however, the output from 'tput lines' and 'tput cols' never changes.

OK so it seems to be on the server side.  Could you please attach the two config.h files as previously described and also run the server in debug mode ("/path/to/sshd -ddde -p 2222" then connect on port 2222).  If possible attach the logs from the working and non-working versions.
Comment 7 Ted Carr 2018-01-07 07:34:05 AEDT
Darren, My apologies.  The issue was caused by a misconfiguration in my build environment.  I have successfully built and tested version 7.6p1.  Please disregard.
Comment 8 Damien Miller 2021-04-23 14:53:13 AEST
closing resolved bugs as of 8.6p1 release