From owner-freebsd-current@FreeBSD.ORG Sun Jan 4 19:52:07 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80E991065674 for ; Sun, 4 Jan 2009 19:52:07 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (meestal-mk5-141.stack.nl [IPv6:2001:610:1108:5011::149]) by mx1.freebsd.org (Postfix) with ESMTP id 43FBC8FC1A for ; Sun, 4 Jan 2009 19:52:07 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id C4C713FCEE; Sun, 4 Jan 2009 20:52:05 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id B58BD22892; Sun, 4 Jan 2009 20:52:05 +0100 (CET) Date: Sun, 4 Jan 2009 20:52:05 +0100 From: Jilles Tjoelker To: Robert Huff Message-ID: <20090104195205.GA14447@stack.nl> References: <18783.28606.874391.376202@jerusalem.litteratus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18783.28606.874391.376202@jerusalem.litteratus.org> X-Operating-System: FreeBSD 7.1-PRERELEASE i386 User-Agent: Mutt/1.5.18 (2008-05-17) Cc: current@freebsd.org Subject: Re: kernel complaint about /dev/pts (maybe) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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, 04 Jan 2009 19:52:08 -0000 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