Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 May 2019 10:23:23 +0100
From:      Bob Bishop <rb@gid.co.uk>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, FreeBSD Current <freebsd-current@freebsd.org>, Alan Somers <asomers@freebsd.org>
Subject:   Re: leaked swap?
Message-ID:  <C48F6C8D-28AB-4B46-A7A6-516321C2303B@gid.co.uk>
In-Reply-To: <782c2d4b-6920-085b-5489-65fae462a194@FreeBSD.org>
References:  <9c5eaa94-f55b-464a-ab0f-267e7fce4bd0@FreeBSD.org> <20190318153230.GS96870@kib.kiev.ua> <782c2d4b-6920-085b-5489-65fae462a194@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

> On 14 May 2019, at 07:50, Andriy Gapon <avg@freebsd.org> wrote:
>=20
> On 18/03/2019 17:32, Konstantin Belousov wrote:
>> tmpfs, swap-backed (or even memory backed) md, persistent posix =
shared
>> memory, SysV shared memory.
>=20
> In the end, it was POSIX shared memory.
> I put the system into the single-user to clean up the memory as much =
as possible
> and then I panic'ed it and went through dirty pages and their related =
objects in
> kgdb.  As far as I can tell, the memory was leaked via POSIX shared =
memory
> objects that were never shm_unlink-ed.  It seems that there was a =
misbehaving
> program that had been creating such objects and then losing track of =
them.  (I
> was able to identify it from names it used for the objects)
>=20
> It seems that, unfortunately, there is no way to list / discover POSIX =
shared
> memory objects that are not opened by any process.

Losing track of shared memory objects has been a problem since SysVr2 =
...

> I wrote a small gdb script to examine shm_dictionary in kgdb.  It =
would be nice
> to have a utility (and a kernel interface) that could do the same from =
userland.

... it is indeed high time it was fixed.

> --=20
> Andriy Gapon
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to =
"freebsd-current-unsubscribe@freebsd.org"
>=20

--
Bob Bishop
rb@gid.co.uk







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C48F6C8D-28AB-4B46-A7A6-516321C2303B>