From owner-freebsd-bugs@FreeBSD.ORG  Mon Sep 21 23:20:02 2009
Return-Path: <owner-freebsd-bugs@FreeBSD.ORG>
Delivered-To: freebsd-bugs@hub.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 14C4C1065694
	for <freebsd-bugs@hub.freebsd.org>;
	Mon, 21 Sep 2009 23:20:02 +0000 (UTC)
	(envelope-from gnats@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org
	[IPv6:2001:4f8:fff6::28])
	by mx1.freebsd.org (Postfix) with ESMTP id E4E038FC16
	for <freebsd-bugs@hub.freebsd.org>;
	Mon, 21 Sep 2009 23:20:01 +0000 (UTC)
Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8LNK1Wm079347
	for <freebsd-bugs@freefall.freebsd.org>; Mon, 21 Sep 2009 23:20:01 GMT
	(envelope-from gnats@freefall.freebsd.org)
Received: (from gnats@localhost)
	by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8LNK1Nu079346;
	Mon, 21 Sep 2009 23:20:01 GMT (envelope-from gnats)
Resent-Date: Mon, 21 Sep 2009 23:20:01 GMT
Resent-Message-Id: <200909212320.n8LNK1Nu079346@freefall.freebsd.org>
Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer)
Resent-To: freebsd-bugs@FreeBSD.org
Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org,
	Ryan Davis <ryand-freebsd@zenspider.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6910410656A8
	for <freebsd-gnats-submit@FreeBSD.org>;
	Mon, 21 Sep 2009 23:16:50 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 572668FC24
	for <freebsd-gnats-submit@FreeBSD.org>;
	Mon, 21 Sep 2009 23:16:50 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n8LNGnwe092746
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 21 Sep 2009 23:16:49 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n8LNGnjO092745;
	Mon, 21 Sep 2009 23:16:49 GMT (envelope-from nobody)
Message-Id: <200909212316.n8LNGnjO092745@www.freebsd.org>
Date: Mon, 21 Sep 2009 23:16:49 GMT
From: Ryan Davis <ryand-freebsd@zenspider.com>
To: freebsd-gnats-submit@FreeBSD.org
X-Send-Pr-Version: www-3.1
Cc: 
Subject: misc/139040: 100.clean-disks shouldn't traverse devfs mounts
X-BeenThere: freebsd-bugs@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Bug reports <freebsd-bugs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-bugs>,
	<mailto:freebsd-bugs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-bugs>
List-Post: <mailto:freebsd-bugs@freebsd.org>
List-Help: <mailto:freebsd-bugs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-bugs>,
	<mailto:freebsd-bugs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 21 Sep 2009 23:20:02 -0000


>Number:         139040
>Category:       misc
>Synopsis:       100.clean-disks shouldn't traverse devfs mounts
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 21 23:20:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Ryan Davis
>Release:        7.1-RELEASE-p6
>Organization:
>Environment:
FreeBSD greed.zenspider.com 7.1-RELEASE-p6 FreeBSD 7.1-RELEASE-p6 #0: Tue Jun  9 16:26:47 UTC 2009     root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
The daily clean script is traversing into devfs space, which is getting pissy with my /dev/fd mount causing LOTS of spew in my daily emails.

PLEASE NOTE: This isn't about fdescfs being deprecated. That isn't the point at all (it is needed for obspamd). clean shouldn't go into /dev in the first place.

518 % cd /etc/periodic/daily/
519 % mount
/dev/ad0s1a on / (ufs, local)
devfs on /dev (devfs, local)
/dev/ad1s1a on /home (ufs, local)
devfs on /var/named/dev (devfs, local)
fdescfs on /dev/fd (fdescfs)
520 % sudo sh 100.clean-disks 
Password:

Cleaning disks:
find: /dev/fd/3/100.clean-disks: No such file or directory
find: /dev/fd/3/110.clean-tmps: No such file or directory
find: /dev/fd/3/120.clean-preserve: No such file or directory
find: /dev/fd/3/130.clean-msgs: No such file or directory
find: /dev/fd/3/140.clean-rwho: No such file or directory
find: /dev/fd/3/150.clean-hoststat: No such file or directory
find: /dev/fd/3/200.backup-passwd: No such file or directory
find: /dev/fd/3/210.backup-aliases: No such file or directory
find: /dev/fd/3/300.calendar: No such file or directory
find: /dev/fd/3/310.accounting: No such file or directory
find: /dev/fd/3/330.news: No such file or directory
find: /dev/fd/3/400.status-disks: No such file or directory
find: /dev/fd/3/404.status-zfs: No such file or directory
find: /dev/fd/3/405.status-ata-raid: No such file or directory
find: /dev/fd/3/406.status-gmirror: No such file or directory
find: /dev/fd/3/407.status-graid3: No such file or directory
find: /dev/fd/3/408.status-gstripe: No such file or directory
find: /dev/fd/3/409.status-gconcat: No such file or directory
find: /dev/fd/3/999.local: No such file or directory
find: /dev/fd/3/420.status-network: No such file or directory
find: /dev/fd/3/430.status-rwho: No such file or directory
find: /dev/fd/3/440.status-mailq: No such file or directory
find: /dev/fd/3/450.status-security: No such file or directory
find: /dev/fd/3/460.status-mail-rejects: No such file or directory
find: /dev/fd/3/470.status-named: No such file or directory
find: /dev/fd/3/480.status-ntpd: No such file or directory
find: /dev/fd/3/500.queuerun: No such file or directory
find: /dev/fd/3: No such file or directory
find: /dev/fd/4/100.clean-disks: No such file or directory
find: /dev/fd/4/110.clean-tmps: No such file or directory
find: /dev/fd/4/120.clean-preserve: No such file or directory
find: /dev/fd/4/130.clean-msgs: No such file or directory
find: /dev/fd/4/140.clean-rwho: No such file or directory
find: /dev/fd/4/150.clean-hoststat: No such file or directory
find: /dev/fd/4/200.backup-passwd: No such file or directory
find: /dev/fd/4/210.backup-aliases: No such file or directory
find: /dev/fd/4/300.calendar: No such file or directory
find: /dev/fd/4/310.accounting: No such file or directory
find: /dev/fd/4/330.news: No such file or directory
find: /dev/fd/4/400.status-disks: No such file or directory
find: /dev/fd/4/404.status-zfs: No such file or directory
find: /dev/fd/4/405.status-ata-raid: No such file or directory
find: /dev/fd/4/406.status-gmirror: No such file or directory
find: /dev/fd/4/407.status-graid3: No such file or directory
find: /dev/fd/4/408.status-gstripe: No such file or directory
find: /dev/fd/4/409.status-gconcat: No such file or directory
find: /dev/fd/4/999.local: No such file or directory
find: /dev/fd/4/420.status-network: No such file or directory
find: /dev/fd/4/430.status-rwho: No such file or directory
find: /dev/fd/4/440.status-mailq: No such file or directory
find: /dev/fd/4/450.status-security: No such file or directory
find: /dev/fd/4/460.status-mail-rejects: No such file or directory
find: /dev/fd/4/470.status-named: No such file or directory
find: /dev/fd/4/480.status-ntpd: No such file or directory
find: /dev/fd/4/500.queuerun: No such file or directory
find: /dev/fd/4: No such file or directory
find: /dev/fd/5: Bad file descriptor

>How-To-Repeat:
See console output above.
>Fix:
Untested:

            rc=$(find / \( ! -fstype local -o -fstype rdonly \) -a -prune -o \

should be something like:

            rc=$(find / \( ! -fstype local -o -fstype rdonly -o -fstype devfs \) -a -prune -o \


>Release-Note:
>Audit-Trail:
>Unformatted: