From nobody Tue Jan 17 10:02:31 2023 X-Original-To: jail@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 4Nx4FM3Tcqz2sr28 for ; Tue, 17 Jan 2023 10:02:31 +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 4Nx4FM2SdZz3mLJ for ; Tue, 17 Jan 2023 10:02:31 +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=1673949751; 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=m61cvJq8vVyh3LF8UmzxxazHgrrqf90s9J+J0ItTsqs=; b=hzBbgBI0Xm8DiEkS9PoD04ARAE+PMvAbyGnkkDGql92JclQOsqWkPBLLyoVnjtcZRRoPKW 6Fje+Q2TfOwq3O4F8EkPkNC0mwkUgy/UAk5WmSkrJ/HI1zf0o//S/cANnMKUPFoaSjexaH 7BaAl2A3mu1I2rYEEzJIvhLTItl3YPGjAsIqLKL+UL325nM2sKDCUx6ZREEBg6ZReC9sLF WpAAC3h/ZYiwfgmjWrS55RoJfXL9EFNXzgc52U0T/9amI2XxsMwSzH8Tc3jcV+VnYxccmW JlnVgrrMhE7j7F4PdSawxQjtV3no8FWgGvQh/KzcsSWdzCjThSolp92teTt7fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673949751; a=rsa-sha256; cv=none; b=XlgPVZ/pEFKsAtQ0VHpgZn6XsmN2ufpONrK9rstUshnPbVE+wayq5lVqkN0eWNujJYZ2JC nNhxKyD1C7MgbFVxsDFERp5tDtMa6uABCoE7hmGd5F4g6cYaXrlNM0F9GtgQN6W9sOO6wn aO+uLxxzFjLpDP9q9crZ2udBf8zoHbKp9qWKgoiTdpf6ow0fPb4HbfS3+GUaRQO2V4jV5B IBjV1qcD4KrdhD64B9EFwSoWgcFjd+PNck2T5BNuiKeQh/pSM++kJ5gR7sIl7AuyuR1rlX 6VVFe6e8IQyjOjZublu/yiCQDt9kgKVPxXaBi9DSeq82akgl+T9NcujWKZt0qQ== 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 4Nx4FM1YVjzSKx for ; Tue, 17 Jan 2023 10:02:31 +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 30HA2VkM084693 for ; Tue, 17 Jan 2023 10:02:31 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 30HA2VsQ084692 for jail@FreeBSD.org; Tue, 17 Jan 2023 10:02:31 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: jail@FreeBSD.org Subject: [Bug 222951] Re-starting a jail with mount.devfs mounts devfs multiple times Date: Tue, 17 Jan 2023 10:02:31 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: zlei@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: jail@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: Discussion about FreeBSD jail(8) List-Archive: https://lists.freebsd.org/archives/freebsd-jail List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-jail@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222951 --- Comment #2 from Zhenlei Huang --- (In reply to VK from comment #0) > The problem seems to be when the (nopersist) jail is stopped by itself be= cause all > the processes in it have exited, so it wasn't explicitly `jail -r`. When = that=20 > happens, devfs is not unmounted. For non-persist jails I think this is the expected behavior. `mount.devfs` is a pseudo-parameter and as per jail(8): > There are pseudo-parameters that are not passed to the kernel, but are > used by jail to set up the jail environment, often by running specifi= ed > commands when jails are created or removed. > So next time the jail is started, devfs is mounted again, resulting with = multiple=20 > mounts of devfs into $JAIL_ROOT/dev: Maybe we can teach /usr/sbin/jail to check existing mount of devfs(5) before starting jails. --=20 You are receiving this mail because: You are the assignee for the bug.=