From owner-dev-commits-src-all@freebsd.org Thu Feb 25 05:29:38 2021 Return-Path: Delivered-To: dev-commits-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 180BF55731F; Thu, 25 Feb 2021 05:29:38 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmLvQ07lDz3hKH; Thu, 25 Feb 2021 05:29:38 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (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 E67AC21BFF; Thu, 25 Feb 2021 05:29:37 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f169.google.com with SMTP id z190so4626896qka.9; Wed, 24 Feb 2021 21:29:37 -0800 (PST) X-Gm-Message-State: AOAM532Zk/fs/rror8+1fdUCjgs08bIPmLw5WsGns8oRyRW9+DxLgCKu BZ9n6YAYc+tGbVet1hPVYhlbPh5+2BBMzzUMoog= X-Google-Smtp-Source: ABdhPJy8MMv1F6SETwrljMa0NwLp4vP4wYGTr+3owxPiejj1mZLNLJdsPhSvAmZvO+iR14IFGyQm90wJmJTp10yfr1M= X-Received: by 2002:a37:6484:: with SMTP id y126mr1372123qkb.430.1614230977327; Wed, 24 Feb 2021 21:29:37 -0800 (PST) MIME-Version: 1.0 References: <202102222027.11MKRtcl033616@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Wed, 24 Feb 2021 23:29:26 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 811e27fa3c44 - main - jail: Add PD_KILL to remove a prison in prison_deref(). To: Alexander Richardson Cc: Jamie Gritton , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 05:29:38 -0000 On Tue, Feb 23, 2021 at 7:16 AM Alexander Richardson wrote: > > On Mon, 22 Feb 2021 at 20:28, Jamie Gritton wrote: > > > > The branch main has been updated by jamie: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=811e27fa3c445664e36071a7d08228fc7fb85676 > > > > commit 811e27fa3c445664e36071a7d08228fc7fb85676 > > Author: Jamie Gritton > > AuthorDate: 2021-02-22 20:27:44 +0000 > > Commit: Jamie Gritton > > CommitDate: 2021-02-22 20:27:44 +0000 > > > > jail: Add PD_KILL to remove a prison in prison_deref(). > > > > Add the PD_KILL flag that instructs prison_deref() to take steps > > to actively kill a prison and its descendents, namely marking it > > PRISON_STATE_DYING, clearing its PR_PERSIST flag, and killing any > > attached processes. > > > > This replaces a similar loop in sys_jail_remove(), bringing the > > operation under the same single hold on allprison_lock that it already > > has. It is also used to clean up failed jail (re-)creations in > > kern_jail_set(), which didn't generally take all the proper steps. > > > > Differential Revision: https://reviews.freebsd.org/D28473 > > Hi Jamie, > > After this commit running cd /usr/tests/lib/libc/sys && kyua test > cpuset_test renders the entire system unusable: all exec calls > afterwards seem to fail. In Jenkins it's triggering a kernel panic: > https://ci.freebsd.org/job/FreeBSD-main-amd64-test/17630/consoleFull > Reverting this commit fixes the issue. > Based on the backtrace and a wild stab in the dark, the last prison_deref() in do_jail_attach() prior to successful return should explicitly clear the PD_KILL flag from drflags. Thanks, Kyle Evans