kernel complaint about /dev/pts (maybe)

Jilles Tjoelker jilles at stack.nl
Sun Jan 4 19:52:08 UTC 2009


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


More information about the freebsd-current mailing list