From owner-svn-src-all@freebsd.org Wed Jun 17 15:21:32 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 1327535162A; Wed, 17 Jun 2020 15:21:32 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 49n8175KCZz3fSH; Wed, 17 Jun 2020 15:21:31 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr1-x444.google.com with SMTP id b6so2747727wrs.11; Wed, 17 Jun 2020 08:21:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=7DOieZxSPzOesXmGB831iUe8+s/KMxTVMzadqxkXk7Q=; b=ZjHLDj4+IY79BX423WWkJRHLHxLNPPRb2cs5xRpi9YjQPxPPsC2ZHo3yJJ0mXht4cQ R2LxjvBr6903VIKpBjcDPRqMRXMMfsziwdjhWRdfN5AMKXqvbyZLgG7InxuvScaUaMN4 JK65Zzgfclrj1RNmZ39QLhdjGv5Iaci99AhxMxbW+EK9DnOaRJ8fH/gWVqnGGB2U2FSO n5h3FzdSzwhmAMmxmrxaMl4B/YffVCChlI611tpDU8NcQiPvgWr7X0SvSYKHljuXUl75 Ca+lqv5F2UXT7KnhHDaBfvgAj4k3AP/ci+Wx58W1swvhnyXNRvWSpWJc0SktyIh6DktO JsOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=7DOieZxSPzOesXmGB831iUe8+s/KMxTVMzadqxkXk7Q=; b=YIaBMyWeWcax23IRX8G7t033T2Bxv8nb5NBSXxdQw/S0lgU6mAfmljpb7fcZxIUm5k ZOOnzOzp3CN6sd3YsPbAv13FyLUEUohwEbxwMFrzYzXEsby4zTBBcNRdVWgUfqdqGCfc I6Xphm91edxx7ArzBywkN78VzI0tNlbQG/EncYWxBAtR/cnF/LumiKJWaZSt+tgEesiF LEWnImzHY6N+s8TXDddrHR7mZEx8VsWctZYEKjC4FPhi4tIID2gO1jf+kEukwMlV+H65 fqzzLQAyJncr66yaJNJ7EeV3nGQwx78BRF15QvywRvgvuMD8N32mzEy/hQhEJss71Gwl r0Lg== X-Gm-Message-State: AOAM5338DSjUea9zZ9Jaws3Vrl4hSfAm5dPcm3QX+BQqSHClCT4a4MRw oL22uZvqs2KiaLNwveBiYDMnCo01lVDpdC4GWKU9lBLA X-Google-Smtp-Source: ABdhPJxqCvtp7DVCYnTR1Kr9ljcI/CjCPugSzPKj/WBD2dYP8KO/M5Boh2HrnTLY0pNc5aOC9cI2AgX+yaGREkQQXmA= X-Received: by 2002:adf:a350:: with SMTP id d16mr9348816wrb.237.1592407288849; Wed, 17 Jun 2020 08:21:28 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a5d:45c9:0:0:0:0:0 with HTTP; Wed, 17 Jun 2020 08:21:27 -0700 (PDT) In-Reply-To: References: <202006091517.059FHNS9050196@repo.freebsd.org> From: Mateusz Guzik Date: Wed, 17 Jun 2020 17:21:27 +0200 Message-ID: Subject: Re: svn commit: r361967 - head/sys/kern To: Kyle Evans Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49n8175KCZz3fSH X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; REPLY(-4.00)[] 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:21:32 -0000 pho@ reported triggering one of the asserts: https://people.freebsd.org/~pho/stress/log/mjguzik028.txt I did not have the time to properly investigate this yet and this does not reproduce for me. That said, I may either revert the assert (or degrade to a warning) or add some commentary if I don't sort this out this week. On 6/17/20, Kyle Evans wrote: > 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 > -- Mateusz Guzik