From nobody Sun May 21 17:59:55 2023 X-Original-To: net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QPSz032G3z4CHM2 for ; Sun, 21 May 2023 17:59:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QPSz00pLQz3q3n for ; Sun, 21 May 2023 17:59:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684691996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x7r00OfwJ7Z016hbwFloBydobuBpRD8gW2JKPJL0N4o=; b=hUCXyHZip1lzJHUriYjMiDcYjBE425mr0IBNkH9/TQCBUSPfcTjxpryz3RopMg06qqYw/t O2WzgUTsFYFOJMtbsJS05K02MY99ikT3277N2ZT8Xb/lGKvEqvV5U971IamsyfavtFYGb2 YLuU+sZIX21sliCkvcOMU3wzX8GjM7PnyMfze/vcgFKNkbxGFEEuPoGob64BfdfOBPc6cN /GGiRHqVhEyorerFgEGT7pnDJCMANJ3K2uBogbhEVu7BvRkGPXETDH+fBIm3UHOUF9Qv8V ShHObQt7euS13anSwHqXPm97lABs7LOvbwaPN54xbyUFTrHfjqn6fMGDJXJEVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684691996; a=rsa-sha256; cv=none; b=GO2hM0LWBd+TfZdKtGPTt4kyGBSM9Oqh3IlVrxhg29EO6TkD/CuCqg4LNde/KGKnlFy1C4 0BK04GKI0anQ2lJkrhNwZkyeU45SRwnu0L6cdV/IOXJ+bs9UBzwea/KdmGcqs8CUB7Uvjo BbjAwLf15Y4PPgkX/2Rz8FKTsz0tWedgg0cyj8mJtQ9j6cBBEAN7sszTvqAnnMZwKnTTuR 1AUMGIKJPKS4qXr/E7WR3aqAaTFD9YL/oo6z7Aje+snmYIH6ousrHsn6FbcYMSMy9jO9aT DJiipeBHysK10tutWkm4vJxb8qDMyI4gmVs2SFb1LSQvg/ce4gkNgoF9bpsOBg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QPSyz6tqJz11NQ for ; Sun, 21 May 2023 17:59:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 34LHxtgA063155 for ; Sun, 21 May 2023 17:59:55 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 34LHxtSN063154 for net@FreeBSD.org; Sun, 21 May 2023 17:59:55 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 271474] Possible to "lose" a tap(4) interface in a jail Date: Sun, 21 May 2023 17:59:55 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: freebsd@kumba.dev X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271474 --- Comment #2 from Joshua Kinard --- (In reply to Meyser+bugs.freebsd.org from comment #1) > /etc/rc.d/netif is NOT invoked inside vnetjails. (novnetjail Keyword) > so cloned interfaces are NOT destroyed during shutdown. >=20 > After changing exec.stop in /etc/jail.conf to >=20 > exec.stop =3D "/bin/sh /etc/rc.d/netif stop; /bin/sh /etc/rc.shutdown"; >=20 > cloned interfaces are destroyed before shutdown. >=20 > Perhaps this works in your case too. It looks like "nojailvnet" actually means "allow vnet jails", according to = the rc(8) manpage. The wording for that rc keyword could've been chosen better, IMHO, but in my case, I am using a VNET-enabled jail to run bhyve in. So I don't think this is the exact cause. Rather than keep running this experiment on my production appliance, I dug = an older appliance out of a box and setup a clone of the production appliance's filesystem on it to use as a toy, and tried to re-replicate the case where = tap0 was getting "lost", but so far, I have no been able to find a reproducible cause. Stopping the jail while bhyve was running and then trying to restar= t it kinda-reproduced my initial scenario where netif was unable to create tap0 = on jail start-up, but simply destroying the "dead" bhyve instance from the host-level, then restarting the jail cleared that and tap0 could be re-crea= ted. So I am a bit stumped how I originally triggered this fluke in a way that w= as unrecoverable w/o a reboot. That said, dropping the jail w/ bhyve running = will still create a point where the handle for tap0 is still held by bhyve and t= hus, it can't be recreated next time the jail is restarted until the bhyve sessi= on is destroyed at the host level. So that might be a good debugging point for someone to look into the tap(4) driver to see if there's a way to mitigate this. --=20 You are receiving this mail because: You are the assignee for the bug.=