Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Jan 2009 20:52:05 +0100
From:      Jilles Tjoelker <jilles@stack.nl>
To:        Robert Huff <roberthuff@rcn.com>
Cc:        current@freebsd.org
Subject:   Re: kernel complaint about /dev/pts (maybe)
Message-ID:  <20090104195205.GA14447@stack.nl>
In-Reply-To: <18783.28606.874391.376202@jerusalem.litteratus.org>
References:  <18783.28606.874391.376202@jerusalem.litteratus.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jan 03, 2009 at 09:01:34AM -0500, Robert Huff wrote:

> 	On a box running

>  FreeBSD 7.0-CURRENT #2: Wed Nov 19 06:02:02 EST 2008 i386 

> 	I am seeing a steady (though not particularly rapid) stream of:

> comsat[3597]: '/' in "/dev/pts/X"

> 	for X = [1-5].
> 	There is no mention of this in UPDATING, or (as far as I can
> tell) in the lists.  Google produces hits for NetBSD and Linux, but
> none with either a) a real explanation or b) a real (as opposed to
> half-ass) fix.
> 	Doesn't /seem/ to be hurting anything ... but this is a test
> box for a reason.
> 	Anyone (please!) have the clue(s) I'm missing?

NetBSD seems to have fixed this (properly) in their comsat 3.5 years
ago, see
http://cvsweb.netbsd.org/bsdweb.cgi/src/libexec/comsat/comsat.c.diff?r1=1.32&r2=1.33&only_with_tag=MAIN
and http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=30170

A comment describing the potential issue was added over 10 years ago:
http://cvsweb.netbsd.org/bsdweb.cgi/src/libexec/comsat/comsat.c.diff?r1=1.11&r2=1.12&only_with_tag=MAIN

Briefly, the problem is that comsat thinks that "pts/1" is an attempt to
access different files by writing into utmp. It needs to be taught that
SVr4 style ptys are OK.

NetBSD additionally checks the return value of tcgetattr() so it will
never write to non-ttys.

-- 
Jilles Tjoelker



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