From owner-freebsd-bugs Thu Jan 8 22:40:08 1998 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id WAA20797 for bugs-outgoing; Thu, 8 Jan 1998 22:40:08 -0800 (PST) (envelope-from owner-freebsd-bugs) Received: (from gnats@localhost) by hub.freebsd.org (8.8.7/8.8.7) id WAA20761; Thu, 8 Jan 1998 22:40:04 -0800 (PST) (envelope-from gnats) Resent-Date: Thu, 8 Jan 1998 22:40:04 -0800 (PST) Resent-Message-Id: <199801090640.WAA20761@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, cjohnson@neunacht.netgsi.com Received: from neunacht.netgsi.com (neunacht.netgsi.com [192.55.203.37]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id WAA20690 for ; Thu, 8 Jan 1998 22:39:52 -0800 (PST) (envelope-from cjohnson@neunacht.netgsi.com) Received: (from cjohnson@localhost) by neunacht.netgsi.com (8.8.8/8.8.6) id BAA03491; Fri, 9 Jan 1998 01:40:29 -0500 (EST) Message-Id: <199801090640.BAA03491@neunacht.netgsi.com> Date: Fri, 9 Jan 1998 01:40:29 -0500 (EST) From: "Christopher T. Johnson" Reply-To: cjohnson@neunacht.netgsi.com To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: kern/5467: unlink() leaves unrefed files on file sytem Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 5467 >Category: kern >Synopsis: unlink() leaves unrefed files on file sytem >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jan 8 22:40:01 PST 1998 >Last-Modified: >Originator: Christopher T. Johnson >Organization: NetGSI, Inc >Release: FreeBSD 3.0-CURRENT i386 >Environment: FreeBSD-CURRENT as of a CVSUP around Dec 28th. >Description: When a file has been mmap()ed, and then is unlinked, it seems that even when the file is munmap()ed, the inode is not cleared. This problem was noticed when /var, a 300Mb filesystem, suddenly started running out of space. We run a perl script that uses a C program to analyse files and then unlink files that the program rejects (with databasing added). The processing sequence is: perl script discovers a file to analyis. perl script sends file name to C program over an unamed pipe. C program uses mmap() to access the file. C program analysises the file C program sends result to perl script perl script unlinks file if file is unwanted LOOP: perl script finds next file perl script send file name to C program C program uses munmap() to release previous file C program uses mmap() to access the new file C program send result to perl script perl script unlinks file if file is unwanted GOTO LOOP >How-To-Repeat: >Fix: >Audit-Trail: >Unformatted: