Date: Fri, 9 Jan 1998 01:40:29 -0500 (EST) From: "Christopher T. Johnson" <cjohnson@neunacht.netgsi.com> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: kern/5467: unlink() leaves unrefed files on file sytem Message-ID: <199801090640.BAA03491@neunacht.netgsi.com> Resent-Message-ID: <199801090640.WAA20761@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801090640.BAA03491>