From owner-freebsd-current@freebsd.org Thu Jan 9 10:15:06 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BF0E31E8855 for ; Thu, 9 Jan 2020 10:15:06 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 47thnQ3xnNz3QZc for ; Thu, 9 Jan 2020 10:15:06 +0000 (UTC) (envelope-from hps@selasky.org) Received: by mailman.nyi.freebsd.org (Postfix) id 85AE01E8854; Thu, 9 Jan 2020 10:15:06 +0000 (UTC) Delivered-To: current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8575C1E8853 for ; Thu, 9 Jan 2020 10:15:06 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47thnQ09v0z3QZb for ; Thu, 9 Jan 2020 10:15:05 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 7550B260072; Thu, 9 Jan 2020 11:15:04 +0100 (CET) Subject: Re: M_TEMP trouble in 13.0-CURRENT #0 r355131M From: Hans Petter Selasky To: Poul-Henning Kamp , current@freebsd.org References: <4164.1578563950@critter.freebsd.dk> <4e52b23e-32ed-6556-a74e-22c809a17fe0@selasky.org> Message-ID: Date: Thu, 9 Jan 2020 11:14:43 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <4e52b23e-32ed-6556-a74e-22c809a17fe0@selasky.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 47thnQ09v0z3QZb X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-4.93 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(-2.63)[ip: (-9.21), ipnet: 2a01:4f8::/29(-2.45), asn: 24940(-1.50), country: DE(-0.02)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(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: Thu, 09 Jan 2020 10:15:06 -0000 On 2020-01-09 11:12, Hans Petter Selasky wrote: > On 2020-01-09 10:59, Poul-Henning Kamp wrote: >> I noticed yesterday that M_TEMP stats are screwed up, and rebooted my >> laptop for reasons of safety. >> >> However, it's back again now: >> >>      critter phk> vmstat -m | grep temp >>      temp 18446744073709546036 18014398509476380K       -   963239 >> 16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536 >> >> FreeBSD critter.freebsd.dk 13.0-CURRENT FreeBSD 13.0-CURRENT #0 >> r355131M: Wed Nov 27 16:44:48 UTC 2019 >> root@critter.freebsd.dk:/usr/obj/freebsd/src/amd64.amd64/sys/GENERIC-NODEBUG >> amd64 >> >> I mentioned this on IRC yesterday and noted I had a "disk full" on >> a tmpfs mount, but that can now be disregarded as a false lead. >> >> On this kernel I have had an instance where X got killed for >> out-of-swap, at a time where that certainly should not have been >> the case. >> >> Am I the only one seeing this ? >> > > Hi, > > 2**64 - 18446744073709546036 > ans =  6144 > > Someone likely freed to M_TEMP which were not supposed to free there. > > You could use dtrace to narrow this down and you can also add a > kdb_backtrace() for the first couple of users of free() when the stats > is negative. > > Else: > > grep -r M_TEMP /usr/src/sys > > And do an audit. > > --HPS I actually see the same (r356321M), but I think it is not harmful: temp 18446744073709545743 18014398509476107K - 89826 16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536 --HPS