Bug 127659 - [tmpfs] tmpfs memory leak
Summary: [tmpfs] tmpfs memory leak
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 7.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Jaakko Heinonen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-26 17:40 UTC by Dylan Cochran
Modified: 2010-02-28 13:58 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dylan Cochran 2008-09-26 17:40:02 UTC
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.
Comment 1 ota 2009-02-05 00:23:07 UTC
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.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2009-05-18 04:05:16 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Over to maintainer(s).
Comment 3 Jaakko Heinonen freebsd_committer freebsd_triage 2010-01-22 13:24:41 UTC
State Changed
From-To: open->feedback

Did you try Yoshihiro Ota's suggestion? Do you still see this problem? 


Comment 4 Jaakko Heinonen freebsd_committer freebsd_triage 2010-01-22 13:24:41 UTC
Responsible Changed
From-To: freebsd-fs->jh

Track.
Comment 5 Jaakko Heinonen freebsd_committer freebsd_triage 2010-02-28 13:58:15 UTC
State Changed
From-To: feedback->closed

Feedback timeout. Possibly not a tmpfs bug.