From owner-freebsd-stable@freebsd.org Fri Aug 9 21:16:18 2019 Return-Path: Delivered-To: freebsd-stable@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 7E026AA29F for ; Fri, 9 Aug 2019 21:16:18 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 464yhy1nccz43Tk for ; Fri, 9 Aug 2019 21:16:18 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 3D534AA29E; Fri, 9 Aug 2019 21:16:18 +0000 (UTC) Delivered-To: stable@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 3D134AA29D for ; Fri, 9 Aug 2019 21:16:18 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-ot1-x344.google.com (mail-ot1-x344.google.com [IPv6:2607:f8b0:4864:20::344]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 464yhx16z5z43Tj for ; Fri, 9 Aug 2019 21:16:16 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-ot1-x344.google.com with SMTP id n5so137960066otk.1 for ; Fri, 09 Aug 2019 14:16:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=gcxUP6bHXuQdMuIF1WJ7Pvm+PekKzeu05mulLi4Dh40=; b=tIAs7RAFUN2jULO4VeuvxFAMD7RqIGMZqN4zcD/lg73nRvLCun97AAP/3pNEIIE7GY cTauJ8FvZy4iaY80qvOJmchREUikNqRqLX81okJGtyDG3q0PpvNj758PCQ2jTCWHS878 l5Y1ckzHSr//t9NeoBXAAqmrb8UjepZIIKRf10j/pL28ACuDq1u+2wEwUUloDkLtW9YL geCh8oLc19rc7XBiG1XAJifGGT1CGgPh3N6JP+ort9chAZ0THGQIkFV8HbGytyx84uok cl70sUzVFIdFJ7xUD/drw77jIgQyPYn/zhWjF5RM3ECqPZNFkF1XJRqmFrVguN1cKfOf xCrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=gcxUP6bHXuQdMuIF1WJ7Pvm+PekKzeu05mulLi4Dh40=; b=FBsikYwUhP5GsGaPQYalInFzi5WRnaQG4uI/ysv3NAnOQashT/F0QbWShTq9xotIHU V/jEc0QiH7EmZubVrj6neqJixD8U9jz8b3D9NMiQqaf/1QCTqWmSfG8Vu7UhD3600jNu U3AxXRCyn9pL5PO6bGRupY5EMdhXn+4BrIj1B2343y2jt8fZrpGdAQN0GWYqjB+tKGu4 Ldmkk1Ynf0z+GW6x/uKux+Pp2XvvlLS4UMOLhrG9KS9tcHVBEUbiu5pPrYcz9KEHzjuy haLFQpvxzYzTrNlg+D05PXtjfFfF9eIjOtaXvqmpSzw87auGUpAEPqyWSvrv6nB75g1s jirw== X-Gm-Message-State: APjAAAUuume8v7Zt+HQRQDlA1C2uY37OoSD3W2knKRmkSqcop+YMemSN ILadIre8i4K97ykl6Ago9Bw= X-Google-Smtp-Source: APXvYqwIsI/MMkblBo/FpCE3f1old4pJKjBLNvUhX62l/NN7kFRXOe3yNQmFvMgB13+IkB+ofBbQiA== X-Received: by 2002:a5d:8b4d:: with SMTP id c13mr9973997iot.151.1565385376000; Fri, 09 Aug 2019 14:16:16 -0700 (PDT) Received: from raichu (toroon0560w-lp130-04-184-145-252-124.dsl.bell.ca. [184.145.252.124]) by smtp.gmail.com with ESMTPSA id 8sm78225730ion.26.2019.08.09.14.16.14 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 09 Aug 2019 14:16:14 -0700 (PDT) Sender: Mark Johnston Date: Fri, 9 Aug 2019 17:16:12 -0400 From: Mark Johnston To: Kevin Oberman Cc: FreeBSD Stable ML Subject: Re: Memory management changes after kernel update on 6-Aug Message-ID: <20190809211612.GF86532@raichu> References: <20190809183547.GE86532@raichu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) X-Rspamd-Queue-Id: 464yhx16z5z43Tj X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=tIAs7RAF; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::344 as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-3.15 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; FREEMAIL_TO(0.00)[gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[124.252.145.184.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-0.46)[ip: (3.11), ipnet: 2607:f8b0::/32(-2.98), asn: 15169(-2.40), country: US(-0.05)]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[stable@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[4.4.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Aug 2019 21:16:18 -0000 On Fri, Aug 09, 2019 at 01:05:50PM -0700, Kevin Oberman wrote: > On Fri, Aug 9, 2019 at 11:35 AM Mark Johnston wrote: > > > On Fri, Aug 09, 2019 at 11:09:24AM -0700, Kevin Oberman wrote: > > > Since I updated my 12.0-STABLE system on 6-Aug I have been seeing issues > > > resuming my Win7 VM on VirtualBox. My prior kernel was built on 24-Jul. > > If > > > there is not sufficient memory available to reload the system (4 Meg.), > > the > > > > Where does this number come from? What memory usage stats do you see in > > top(1) when the error occurs? > > > > I am monitoring memory usage with gkrellm. It appears to define "Free" as > the sum of "Inactive" and "Free". If you are referring to size of the VM, > was supposed to be the memory specified when I created the VM, but my > fingers got ahead of my brain and it should have been 4G, not 4M. Hey! > What's a few orders of magnitude? > > Oddly, when I watch memory space closely I note that, as the VM loads, I > started seeing swap utilization increase as free space was exhausted at > about 80% loaded. Loading continued to 98%. at that point loading stopped > and swap use continued to grow for a bit. Then free space started to > increase from about 300M to about 700M before the error window popped up. > > > > > resume fails with a message that memory was exhausted. Usually I can try > > > resuming again and it will work. Sometimes I get the error two or three > > > times before the system resumes. > > > > What exactly is the error message? > > > Failed to open a session for the virtual machine Win7. > > Failed to load unit 'pgm' (VERR_EM_NO_MEMORY). > > Result Code: NS_ERROR_FAILURE (0x80004005) > Component: ConsoleWrap > Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed} > > > > > > > Since I have not touched VirtualBox other than to rebuild the kmod after > > > the kernel build, it looks like something in the OS triggered this. Since > > > the system frees up some memory each time so that the VM eventually > > > resumes, it looks like the memory request is made to the OS, but VB is > > not > > > waiting or not enough memory is freed to allow the VB to complete the > > > resume. > > > > > > Any clue what might have changed over those 13 days? I am running GENERIC > > > except that I run the 4BSD scheduler. > > > > Possible culprits are r350374 and r350375, but I can't really see how. > > > > This started after the 6-Aug build (r350664). My prior build was r350292, > so just before these two commits. > > Can I try just reverting these two? Once I do, it will need to run for a > while or do something to tie up a lot of memory before the error will > recur. In normal use it is a matter of firefox increasing resident memory > until there is not enough free memory to load the VM without swapping. > (These days I often see the sum of all firefox process resident memory > exceeding 3G after it's been up for a day or two. Still, not worse than > chromium.) Those commits can simply be reverted, but I am skeptical that they will help. You should also verify that these same conditions don't lead to errors on your prior build, if you haven't already.