From owner-freebsd-current@freebsd.org Fri Jun 15 09:04:02 2018 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 89206100CC4A for ; Fri, 15 Jun 2018 09:04:02 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-wr0-x231.google.com (mail-wr0-x231.google.com [IPv6:2a00:1450:400c:c0c::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E9D52820CA for ; Fri, 15 Jun 2018 09:04:01 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-wr0-x231.google.com with SMTP id w10-v6so9151912wrk.9 for ; Fri, 15 Jun 2018 02:04:01 -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=LKwLf30LdqZdRODuiMi+0i1TrZ/wNfL9Q7uNBeoRbTI=; b=L53kSy6E4XOn5HLoXvISzDLN5w6wHGfDUuRCQwkJtdqheKbJ6U13By8prUla0S44ED ndCWf6iX5/4zAbWcD+jwPj+EcE4k/FUYjOXXAsCTle3GQ2bw33+lXfMYYcbOeOcWDofM 5q8UBwYaxhHShALH9uasqpd8xir3AzNjF3v3sHx8FV72bC00Lbbpe4hbMf0wF2liSI71 OggV009SfUkhk4gJH7CTE81ckUP5i6tXnxKTHLmU505/rXaBKuwbDgOiys2fl1r5KiN9 28bz7DbqD3H2w62HLP/dkXkaErudLcLi/3Ej9ayCPJKCsdx5VSS28FUy1FbLW7CAgV1+ C/Ag== 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=LKwLf30LdqZdRODuiMi+0i1TrZ/wNfL9Q7uNBeoRbTI=; b=JPemJHpErxlBHQZCD4iIM+fsrbFcRTPwThyF3vcXduYAHi4dZektxURW5mBQ6Cm+uU d3YWcuExXm5ky4pZXJZ4tp+BmPOTkB9RB73hT0qlhBrMO/TufN9VgN70szqwzGRmN9Kt P7A3BBYNNuXDnOMpt2ppqT76Lzy0ZkBRsTG22LziUbZPJte1ZcbdUsUwvr4Ds6QIXTRe olsoc+/1OEQCmYjACTJcHKXW5FTSScWBXxnEnwyCVZMu0MxA5XHybyNG0ZjiPbp6jRl+ pQJ++XSTvjf/BQ5Fw8vIcPQjXy2GxHXaSqvwy5YOtfb7e5ehkAKhvxk2tOUFbGmNAuNE mwdg== X-Gm-Message-State: APt69E2zv13hxCjY5lfV+0iqtd3yd2avt3b5/13WGJVOWg2NEF/ktcLw eFWqfzp9IwGI2JDii5HGbaWhtA== X-Google-Smtp-Source: ADUXVKIyHJpl1PNaHZngFhsmxPkT5AUpG/BkweTroa1Ys53UlIGJqqpdhNj1EDJwZ9/nnik83STHhg== X-Received: by 2002:adf:eccd:: with SMTP id s13-v6mr902636wro.160.1529053440803; Fri, 15 Jun 2018 02:04:00 -0700 (PDT) Received: from pesky.lan (84.32.136.95.rev.vodafone.pt. [95.136.32.84]) by smtp.gmail.com with ESMTPSA id r9-v6sm6159286wrs.63.2018.06.15.02.03.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Jun 2018 02:04:00 -0700 (PDT) Sender: Mark Johnston Date: Fri, 15 Jun 2018 05:03:58 -0400 From: Mark Johnston To: Kurt Jaeger Cc: FreeBSD current Subject: Re: swapping is completely broken in -CURRENT r334649? Message-ID: <20180615090358.GB32922@pesky.lan> References: <20180605181716.73b8ea91@ernst.home> <2925b27f-43cf-8813-eaa7-4f3d12bef8f0@FreeBSD.org> <20180605214808.GA94301@pesky> <20180615051025.GA79327@ns.kevlo.org> <20180615084022.GA32922@pesky.lan> <20180615084808.GF4028@home.opsec.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180615084808.GF4028@home.opsec.eu> User-Agent: Mutt/1.10.0 (2018-05-17) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.26 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: Fri, 15 Jun 2018 09:04:02 -0000 On Fri, Jun 15, 2018 at 10:48:08AM +0200, Kurt Jaeger wrote: > Hi! > > > The change was committed as r334752. Are you seeing unexpected OOM > > kills on or after that revision? > > When I tried to run a qemu-based poudriere run yesterday on a r334918 > box, it killed a few processes outside of that run and did not > work out. > > I'm unsure it was because of that problem or a problem with qemu. How much memory and swap does the guest have? Were you consistently able to complete a run before? If it's happening during a poudriere run, it may well have been a true OOM situation. The patch below prints a few stats to the dmesg before the kill. The output of that together with "sysctl vm" output should be enough to determine what's happening. diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 264c98203c51..9c7ebcf451ec 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -1670,6 +1670,8 @@ vm_pageout_mightbe_oom(struct vm_domain *vmd, int page_shortage, * start OOM. Initiate the selection and signaling of the * victim. */ + printf("v_free_count: %u, v_inactive_count: %u\n", + vmd->vmd_free_count, vmd->vmd_pagequeues[PQ_INACTIVE].pq_cnt); vm_pageout_oom(VM_OOM_MEM); /*