From owner-svn-src-all@freebsd.org Wed Jun 17 15:16:06 2020 Return-Path: Delivered-To: svn-src-all@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 C285C351454; Wed, 17 Jun 2020 15:16:06 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49n7tt4pKJz3fNR; Wed, 17 Jun 2020 15:16:06 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 9A7491DB54; Wed, 17 Jun 2020 15:16:06 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f52.google.com with SMTP id d12so1198568qvn.0; Wed, 17 Jun 2020 08:16:06 -0700 (PDT) X-Gm-Message-State: AOAM530P4pDkG4vFB8jdT1yTXHXzfOrBGMs6yv2vbqZ1EuffW15JmNXr Mj6FnBubRV7yYSUuRy583NuxdC39O8UjICn6wj4= X-Google-Smtp-Source: ABdhPJwDPKqFJP4NLdidJNCmHtf/LKGloRq9d03QKSXdbrwyEz+gu4Com25V/J0S01IGHQMY/nZscmTyiPa3NKc5xkE= X-Received: by 2002:a0c:9ba0:: with SMTP id o32mr8059774qve.129.1592406965782; Wed, 17 Jun 2020 08:16:05 -0700 (PDT) MIME-Version: 1.0 References: <202006091517.059FHNS9050196@repo.freebsd.org> In-Reply-To: <202006091517.059FHNS9050196@repo.freebsd.org> From: Kyle Evans Date: Wed, 17 Jun 2020 10:15:53 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r361967 - head/sys/kern To: Mateusz Guzik Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jun 2020 15:16:06 -0000 On Tue, Jun 9, 2020 at 10:17 AM Mateusz Guzik wrote: > > Author: mjg > Date: Tue Jun 9 15:17:23 2020 > New Revision: 361967 > URL: https://svnweb.freebsd.org/changeset/base/361967 > > Log: > Assert on pg_jobc state. > > Stolen from NetBSD. > > Modified: > head/sys/kern/kern_proc.c > > Modified: head/sys/kern/kern_proc.c > ============================================================================== > --- head/sys/kern/kern_proc.c Tue Jun 9 14:20:16 2020 (r361966) > +++ head/sys/kern/kern_proc.c Tue Jun 9 15:17:23 2020 (r361967) > @@ -751,9 +751,11 @@ pgadjustjobc(struct pgrp *pgrp, int entering) > { > > PGRP_LOCK(pgrp); > - if (entering) > + if (entering) { > + MPASS(pgrp->pg_jobc >= 0); > pgrp->pg_jobc++; > - else { > + } else { > + MPASS(pgrp->pg_jobc > 0); > --pgrp->pg_jobc; > if (pgrp->pg_jobc == 0) > orphanpg(pgrp); We seem to be doing something wrong here, but I'm still working on reproducing it on a machine that actually has usable swap configured to get a dump. I've hit one of these asserts just from hitting the power button to shutoff from within xfce (hitting the latter branch with pgrp->pg_jobc == 0 IIRC) and another laptop panicked sometime overnight -- I wasn't able to catch the second one at all, because it's hooked up to a switch that loses its mind once that laptop panicks and it had to be rebooted before I could attend to it to revive network for the other machines on the switch. Thanks, Kyle Evans