Patch-ID# 102147-05 Keywords: sna sdlc snacommd gateway backout reset timeout panic Synopsis: Sunlink SNA3270 and SNAP2P 8.0: SNA SDLC and snacommd 8.0 Jumbo Patch Date: Jan/30/97 Solaris Release: 2.1, 2.2, 2.3, 2.4 SunOS Release: 5.1, 5.2, 5.3, 5.4 Unbundled Product: Sunlink SNA3270 and SNAP2P Unbundled Release: 8.0 Relevant Architectures: sparc BugId's fixed with this patch: 1147422 1147423 1156770 1163002 1168429 1169810 1171161 1174215 1176414 1176948 1183433 1187649 1196728 1200875 1213390 1213654 1215591 Changes incorporated in this version: 1215591 Patches accumulated and obsoleted by this patch: 101407 101410 Patches which conflict with this patch: Patches required with this patch: NOTE: It is highly recommended to apply the current version of the jumbo patch for the gateway that you are using - 101280 for SNA3270/RJE or 102146 for SNAP2P. Obsoleted by: Files included with this patch: A postinstall script called 'postinstall' which is a temporary file which gets executed after the install of this patch package. /kernel/drv/sdlc SUNWconn/snacommd/llc_test.c SUNWconn/snacommd/sdlc_test.c SUNWconn/snacommd/snacommd Problem Description: (Rev 05) -------- 1215591: SDLC driver became panic again when stopsnarje issued. Added support for perimeters. (Rev 04) -------- 1200875: sdlc frames sent out of order on MP machines On multi-processor systems, sometimes two threads within sdlc would both try to send data at the same time, resulting in frames being sent out of sequence. A fix was made to prevent this problem from occurring. Also the strace tracing facility in sdlc was improved. See Documentation Changes in the Special Install Instructions below for details. 1213390: all te3278 sessions hang during heavy system load Improved error logging when memory allocation fails. 1213654: sdlc sends two frames in a row with the Final bit on On multi-processor systems, sometimes two threads would be executing within sdlc at the same time, resulting in two frames in a row being sent with the Final bit on. A fix was made to check a flag after a frame is sent with the Final bit on. If the flag is on, we will not send any more frames until we are polled again. (Rev 03) -------- 1183433: gateway gets spurious reset code 20 When three or more gateways using sdlc were running on a multi-processor system, spurious reset code 20s (NPR timeout) were occurring. A fix was made to the mutex locking in sdlc to fix this problem. 1187649: sdlc panicked when stopping gateway and snacommd sdlc would sometimes panic when snacommd was killed while a gateway was also in the process of terminating. In these cases, sdlc was trying to reference a structure that had been removed earlier as a part of the gateway termination procedure. sdlc was modified to check to see if this structure is present before it tries to access it. 1196728: sdlc does not process M_ERROR message from zsh Previously, if sdlc received an M_ERROR message from zsh, it would log a console message, "warning sdlc_rsrv M_UNKNOWN=0x88, DROP message" and discard the M_ERROR. Added code to process the M_ERROR messages by passing them to the appropriate stream head(s). (Rev 02) -------- 1176414: Fixed retransmission problem. Now will do longer_pause only if primary. 1183433: 1. appc gateway gets a DL_ATTACH_REQ error message when stop/start appc gateway on multipoint line. 2. When three gateways are running, stopping one gateway will cause the other two gateways to get an NPR timeout. Other changes: Gateway stops responding to RR after receiving an XID to the other station on a multipoint line. Improved sdlc tracing. (Rev 01) -------- 1163002: System panic caused by sdlc. 1168429: Fixed sdlc handling of zsh CTS_UP message. 1171161: System panic caused by sdlc. 1174215: sdlc would not allow the user to bring up and down the gateway more than 34 times. 1176414: Changed sdlc disconnect_indication to pass a disconnect reason. 1176948: Backoutpatch for 101407-02 removed the pkginfo for SUNWsdlc. Other changes: Added new FDDI driver nf support to snacommd. Also incorporated: Patch 101407 fixes: 1156770: sdlc timeout value is incorrect 1163002: System crashed on stopsna ESC9849: SNA SDLC got data fault in mutex_enter() when snap2p just started 1147422: SNA SDLC installation creates incorrect symbolic links Post install script incorrectly generates an incorrect symbolic link for /dev/sdlc and /dev/sdlc255 entries in the "/dev" directory for Solaris 2.3. Patch 101410 fixes: 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. 1147423: ======= SNA comm deamon ties up console when connected to ttya and there is no frame buffer on the system. - Add retry of system calls if interrupted by signal. - Remove extranous fopen of /dev/console. This caused the console to be the controlling terminal when started on a machine without a frame buffer. Patch Installation Instructions: -------------------------------- Special Install Instructions: ----------------------------- 1) You must reboot after installing this patch in order to use the new sdlc driver. 2) Documentation Changes: SDLC Driver Trace Facility ---------------------------- An sdlc trace can now be obtained via strlog and the strace utility. You can start the trace by entering the command strace 999 1 N where 999 is the module id for sdlc, 1 is the sub-id, and N is the trace level from 3 to 27 as described below: 3 errors 6 start up messages 9 XID events 12 SDLC frames sent & received 15 (not used) 18 major events in the code 21 a few additional events 24 quite a few more events 27 mutex locks The trace levels are cumulative, i.e., if you set level 12, it will log all of the messages described for levels 12 and below. In general, the two most useful levels are 12 for seeing what is being sent and received on the link and 18 for debugging. Note that all levels up to 27 are continually being logged via strlog, and specifying a level with strace only selects which messages are displayed. So you can stop strace at any time and restart it with a different trace level, if desired. The strace command given above will display the output to stdout. You can redirect it to a file. Note that the file will grow fairly quickly, especially with level 18 or higher. You can use the sna logger to write the strace output to one or more files and to prevent the files from growing without bound. The command format is: strace 999 1 N | snalogger where N is the trace level size is a file size in kbytes filename is the base file name count is the number of files to be used For example, the command strace 999 1 18 | snalogger 4096 /export/home/mef/logtrace 2 will create two files in /export/home/mef called logtrace.1 and logtrace.2 and will write the trace data to them alternately. When the size of the file that is being written to exceeds the specified file size (in this case 4,194,304 (4096*1024) bytes), the logger will switch to the other file and write to it until it is full, whereupon it will switch back to the first file. You can adjust the "size" value to account for the amount of disk space that you have available and the length of time that you think it will take the operator to stop the trace after the error occurs. In our tests here, specifying a value of n of 4096 allowed us to capture about 1/2 hour's worth of trace data. Depending on the amount of SNA traffic you have, your results may vary. Note that is not feasible to use this trace facility with trace levels higher than 9 on lower-end systems due to the performance impact. Below is a sample output for level 18. In this case, strace was started before the gateway was started. 157981 10:15:56 001cdb61 6 ... 999 1 sdlc_open(6): entering, urq=0xf5b33a00, uwq=0xf5b33a54 157982 10:15:56 001cdb61 6 ... 999 1 sdlc_open(24): cloneopen: newminor = 0 157983 10:15:56 001cdb61 6 ... 999 1 sdlc_open(27): alloc sdlc_p=0xf5e8d000 157984 10:15:56 001cdb67 18 ... 999 1 sdlc_wproto(9): DL_ATTACH_REQ 157985 10:15:56 001cdb67 18 ... 999 1 sdlc_dl_attach_req(15): adding sdlc_p=0xf5e8d000 to link=0xf5b20c00 157986 10:15:56 001cdb67 18 ... 999 1 sdlc_dl_ok_ack(6): entering, primitive=0xb, mp=0xf5b0e380 157987 10:15:56 001cdb70 18 ... 999 1 sdlc_wproto(15): DL_BIND_REQ 157988 10:15:56 001cdb70 18 ... 999 1 sdlc_dl_bind_req(9): sap addr=0x1, mode=0x1, flg=0x0 157989 10:15:56 001cdb70 18 ... 999 1 sdlc_dl_bind_ack(6): sending bind ack 157990 10:15:56 001cdb71 18 ... 999 1 sdlc_wioctl(12): I_SETPARAM 157991 10:15:56 001cdb71 18 ... 999 1 sdlc_set_timeout_values(6): entering, pause=3, idle=400, npr=240 157992 10:15:56 001cdb71 18 ... 999 1 sdlc_set_timeout_values(9): hz=100, ntick=1. 157993 10:15:56 001cdb71 18 ... 999 1 sdlc_set_timeout_values(15): pause=1, idle=4, to_hz=10. 157994 10:15:56 001cdb71 18 ... 999 1 sdlc_init_station(6): entering, flags=0x3 157995 10:15:56 001cdb71 18 ... 999 1 sdlc_new_secondary(12): exiting, to_hz=10, linkno=0, addr=0x1 157996 10:15:56 001cdb71 18 ... 999 1 sdlc_linkchg(6): entering, sl=0xf613ce80, newstate=0x2 157997 10:15:56 001cdb71 18 ... 999 1 sdlc_init_station(18): exit 157998 10:15:57 001cdbcd 12 ... 999 1 sdlc_input(30): rcvd len=2, frame=01 93 157999 10:15:57 001cdbcd 18 ... 999 1 sdlc_dl_connect_ind(6): entering, state=0x3 158000 10:15:57 001cdbcd 18 ... 999 1 sdlc_linkin(24): NDM: sending connect_ind up 158001 10:15:57 001cdbcd 18 ... 999 1 sdlc_wproto(30): DL_CONNECT_RES 158002 10:15:57 001cdbcd 18 ... 999 1 sdlc_dl_connect_res(6): entering 158003 10:15:57 001cdbce 18 ... 999 1 sdlc_linkchg(6): entering, sl=0xf613ce80, newstate=0x1 158004 10:15:57 001cdbce 12 ... 999 1 sdlc_cmdresp(24): sending frame=01 73 158005 10:15:57 001cdbce 18 ... 999 1 sdlc_dl_ok_ack(6): entering, primitive=0xf, mp=0xf5b5c380 158006 10:15:57 001cdbd0 12 ... 999 1 sdlc_input(30): rcvd len=2, frame=01 11 158007 10:15:57 001cdbd0 18 ... 999 1 sdlc: start_pause_idle_timer(12): started, id=0x10103bda 158008 10:15:57 001cdbda 18 ... 999 1 sdlc_timeout(9): pause timer expired in NRM - send data 158009 10:15:57 001cdbda 12 ... 999 1 sdlc_cmdresp(24): sending frame=01 11 158010 10:15:57 001cdbdd 12 ... 999 1 sdlc_input(33): rcvd len=20, frame=01 00 2d 00 00 00 0e10 158011 10:15:57 001cdbdd 18 ... 999 1 sdlc_wdata(15): adding msg to xmit q, len=31, TH=2d 00 00 00 0e10 158012 10:15:57 001cdbde 12 ... 999 1 sdlc_input(30): rcvd len=2, frame=01 11 158013 10:15:57 001cdbde 12 ... 999 1 sdlc_out(36): sending len=31, frame=01 30 2d 00 00 00 0e10 158014 10:15:57 001cdbf1 12 ... 999 1 sdlc_input(30): rcvd len=2, frame=01 31 158015 10:15:57 001cdbf1 18 ... 999 1 sdlc_ackin(18): removing acked frames from rexmit queue, sl_NsRcv=0, sc_nr=1 158016 10:15:57 001cdbf1 18 ... 999 1 sdlc: start_pause_idle_timer(12): started, id=0x100eb3fb 158017 10:15:57 001cdbfb 18 ... 999 1 sdlc_timeout(9): pause timer expired in NRM - send data 158018 10:15:57 001cdbfb 12 ... 999 1 sdlc_cmdresp(24): sending frame=01 31 158019 10:15:57 001cdbfd 12 ... 999 1 sdlc_input(33): rcvd len=14, frame=01 22 2d 00 02 00 0e11 158020 10:15:57 001cdbfe 18 ... 999 1 sdlc_wdata(15): adding msg to xmit q, len=27, TH=2d 00 00 02 0e11 158021 10:15:57 001cdbfe 18 ... 999 1 sdlc_wdata(15): adding msg to xmit q, len=22, TH=2c 00 00 02 0000 158022 10:15:57 001cdbff 12 ... 999 1 sdlc_input(33): rcvd len=14, frame=01 24 2d 00 03 00 0e12 158023 10:15:57 001cdbff 18 ... 999 1 sdlc_wdata(15): adding msg to xmit q, len=27, TH=2d 00 00 03 0e12 158024 10:15:57 001cdc00 18 ... 999 1 sdlc_wdata(15): adding msg to xmit q, len=22, TH=2c 00 00 03 0000 158025 10:15:57 001cdc01 12 ... 999 1 sdlc_input(33): rcvd len=14, frame=01 26 2d 00 04 00 0e13 158026 10:15:57 001cdc01 18 ... 999 1 sdlc_wdata(15): adding msg to xmit q, len=27, TH=2d 00 00 04 0e13 158027 10:15:57 001cdc01 18 ... 999 1 sdlc_wdata(15): adding msg to xmit q, len=22, TH=2c 00 00 04 0000 158028 10:15:57 001cdc05 12 ... 999 1 sdlc_input(33): rcvd len=14, frame=01 28 2d 00 05 00 0e14 158029 10:15:57 001cdc06 12 ... 999 1 sdlc_input(30): rcvd len=2, frame=01 31 158030 10:15:57 001cdc06 12 ... 999 1 sdlc_out(36): sending len=27, frame=01 a2 2d 00 00 02 0e11 158031 10:15:57 001cdc06 12 ... 999 1 sdlc_out(36): sending len=22, frame=01 a4 2c 00 00 02 0000 158032 10:15:57 001cdc06 12 ... 999 1 sdlc_out(36): sending len=27, frame=01 a6 2d 00 00 03 0e12 158033 10:15:57 001cdc06 12 ... 999 1 sdlc_out(36): sending len=22, frame=01 a8 2c 00 00 03 0000 158034 10:15:57 001cdc06 12 ... 999 1 sdlc_out(36): sending len=27, frame=01 aa 2d 00 00 04 0e13 158035 10:15:57 001cdc06 12 ... 999 1 sdlc_out(36): sending len=22, frame=01 bc 2c 00 00 04 0000 158036 10:15:57 001cdc07 18 ... 999 1 sdlc_wdata(15): adding msg to xmit q, len=27, TH=2d 00 00 05 0e14 158037 10:15:57 001cdc07 18 ... 999 1 sdlc_wdata(15): adding msg to xmit q, len=22, TH=2c 00 00 05 0000 158038 10:15:57 001cdc19 12 ... 999 1 sdlc_input(30): rcvd len=2, frame=01 f1 158039 10:15:57 001cdc19 18 ... 999 1 sdlc_ackin(18): removing acked frames from rexmit queue, sl_NsRcv=1, sc_nr=7 158040 10:15:57 001cdc19 12 ... 999 1 sdlc_out(36): sending len=27, frame=01 ae 2d 00 00 05 0e14 158041 10:15:57 001cdc19 12 ... 999 1 sdlc_out(36): sending len=22, frame=01 b0 2c 00 00 05 0000 The number in the first column is a sequence number. If strace is unable to keep up with the rate at which the trace messages are being logged, the trace messages will be dropped, and you will see gaps in the sequence. The number in the fourth column is the trace level of the message. Following are some message explanations. The numbers in parenthesis following the routine names are just trace message ID numbers. sdlc_input(30): rcvd len=2, frame=xx yy A frame of length 2 has been received. xx yy are the address and control bytes. sdlc_input(33): rcvd len=N, frame=xx yy aa bb cc dd eeee A frame of length N has been received. xx yy are the address and control bytes. aa through eeee are the SNA Transmission Header (TH). sdlc_cmdresp(24): sending frame=xx yy A frame of length 2 has been sent. xx yy is the address and control bytes. sdlc_out(36): sending len=N, frame=xx yy aa bb cc dd eeee A frame of length N has been sent. xx yy are the address and control bytes. aa through eeee are the SNA Transmission Header (TH). sdlc_ackin(18): removing acked frames from rexmit queue, sl_NsRcv=X, sc_nr=Y Frames are being removed from the retransmit queue due to receiving a frame which has acknowledged successful receipt of them. X is the first sequence number which has been acknowledged. Y is the Nr value. sdlc_wdata(15): adding msg to xmit q, len=N, TH=aa bb cc dd eeee A message has been received from the gateway and is being placed on the transmit queue. N is the length of the message. aa through eeee are the SNA Transmission Header (TH).