From owner-freebsd-current@FreeBSD.ORG Sat Nov 8 23:35:28 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E8F316A4CE for ; Sat, 8 Nov 2003 23:35:28 -0800 (PST) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9DBA143FDD for ; Sat, 8 Nov 2003 23:35:27 -0800 (PST) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.9p2/8.12.9) with ESMTP id hA97ZLeF063127 for ; Sat, 8 Nov 2003 23:35:25 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <200311090735.hA97ZLeF063127@gw.catspoiler.org> Date: Sat, 8 Nov 2003 23:35:20 -0800 (PST) From: Don Lewis To: current@FreeBSD.org MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Subject: serial console oddity X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2003 07:35:28 -0000 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.