Resolving TTY "Respawning Too Rapidly" Errors


Contents

About this document
How the error occurs
Causes and suggestions
CLEARTTY.c program

About this document

There are various causes of the tty "respawning too rapidly" error, from cabling problems to corrupt configuration files. This document contains a list of possible causes with suggestions for resolving the problem. This document applies to AIX versions 3.1 - 3.2 and 4.x.


How the error occurs

In general, the "respawning too rapidly" message is sent by the system to warn users that there is a problem on the tty port and that too many gettys, or "login heralds," have been requested for that port.

One exception to this error exists when upgrading to AIX level 4.2 or 4.3. This exception appears as a tty_respawn error to the system console and occurs because of an entry in the /etc/security/limits file. This entry could exist in the default stanza or the root stanza. Consider the following example: this file with the root cpu entry set to 0 will cause this error.

	default:
	   fsize = 2097151
	   core = 2048
	   cpu = 3600
	   data = 262144
	   rss = 65536
	   stack = 8192
	root:
	   cpu = 0

Remove the cpu = 0 from the stanza so the system will boot correctly and provide a login on the console. Or, you may still have the "unlimited" setting for the "cpu =" option rather than removing the option altogether from the /etc/security/limits file. Change it to the standard setting for "unlimited," which in AIX 4.3.2 and 4.3.3 is -1, as in cpu = -1.
See Causes and suggestions - number 5

The following scenario shows how the respawing error may occur. Note that the timing numbers shown below may change in later versions of AIX.

  1. The system spawns a getty and sends a "login herald" to the terminal on tty0.
  2. Loose cabling on the terminal causes line-noise which forces a new getty to be spawned.
  3. The system is keeping track of the total number of gettys spawned for tty0 within a three minute and 45 second period; if that number exceeds five, then an error is displayed on the console and the system shuts down the port.

    Note: You can duplicate this yourself by logging in and out of the terminal several times very quickly within the above mentioned time span.

  4. The port will stay in a suspended state for about 19 minutes or until the system administrator "enables" the port again. At the end of the 19 minutes, the system will automatically enable the port.

    Note: PTF IX37168 changes the amount of time that the port is suspended from 19 minutes to a maximum of 240 seconds.

  5. If the problem persists, the system will permanently shut down the tty port and the administrator will need to reboot the system or run the CLEARTTY.c program (see CLEARTTY.c Program section) which may help correct the problem.

Causes and suggestions

  1. Modem devices are the most likely causes of the "respawning" error.

    Suggestions for HAYES compatible modems:

    • Connect to the modem and examine the active profile.
    • Carrier detect should not be forced high ("&C0"); it should be set for "&C1" with the command AT&C1.
    • In the active profile, verify that "result codes" is either turned off or set to "originate only". Try turning result codes off with "ATQ1".
  2. The "timeout" or "TIME before advancing to next port setting" is set to a value other than 0 for ttys connected directly to terminals.
  3. A port is defined and "enabled" but no cable or device is attached to it.

    Suggestions:

    • "Pdisable" the port and remove the device.
  4. Bad cable or loose connection.

    Suggestions:

    • Verify that the cabling is IBM cabling or that it meets the same standard.
    • Check for loose connections.
    • Check for bent pins at the connections.
    • Replace the cable (as a test) with an IBM serial cable, PN: 6323741.
  5. Corruption/tampering with the /etc/environment or /etc/inittab file.

    Suggestions:

  6. Check your error report log with the errpt -a | pg command. Look for errors associated with tty software and/or hardware (e.g. "buffer overruns", "lion_box", or "concentrator" errors).

    Suggestions:

  7. Noise on communication line.

    Suggestions:

  8. TTY configuration is corrupted.

    Suggestions:

  9. Hardware is defective.

    Suggestions:


CLEARTTY.c program

If the system permanently shuts down the tty port, the system administrator may need to reboot or run the following program.

In the following code, some characters may appear incorrectly. If the characters in the following list do not match their description, be sure to change them in the code.

[
left bracket
]
right bracket

(Code begins on next page.)

 
/*                             CLEARTTY.c 
        Program to attempt a reset of tty port without rebooting. 
        To test the effectiveness of this program, do the following 
        both before and after running cleartty: 
                    pdisable tty0 
                    echo "tty tty0" | crash > crash.out 
 NOTE:  If tty0 is on a 16-port concentrator off a 64-port Async 
        Adapter, you would replace "tty0" with "tty0/0". 
        Edit the "crash.out" file created above and look at the 
        "port status" line.  A normal, "disabled" port should have 
        a status of "iclose ccnt=0". 
______________________________________________________________________ 
  To create program: 
              o "vi cleartty.c" 
              o  enter the following C program and save the file 
  To compile program:   "cc -o cleartty  cleartty.c" 
  To execute program:   "cleartty /dev/tty0" 
______________________________________________________________________ */ 
/*   PROGRAM  BEGINS  HERE                                             */ 
#include <errno.h> 
#include <fcntl.h> 
#include <stdio.h> 
#include <termios.h> 
main(int argc, char *argv[]) 
{ 
   int fd; 
   if (argc < 2) { 
      fprintf(stderr, "Usage: %s /dev/tty? 
", argv[0]); 
      exit(1); 
   } 
   if ((fd = open(argv[1], O_RDWR | O_NONBLOCK)) < 0) { 
      perror(argv[1]); 
      exit(errno); 
   } 
   if (tcflow(fd, TCOON) < 0) { 
      perror("tcflow"); 
      exit(errno); 
   } 
   close(fd); 
   exit(0); 
} 
/* PROGRAM ENDS HERE */ 



[ Doc Ref: 90605225114678     Publish Date: Feb. 05, 2001     4FAX Ref: 8255 ]