From nobody@FreeBSD.org  Fri Sep 26 16:30:50 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1F038106568C
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 26 Sep 2008 16:30: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 0DFED8FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 26 Sep 2008 16:30:50 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id m8QGUndZ034879
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 26 Sep 2008 16:30:49 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id m8QGUnFl034878;
	Fri, 26 Sep 2008 16:30:49 GMT
	(envelope-from nobody)
Message-Id: <200809261630.m8QGUnFl034878@www.freebsd.org>
Date: Fri, 26 Sep 2008 16:30:49 GMT
From: Dylan Cochran <a134qaed@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: tmpfs memory leak
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         127659
>Category:       kern
>Synopsis:       [tmpfs] tmpfs memory leak
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 26 16:40:02 UTC 2008
>Closed-Date:    Sun Feb 28 13:58:16 UTC 2010
>Last-Modified:  Sun Feb 28 13:58:16 UTC 2010
>Originator:     Dylan Cochran
>Release:        7.0-RELEASE
>Organization:
N/A
>Environment:
FreeBSD netdrive.lan. 7.0-RELEASE-p4 FreeBSD 7.0-RELEASE-p4 #0: Tue Sep  2 19:32:35 UTC 2008     root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
A tmpfs filesystem containing a rrds log (via gmetad) and a newsyslog rotated verbose error log seems to be leaking memory at a constant rate (4K per second) while being unaccounted for in the actual filesystem. 

netdrive# df -h
Filesystem                                  Size    Used   Avail Capacity  Mounted on
tmpfs                                       1.1G    631M    504M    56%    /tmp


netdrive# du -hd 0 /tmp/
2.6M    /tmp/

netdrive# fstat -f /tmp/.
USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W

The memory df claims is being used is allocated, as the total used space matches the used space plus the running process's working set.
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:

From: Yoshihiro Ota <ota@j.email.ne.jp>
To: bug-followup@FreeBSD.org
Cc: a134qaed@gmail.com
Subject: Re: kern/127659: [tmpfs] tmpfs memory leak
Date: Wed, 4 Feb 2009 19:23:07 -0500

 Try
 
 % fstat | less
 
 and search for ?(tmpfs).
 
 It looks "fstat" doesn't report a filename.
 For example, it did 'tail -f /tmp/x' and got
 
 hiro     tail       19521 root /             2 drwxr-xr-x     512  r
 hiro     tail       19521   wd -         -     ?(null)    -
 hiro     tail       19521 text /usr     525051 -r-xr-xr-x   16980  r
 hiro     tail       19521    0 /dev        132 crw-rw-rw-   ttyp5 rw
 hiro     tail       19521    1 /dev        132 crw-rw-rw-   ttyp5 rw
 hiro     tail       19521    2 /dev        132 crw-rw-rw-   ttyp5 rw
 hiro     tail       19521    3 -         -    ?(tmpfs)    -
 
 I do not know how rrds or newsyslog rotates files. But,
 http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/131356
 may also be related.
Responsible-Changed-From-To: freebsd-bugs->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon May 18 03:05:16 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=127659 
State-Changed-From-To: open->feedback 
State-Changed-By: jh 
State-Changed-When: Fri Jan 22 13:24:41 UTC 2010 
State-Changed-Why:  
Did you try Yoshihiro Ota's suggestion? Do you still see this problem? 


Responsible-Changed-From-To: freebsd-fs->jh 
Responsible-Changed-By: jh 
Responsible-Changed-When: Fri Jan 22 13:24:41 UTC 2010 
Responsible-Changed-Why:  
Track. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=127659 
State-Changed-From-To: feedback->closed 
State-Changed-By: jh 
State-Changed-When: Sun Feb 28 13:58:15 UTC 2010 
State-Changed-Why:  
Feedback timeout. Possibly not a tmpfs bug. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=127659 
>Unformatted:
