Console/getty handling bug

Bernie Doehner (bad@ee.WPI.EDU)
Sun, 23 Jul 1995 12:25:15 -0500 (EDT)


Since I upgraded from kernel 1.2.3 to 1.2.11, I noticed a bug
with the way getty's (I use agetty) are handled. I run two Linux systems:
One is a 386 with 5MB of RAM and NO monitor (my ax25 router and nfs print/
fileserver) The other is a 486 notebook with 8MB of RAM (my "user" machine).

Since the 386 is tight on memory and has no monitor, I disabled all getty's
from running on it (not even on on the serial port).

With kernel version 1.2.11 and beyond (I even tried 1.3.11), whenever NO
gettys are running on the system, and one logs in via the ethernet network
"init" ends up running all the time and grabs
roughly 80-90% of system cpu time, even while the system is idle
To make sure this wasn't related to something on my
386, I also disabled all gettys on my 486 and logged in via the network
and noticed the same "init" behavior. This strange init behavior
immediately goes away when I edit /etc/inittab, and kill -1 1 to start at
least one getty.

I definitely did NOT see this happen in kernel 1.2.3 and before, and I don't
even know where to try to find the source. I can tell you what is not
the problem. Here is a summary of some of the software differences between the
two machines:

386: 486:
-3c503 network card -maxtech pcmcia (ne2000 compat) network card
-Kernel 1.2.11 with Alan Cox's -straight kernel 1.2.11 without ANY patches
ax25028 patches
-No modules of any kind -pcmcia card services and modules

>From information in /usr/adm/messages it seems that whenever a command is
executed init starts forking uncontrolably.

I even disabled all of my nfs and other network stuff to see wether any of
the network stuff was causing this and it had NO effect on init's behavior.

Here are the /usr/adm/messages and top outputs for the case when the 386
has been idle for a while and has NOT getty's of any kind running:

Jul 23 10:17:23 zeus syslogd: restart
Jul 23 10:17:24 zeus kernel: Kernel logging (proc) started.
Jul 23 10:17:24 zeus kernel: Console: mono EGA+ 80x25, 1 virtual console (max 63)
Jul 23 10:17:24 zeus kernel: Calibrating delay loop.. ok - 6.50 BogoMips
Jul 23 10:17:24 zeus kernel: Serial driver version 4.11 with no serial options enabled
Jul 23 10:17:24 zeus kernel: tty00 at 0x03f8 (irq = 4) is a 16450
Jul 23 10:17:24 zeus kernel: tty01 at 0x02f8 (irq = 3) is a 16450
Jul 23 10:17:24 zeus kernel: lp1 at 0x0378, using polling driver
Jul 23 10:17:24 zeus kernel: hda: WDC AC1210F, 202MB w/64KB Cache, CHS=989/12/35, MaxMult=16
Jul 23 10:17:24 zeus kernel: ide0: primary interface on irq 14
Jul 23 10:17:24 zeus kernel: Floppy drive(s): fd0 is 1.44M, fd1 is 1.2M
Jul 23 10:17:24 zeus kernel: FDC 0 is a 8272A
Jul 23 10:17:24 zeus kernel: Memory: 4240k/5376k available (572k kernel code, 384k reserved, 180k data)
Jul 23 10:17:24 zeus kernel: Swansea University Computer Society NET3.019
Jul 23 10:17:24 zeus kernel: GW4PTS AX.25 for Linux. Version 0.25 ALPHA for Linux NET3.016 (Linux 1.1.51)
Jul 23 10:17:24 zeus kernel: Portions (c) Copyright 1984 University Of British Columbia
Jul 23 10:17:24 zeus kernel: Portions (c) Copyright 1990 The Regents of the University Of California
Jul 23 10:17:24 zeus kernel: Swansea University Computer Society TCP/IP for NET3.019
Jul 23 10:17:24 zeus kernel: IP Protocols: ICMP, UDP, TCP
Jul 23 10:17:24 zeus kernel: PPP: version 0.2.7 (4 channels) NEW_TTY_DRIVERS OPTIMIZE_FLAGS
Jul 23 10:17:24 zeus kernel: TCP compression code copyright 1989 Regents of the University of California
Jul 23 10:17:24 zeus kernel: PPP line discipline registered.
Jul 23 10:17:24 zeus kernel: SLIP: version 0.8.3-NET3.019-NEWTTY (4 channels) (6 bit encapsulation enabled)
Jul 23 10:17:24 zeus kernel: AX25: KISS encapsulation enabled
Jul 23 10:17:24 zeus kernel: 3c503.c:v1.10 9/23/93 Donald Becker (becker@cesdis.gsfc.nasa.gov)
Jul 23 10:17:24 zeus kernel: eth0: 3c503 at 0x300, 02 60 8c 3e 5c d3
Jul 23 10:17:24 zeus kernel: eth0: 3C503 with shared memory at 0xdc000-0xddfff,
Jul 23 10:17:24 zeus kernel: Checking 386/387 coupling... Ok, fpu using old IRQ13 error reporting
Jul 23 10:17:24 zeus kernel: Checking 'hlt' instruction... Ok.
Jul 23 10:17:24 zeus kernel: Linux version 1.2.11 (root@flint) (gcc version 2.6.3) #1 Fri Jul 21 14:43:17 EDT 1995
Jul 23 10:17:24 zeus kernel: Partition check:
Jul 23 10:17:24 zeus kernel: hda: hda1 hda2
Jul 23 10:17:24 zeus kernel: VFS: Mounted root (ext2 filesystem) readonly.
Jul 23 10:17:24 zeus kernel: Adding Swap: 8604k swap-space
Jul 23 10:17:28 zeus sendmail[57]: starting daemon (8.6.12): SMTP+queueing@00:10:00
Jul 23 10:17:29 zeus init[1]: No more processes left in this runlevel
Jul 23 10:17:45 zeus last message repeated 482 times
Jul 23 10:17:45 zeus in.telnetd[62]: connect from flint.nu1s.ampr.org
Jul 23 10:17:45 zeus init[1]: No more processes left in this runlevel
Jul 23 10:17:49 zeus last message repeated 84 times
Jul 23 10:17:49 zeus login: ROOT LOGIN ON ttyp0 FROM flint.nu1s.ampr.org
Jul 23 10:17:49 zeus init[1]: No more processes left in this runlevel
Jul 23 10:18:20 zeus last message repeated 733 times
Jul 23 10:19:21 zeus last message repeated 1581 times
Jul 23 10:20:22 zeus last message repeated 1581 times
Jul 23 10:21:22 zeus last message repeated 1581 times
Jul 23 10:22:23 zeus last message repeated 1568 times
Jul 23 10:23:23 zeus last message repeated 1556 times
Jul 23 10:24:23 zeus last message repeated 1556 times
Jul 23 10:25:23 zeus last message repeated 1556 times
Jul 23 10:26:23 zeus last message repeated 1556 times
Jul 23 10:27:23 zeus last message repeated 1556 times
Jul 23 10:28:23 zeus last message repeated 1554 times
Jul 23 10:29:23 zeus last message repeated 1543 times
Jul 23 10:30:23 zeus last message repeated 1483 times
Jul 23 10:31:23 zeus last message repeated 1505 times
Jul 23 10:32:23 zeus last message repeated 1503 times
Jul 23 10:33:23 zeus last message repeated 1506 times
Jul 23 10:34:23 zeus last message repeated 1506 times
Jul 23 10:35:24 zeus last message repeated 1506 times
Jul 23 10:36:24 zeus last message repeated 1504 times
Jul 23 10:37:24 zeus last message repeated 1504 times
Jul 23 10:38:24 zeus last message repeated 1502 times
Jul 23 10:39:24 zeus last message repeated 1504 times
Jul 23 10:40:24 zeus last message repeated 1504 times
Jul 23 10:41:24 zeus last message repeated 1504 times
Jul 23 10:42:24 zeus last message repeated 1504 times
Jul 23 10:43:24 zeus last message repeated 1504 times
Jul 23 10:44:24 zeus last message repeated 1504 times
Jul 23 10:45:24 zeus last message repeated 1504 times
Jul 23 10:46:24 zeus last message repeated 1504 times

10:56am up 39 min, 1 user, load average: 1.16, 1.11, 0.97
15 processes: 13 sleeping, 2 running, 0 zombie, 0 stopped
CPU states: 16.2% user, 0.0% nice, 94.5% system, 0.0% idle
Mem: 4236K av, 4108K used, 128K free, 2408K shrd, 1580K buff
Swap: 8604K av, 0K used, 8604K free

PID USER PRI NI SIZE RES SHRD STAT %CPU %MEM TIME COMMAND
1 root 30 0 55 236 304 S 83.0 5.5 33:53 init auto
77 root 21 0 156 408 428 R 17.1 9.6 0:00 top
38 root 6 0 65 272 332 R 10.5 6.4 4:45 /usr/sbin/syslogd
62 root 1 0 90 312 356 S 0.0 7.3 0:00 in.telnetd
63 root 1 0 348 520 484 S 0.0 12.2 0:01 -tcsh
57 root 1 0 255 440 456 S 0.0 10.3 0:00 sendmail: accepting
6 root 1 0 4 8 0 S 0.0 0.1 0:00 /sbin/bdflushd
7 root 1 0 4 8 0 S 0.0 0.1 0:00 /sbin/updated
40 root 1 0 40 236 312 S 0.0 5.5 0:00 /usr/sbin/klogd
42 bin 1 0 84 248 312 S 0.0 5.8 0:00 /usr/sbin/rpc.portmap
44 root 1 0 76 268 320 S 0.0 6.3 0:00 /usr/sbin/inetd
46 root 1 0 64 232 296 S 0.0 5.4 0:00 /usr/sbin/lpd
49 root 1 0 100 340 400 S 0.0 8.0 0:00 /usr/sbin/rpc.mountd
51 root 1 0 116 344 404 S 0.0 8.1 0:00 /usr/sbin/rpc.nfsd
53 root 1 0 96 264 356 S 0.0 6.2 0:00 /etc/rpc.pcnfsd /var

I 'd be interrested to see if anyone else can duplicated the above behavior.
Please also let me know if you need additional information.

Regards,

Bernie Doehner
bad@ee.wpi.edu