Patch-ID# 101737-04 Keywords: SunLink TN3270 Server VTAM SSCP assert lcl3270 tn3270d Telnet Synopsis: SunLink TN3270 Server 8.0.1: Jumbo Patch Date: Jul/15/96 Solaris Release: 2.1, 2.2, 2.3, 2.4 SunOS Release: 5.1, 5.2, 5.3, 5.4 Unbundled Product: SunLink Telnet 3270 Server Unbundled Release: 8.0.1 Relevant Architectures: sparc BugId's fixed with this patch: 1103930 1169810 1159077 1164424 1169599 1173104 1173107 1173128 1173131 1173135 1214510 1220800 1248681 Changes incorporated in this version: 1214510 1220800 1248681 Patches accumulated and obsoleted by this patch: Patches which conflict with this patch: Patches required with this patch: Obsoleted by: Files included with this patch: /opt/SUNWconn/tnserver/tn3270d /opt/SUNWconn/tnserver/tn3270d.debug Problem Description: (Rev 04) 1248681: Connection to a BSC 3270 gateway sometimes fails to establish Depending upon the timing, tn3270d may fail to connect to a BSC 3270 gateway, even though there is nothing wrong with either the gateway or the client. The client gets the error message "Link error. Retrying.", and the message "gateway/link problem (reading) for client=, re-trying" is written to the tn3270d log file. 1214510: tn3270d loops when client disconnects during telnet options negotiation If the client process (tn3278 etc.) disconnects from the TN3270 Server shortly after connecting to it, while they are still in the process of telnet options negotiation, the TN3270 Server child tn3270d process may loop on a read to the TCP/IP network. 1220800: tn3270d requires client licenses A change was made so that tn3270d would no longer require client licenses. (Rev 03) 1173135: Segmentation violation in lm_timer() and problem with waiter() The timeout handler was calling license manager functions even though the license manager environment was not initialized yet. This happened when the host was down and tn3270d was retrying the gateway. This resulted in a segmentation violation in lm_timer(). Appended a newline to the "waiter() return c =" message so that the log file lines are not too long for vi. Do not treat termination of the select() call by a signal as an error. This bug resulted in the "waiter() return c =" message every 60 seconds while tn3270d was retrying the gateway. Continue waiting for the remainder of the retry_wait time if the select() call is woken up by a signal, rather than restarting the wait for the full retry_wait time over again. 1173131: Intense message logging crashes kernel "Data Fault; kernel read fault" Open the stderr file .err for append rather than truncate so that error messages are retained from the previous runs when tn3270d is restarted. Messages "error on lockf: 4" appeared in stderr file during times of intense message logging due to the gateway or host being down. The errno 4 is EINTR, interrupted system call. Also got the following kernel crash several times, both with and without the root file system being full: "BAD TRAP; tn3270d: Data Fault; kernel read fault at ..." The circumvention to the kernel crash is to avoid file locking. The log file I/O is changed from stream I/O to unbuffered I/O. The "error on lockf:" error message was eliminated and the following message was added: "Error on write() to log file; errno =" Added the syntax "tn3270d -l -" to write the log file to stdout and the stderr file to stderr. See "Special Install Instructions" below for documentation changes. 1173128: Unnecessary error messages written to system log file Eliminated the "ERROR: unsupported terminal type" error message from normal TELNET terminal type negotiation. Saved a copy of the gateway name for use in error messages. Previously a null gateway name was written in some error messages. Eliminated the "Terminating. suboption incorrect" system log message. It is not a severe enough error for the system log. Replaced the error message "ERROR: suboption incorrect" with several new messages, in order to give more details. a) "ERROR: suboption qualifier received when only qualifier TELQUAL_IS is supported; connection terminated" b) "ERROR: suboption received when none expected; connection terminated" b) "ERROR: suboption received when suboption expected; connection terminated" 1173107: Log file filled with "net_read error:" messages fills root partition The fix for BugID 1169599 exposed a situation during TELNET options negotiation where the client disconnected and the log file was filled with "Terminating. net_read error: Connection reset by peer" error messages, filling the root partition and ultimately killing the system. This is fixed by checking for an error return code while reading from the client during TELNET options negotiation. 1173104: tn3270d crashes with segmentation violation and no core on Solaris 2.3 This fix stops trapping signals generated by program failures, so that core files will be generated. The tn3270d client was free()ing a null length string constant. Later on malloc() would get a segmentation violation when it ran into that free block because it resided in the data segment of tn3270d. 1169599: tn3270d crashes with "Assertion failed" in telnet option negotiation During telnet option negotiation, tn3270d sends commands in the order: IAC DO TELOPT_EOR IAC WILL TELOPT_EOR IAC DO TELOPT_BINARY IAC WILL TELOPT_BINARY It sends each command and waits for a response. It was aborting if the option was already set. Sometimes due to timing an option request is received from the tn3278 before tn3270d has requested the same option, then when tn3270d wanted to send that option if would terminate with an assert() call, thinking it was a bug. The fix is just to carry on if the option is already set. It is harmless to do so. A new log message is written by the master tn3270d daemon when it detects that a child tn3270d process has been killed by a signal. An example of the new message is: Wed Jun 8 15:51:33 1994: (399) child process was killed by signal (9) If an error is returned on a read to the tn3278 connection socket, it is now checked to see if it is due to a peer-initiated disconnect on the connection. Such a disconnect may be the result of a tn3278 going away for normal reasons. Behavior for a disconnect has been changed so that no message is now sent to the system console or log, and no attempt is now made to write an error message to the tn3278. Writing to the tn3278 is such a case is futile since the connection is gone, and may result in further errors (SIGPIPE etc.). 1164424: TN3270 Server fails to convert VTAM logon screen properly The TN3270 Server was failing to handle some SNA SSCP-LU (VTAM logon screen) data correctly, resulting in incorrect data being sent to the mainframe when the user hit ENTER. This only failed for certain VTAM logos with particular sequences of newline characters. As part of this fix, tn3270d now sends a 3270 Read Buffer command to the TN3270 Client after the user hits ENTER on an SNA SSCP-LU session. It was possible to put tn3270d into an infinite loop by hitting ENTER on an SNA SSCP-LU screen with more than 200 non-null characters between the original cursor position and the end of screen. A 3270 Write command was being used to write the first screen for an SNA SSCP-LU session, instead of a 3270 Erase Write command. 1159077: tn3270d client gets "status400=0 status500=0" though gateway is down If the second or later call to open a connection to the gateway timed out (10 seconds) under heavy load conditions, then the license manager code was called by mistake. As a result the gateway was considered to be connected when it fact it was not. An attempt to write to the gateway would then get an error. The log file message "ds_open_class timeout expired" is added for when the 10 seconds expires on the gateway open. Upon connecting to an inactive session on a gateway, the tn3270d would hang. It is changed to instead write the following message to the TN3270 client: "SunLink TN3270*SERVER: Link has become inactive; Waiting...". (Rev 02) 1169810: This bug refers to the incorrectly built SNA v8.0 patches, which cause the entire package to be removed if a customer backs out the patch. (Rev 01) 1103930: tn3270d does not display logon banner with local channel mvs gateway and mod 3 cgtn3270. Patch Installation Instructions: -------------------------------- Special Install Instructions: ----------------------------- Documentation changes: 1) If the tn3270d stderr file already exists, it is appended to. Before this patch an already existing stderr file was truncated, but the documentation did not state what the behavior would be. 2) tn3270d syntax addition: tn3270d -l - Write the tn3270d log file to stdout, and write the tn3270d stderr file to stderr. This is useful for piping the log file to another process, such as to snalogger. Previously, the "-l" parameter would only accept a filename for the log file.