From owner-freebsd-stable@freebsd.org Mon Dec 7 19:54:20 2020 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 E5ECA4B4944 for ; Mon, 7 Dec 2020 19:54:20 +0000 (UTC) (envelope-from pmc@citylink.dinoex.sub.org) Received: from uucp.dinoex.sub.de (uucp.dinoex.sub.de [IPv6:2001:1440:5001:1::2]) (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 (2048 bits) client-digest SHA256) (Client CN "uucp.dinoex.sub.de", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CqYt36PT6z3lY8 for ; Mon, 7 Dec 2020 19:54:19 +0000 (UTC) (envelope-from pmc@citylink.dinoex.sub.org) Received: from uucp.dinoex.sub.de (uucp.dinoex.org [185.220.148.12]) by uucp.dinoex.org (8.16.0.50/8.16.0.50) with ESMTPS id 0B7Js53F035949 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Mon, 7 Dec 2020 20:54:05 +0100 (CET) (envelope-from pmc@citylink.dinoex.sub.org) X-MDaemon-Deliver-To: X-Authentication-Warning: uucp.dinoex.sub.de: Host uucp.dinoex.org [185.220.148.12] claimed to be uucp.dinoex.sub.de Received: (from uucp@localhost) by uucp.dinoex.sub.de (8.16.0.50/8.16.0.50/Submit) with UUCP id 0B7Js5wj035948 for freebsd-stable@freebsd.org; Mon, 7 Dec 2020 20:54:05 +0100 (CET) (envelope-from pmc@citylink.dinoex.sub.org) Received: from gate.oper.dinoex.org (gate-e [192.168.98.2]) by citylink.dinoex.sub.de (8.16.1/8.16.1) with ESMTP id 0B7JgrpF011981 for ; Mon, 7 Dec 2020 20:42:53 +0100 (CET) (envelope-from peter@gate.oper.dinoex.org) Received: from gate.oper.dinoex.org (gate-e [192.168.98.2]) by gate.oper.dinoex.org (8.16.1/8.16.1) with ESMTP id 0B7JfRFc011829 for ; Mon, 7 Dec 2020 20:41:27 +0100 (CET) (envelope-from peter@gate.oper.dinoex.org) Received: (from peter@localhost) by gate.oper.dinoex.org (8.16.1/8.16.1/Submit) id 0B7JfRtP011828 for freebsd-stable@freebsd.org; Mon, 7 Dec 2020 20:41:27 +0100 (CET) (envelope-from peter) Date: Mon, 7 Dec 2020 20:41:27 +0100 From: Peter Sender: li-fbsd@citylink.dinoex.sub.org To: freebsd-stable@freebsd.org Subject: Analyzing kernel panic from VIMAGE/Netgraph takedown Message-ID: <20201207194127.GA10031@gate.oper.dinoex.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Milter: Spamilter (Reciever: uucp.dinoex.sub.de; Sender-ip: 185.220.148.12; Sender-helo: uucp.dinoex.sub.de; ) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (uucp.dinoex.org [185.220.148.12]); Mon, 07 Dec 2020 20:54:08 +0100 (CET) X-Rspamd-Queue-Id: 4CqYt36PT6z3lY8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of pmc@citylink.dinoex.sub.org has no SPF policy when checking 2001:1440:5001:1::2) smtp.mailfrom=pmc@citylink.dinoex.sub.org X-Spamd-Result: default: False [-2.10 / 15.00]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2001:1440:5001:1::2:from]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; TO_DN_NONE(0.00)[]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2001:1440:5001:1::2:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[4]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_NA(0.00)[sub.org]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8469, ipnet:2001:1440::/32, country:DE]; RCVD_TLS_LAST(0.00)[]; MAILMAN_DEST(0.00)[freebsd-stable] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2020 19:54:21 -0000 Stopping a VIMAGE+Netgraph jail in 12.2 in the same way as it did work with Rel. 11.4, crashes the kernel after 2 or 3 start/stop iterations. Specifically. this does not work: exec.poststop = "/usr/sbin/ngctl shutdown ${ifname1l}:"; Also this new option from Rel.12 does not work either, it just gives a few more iterations: exec.release = "/usr/sbin/ngctl shutdown ${ifname1l}:"; What seems to work is adding a delay: exec.poststop = " sleep 2 ; /usr/sbin/ngctl shutdown ${ifname1l}: ; "; The big question now is: how long should the delay be? This example did run a test with 100 start/stop iterations. But then, on a loaded machine stopping a jail that had been running for a few months, is an entirely different matter: in such a case the jail will spend hours in "dying" state, while in this test the jid became instantly free for restart. In any case, as all this did work flawlessly with Rel. 11.4, there is now something broken in the code, and should be fixed. PMc