Re: [2.1.113] What is CHECK_TTY_COUNT warning me about?

Gabriel Paubert (paubert@iram.es)
Fri, 7 Aug 1998 12:24:16 +0200 (METDST)


On Thu, 6 Aug 1998, Theodore Y. Ts'o wrote:

> Hi,
>
> If you can reproduce it easily, I definitely want to hear about it. Can
> you send me lots of details about how your machine is configured (what
> kernel version, what distribution), and what might be touching the
> serial console? (i.e., what getty are you using, is there anything else
> on the serial port like uucico, etc.)

It's a fairly recent vger tree (cvs update -d done 2 days ago) with some
local patches, probably irrelevant since they mostly fall in 2 categories:

- in the early boot phase because it would not even properly uncompress
the kernel.

- a driver I'm writing which is for now a module and has not even been
loaded when the message happens (it does not even compile right now
after the 2.0->2.1 upgrade).

The machine is Motorola PPC board (MVME2603). With 200Mhz 603e processor,
16 MB RAM, PCI<->ISA bridge is Winbond 83C553F and ISA
(serial+parallel+floppy) is National 87308. For more details you may
want to have a look at:

http://www.mcg.mot.com/literature/PDFLibrary/PDF/v2600apg.pdf

I have one SCSI disk (2G) installed. There is nothing (to my knowledge)
running on the serial ports apat from the getty and the fact that it is
the console output. Relevant /etc/inittab excerpt:

# Run gettys in standard runlevels

1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6
S0:12345:respawn:/sbin/getty -h ttyS0 DT9600 vt100
#S1:2345:respawn:/sbin/getty -h ttyS1 DT9600 vt100

Until very recently (yesterday), the tty did not work because the video
board was not properly initialized and the tty[1-6] were commented out.

Here is my .config (after deleting blank lines and comments):
CONFIG_PPC=y
CONFIG_6xx=y
CONFIG_PREP=y
CONFIG_MACH_SPECIFIC=y
CONFIG_EXPERIMENTAL=y
CONFIG_MODULES=y
CONFIG_PCI=y
CONFIG_NET=y
CONFIG_SYSCTL=y
CONFIG_SYSVIPC=y
CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
CONFIG_VGA_CONSOLE=y
CONFIG_PARIDE_PARPORT=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_SYN_COOKIES=y
CONFIG_IP_NOSR=y
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_NCR53C8XX=y
CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
CONFIG_SCSI_NCR53C8XX_MAX_TAGS=4
CONFIG_SCSI_NCR53C8XX_SYNC=5
CONFIG_SCSI_NCR53C8XX_IOMAPPED=y
CONFIG_NETDEVICES=y
CONFIG_NET_ETHERNET=y
CONFIG_NET_EISA=y
CONFIG_DE4X5=y
CONFIG_EXT2_FS=y
CONFIG_PROC_FS=y
CONFIG_NFS_FS=y
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
CONFIG_VT=y
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
CONFIG_MOUSE=y
CONFIG_PSMOUSE=y
CONFIG_VME_UNIVERSE=m

(The last one is my driver)

> In the past, most of the reports have been on fairly heavily loaded
> machines, and it's been hard to reproduce. If you can reproduce it at
> will on a machine configuration that's relatively easy to analyze and/or
> reproduce, that would be most helpful indeed.

The only way to reproduce the message is to reboot, however it has been
100% reproducible at 2 to 3 reboots per day (still experimenting
with other small patches but almost all in the early boot).

BTW: end June, after enabling some debugging I got the following
(after reformatting the almost endless lines):

Jun 29 19:31:42 corh01 kernel: opening ttyS0...
release_dev of ttyS0 (tty count=1)...
freeing tty structure...
opening ttyS0...
release_dev of ttyS0 (tty count=1)...
freeing tty structure...
opening ttyS0...
release_dev of ttyS0 (tty count=1)...
freeing tty structure...
opening ttyS0...
release_dev of ttyS0 (tty count=1)...
freeing tty structure...
opening ttyS0...
release_dev of ttyS0 (tty count=1)...
freeing tty structure...
opening ttyS0...
<6>Adding Swap: 66460k swap-space (priority -1)
Jun 29 19:31:45 corh01 kernel: release_dev of ttyS0 (tty count=1)...
freeing tty structure...
opening ttyS0...
release_dev of ttyS0 (tty count=1)...
freeing tty structure...
opening ttyS0...
release_dev of ttyS0 (tty count=1)...
freeing tty structure...
opening ttyS0...
release_dev of ttyS0 (tty count=1)...
freeing tty structure...
opening ttyS0...
opening ttyS0...
opening ttyS0...
opening ttyS0...
release_dev of ttyS0 (tty count=4)...
release_dev of ttyS0 (tty count=3)...
opening ttyS0...
ttyS0 vhangup...
Jun 29 19:31:45 corh01 kernel: error -512 in opening ttyS0...
release_dev of ttyS0 (tty count=3)...
Warning: dev (04:40) tty->count(2) != #fd's(3) in release_dev
Jun 29 19:31:47 corh01 kernel: release_dev of ttyS0 (tty count=2)...
opening ttyS0...
opening ttyS0...
release_dev of ttyS0 (tty count=3)...
eth0: media is 10Mb/s.
Jun 29 19:31:59 corh01 kernel: opening ttyS0...
release_dev of ttyS0 (tty count=3)...
opening pty0...
opening ttyp0...
ttyp0 vhangup...

Is the -ERESTARTSYS error related to what I get ?

After applying Bill's patch (but removing the rest of the debugging which
was painfully verbose), I get the following:

Warning: dev (04:40) tty->count(2) != #fd's(3) in release_dev
task=getty, type=3, subtype=1
found f_count=1, f_dentry=c0b75a40, f_op=c00fa324

Regards,
Gabriel.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html