From owner-freebsd-current@freebsd.org Tue May 14 09:23:44 2019 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A5CE15A9F7F for ; Tue, 14 May 2019 09:23:44 +0000 (UTC) (envelope-from rb@gid.co.uk) Received: from mx0.gid.co.uk (mx0.gid.co.uk [194.32.164.250]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D42F98C7E8; Tue, 14 May 2019 09:23:33 +0000 (UTC) (envelope-from rb@gid.co.uk) Received: from [194.32.164.27] ([194.32.164.27]) by mx0.gid.co.uk (8.14.2/8.14.2) with ESMTP id x4E9NP1d081276; Tue, 14 May 2019 10:23:26 +0100 (BST) (envelope-from rb@gid.co.uk) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: leaked swap? From: Bob Bishop In-Reply-To: <782c2d4b-6920-085b-5489-65fae462a194@FreeBSD.org> Date: Tue, 14 May 2019 10:23:23 +0100 Cc: Konstantin Belousov , FreeBSD Current , Alan Somers Content-Transfer-Encoding: quoted-printable Message-Id: References: <9c5eaa94-f55b-464a-ab0f-267e7fce4bd0@FreeBSD.org> <20190318153230.GS96870@kib.kiev.ua> <782c2d4b-6920-085b-5489-65fae462a194@FreeBSD.org> To: Andriy Gapon X-Mailer: Apple Mail (2.3273) X-Rspamd-Queue-Id: D42F98C7E8 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of rb@gid.co.uk designates 194.32.164.250 as permitted sender) smtp.mailfrom=rb@gid.co.uk X-Spamd-Result: default: False [-1.86 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.986,0]; MX_INVALID(0.50)[greylisted]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+mx]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[gid.co.uk]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; IP_SCORE(-0.91)[ip: (-2.78), ipnet: 194.32.164.0/24(-1.39), asn: 42831(-0.27), country: GB(-0.09)]; NEURAL_HAM_SHORT(-0.67)[-0.671,0]; RCVD_IN_DNSWL_NONE(0.00)[250.164.32.194.list.dnswl.org : 127.0.10.0]; SUBJECT_ENDS_QUESTION(1.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:42831, ipnet:194.32.164.0/24, country:GB]; FREEMAIL_CC(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 May 2019 09:23:44 -0000 Hi, > On 14 May 2019, at 07:50, Andriy Gapon 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