Significant memory leak in 9.3p10?

J David j.david.lists at gmail.com
Fri Mar 27 02:58:56 UTC 2015


On Thu, Mar 26, 2015 at 9:28 PM, Steven Hartland
<killing at multiplay.co.uk> wrote:
> Does vmstat -m or vmstat -z shed any light?

None, as those show kernel memory usage, not user space.  Looking at
them anyway shows nothing unusual, consuming large amounts of memory,
or disproportionate to the kernel memory shown as in-use.

The list of suspects that can consume user memory without being
associated with any user process is very short: some sort of
anonymous, persistent shared memory object.  Konstantin offered a
partial list of some likely candidates in response to the initial
message, including:

- NO: tmpfs mounts (not used)
- NO: swap-backed md disks (not used)
- PROBABLY NO: sysv shared memory (believed not to be used)
- MAYBE: possibly posix shared memory (unknown whether used)
- MAYBE: anonymous mmap segments that have somehow got lost (i.e. file
descriptor is hanging around in the kernel somewhere) -- proposed by
someone off-list
- MAYBE: others?

Of the two remaining known possibilities, posix shared memory seems
more likely than an unknown mmap bug.  Unfortunately, I have not found
any way to gather statistics and/or get/set limits on posix shared
memory usage.  Does such a method exist?

Really, it would be great if there were a tool that could walk the
entire list of VM blocks and generate some kind of report or
statistics (like vmstat -z or vmstat -m, but for VM rather than kernel
memory).  As it is, we are reduced to guessing what might be going on,
which is decidedly suboptimal.  However, I have no idea if such a tool
exists, if it is even possible to write, or (if it is) how to go about
writing it.

Thanks!


More information about the freebsd-questions mailing list