Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Nov 2003 23:35:20 -0800 (PST)
From:      Don Lewis <truckman@FreeBSD.org>
To:        current@FreeBSD.org
Subject:   serial console oddity
Message-ID:  <200311090735.hA97ZLeF063127@gw.catspoiler.org>

next in thread | raw e-mail | index | archive | help
I've been seeing some wierd things for many months when using a serial
console on my -CURRENT box.  I finally had a chance to take a closer
look today.

It looks like the problem is some sort of interference between kernel
output to the console and userland writes to /dev/console.  I typically
see syslogd output to the console get corrupted.  Each message that
syslogd writes seems to get truncated or otherwise corrupted.  The most
common thing I see is that each syslog message is reduced to a space and
the first character of the month, or sometimes just a space, or
sometimes nothing at all.  This is totally consistent until I "kill
-HUP" syslogd, which I believe causes syslogd to close and open
/dev/console, after which the syslog output appears correct on the
console. When the syslogd output is being corrupted, I can cat a file to
/dev/console and the output appears to be correct.

I truss'ed syslogd, and it appears to be working normally, the writev()
call that writes the data to the console appears to be writing the
correct character count, so it would appear that the fault is in the
kernel.

The problem doesn't appear to be specific to syslogd, because I have
seen the output from the shutdown scripts that goes to the console get
truncated as well.

I have my serial console running at the default 9600 bps.

I dug around in the source in search of the problem, but I got lost in a
maze of twisty little passages.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200311090735.hA97ZLeF063127>