From owner-freebsd-questions@freebsd.org Mon Apr 5 07:57:40 2021 Return-Path: Delivered-To: freebsd-questions@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 C1B365C55EA for ; Mon, 5 Apr 2021 07:57:40 +0000 (UTC) (envelope-from ml@netfence.it) Received: from soth.netfence.it (mailserver.netfence.it [78.134.96.152]) (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 "mailserver.netfence.it", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FDNLC4YDtz3Phx; Mon, 5 Apr 2021 07:57:39 +0000 (UTC) (envelope-from ml@netfence.it) Received: from alamar.ventu (alamar.local.netfence.it [10.1.2.18]) (authenticated bits=0) by soth.netfence.it (8.16.1/8.16.1) with ESMTPSA id 1357vafj071156 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Mon, 5 Apr 2021 09:57:36 +0200 (CEST) (envelope-from ml@netfence.it) X-Authentication-Warning: soth.netfence.it: Host alamar.local.netfence.it [10.1.2.18] claimed to be alamar.ventu Subject: Re: devel/google-perftools in a jail To: yuri@FreeBSD.org Cc: freebsd-questions@FreeBSD.org References: <18dcbb14-d208-071e-8f93-39dd45d7dc14@rawbw.com> <2cfa2de6-3d22-bc88-90d2-49e94d1a8f0d@netfence.it> <85f65024-2c3e-b83e-da5a-21d522a92bc6@rawbw.com> <2fde0431-a9b2-ac42-c34b-8b2f312ddb85@netfence.it> From: Andrea Venturoli Message-ID: Date: Mon, 5 Apr 2021 09:57:35 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4FDNLC4YDtz3Phx X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=netfence.it; spf=pass (mx1.freebsd.org: domain of ml@netfence.it designates 78.134.96.152 as permitted sender) smtp.mailfrom=ml@netfence.it X-Spamd-Result: default: False [-3.80 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[78.134.96.152:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:78.134.96.152]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; TO_DN_NONE(0.00)[]; SPAMHAUS_ZRD(0.00)[78.134.96.152:from:127.0.2.255]; ARC_NA(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[netfence.it,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:35612, ipnet:78.134.0.0/17, country:IT]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2021 07:57:40 -0000 On 4/5/21 8:57 AM, yuri@FreeBSD.org wrote: > I tried to reproduce this problem, but couldn't. > > > I created the jail with the command: > > # jail -c path=/disk-huge/jail host.hostname=testjail ip4=inherit > command=/etc/rc Hello. I don't know how your "plain" jail works (thin or thick?); I'm using sysutils/ezjail. ezjail shares a single base OS instance among each jail, overlayed with specific files. I.e. it _ creates /usr/jails/basejail with a copy of the base OS (think make -D /usrjails/basejail installworld) _ creates each jail in /usr/jails/ e.g. /usr/jails/myjail and "mounts" basejail inside each with nullfs E.g. # zfs list|grep myjail zroot/ezjail/myjail 129G 647G 74.9G /usr/jails/myjail #ls -l /usr/jails/myjail total 45 -rw-r--r-- 2 root wheel 1089 Oct 30 15:49 .cshrc -rw-r--r-- 2 root wheel 470 Oct 30 15:49 .profile -rw------- 1 root wheel 1024 Sep 12 2017 .rnd -r--r--r-- 1 root wheel 6177 Oct 30 15:49 COPYRIGHT drwxr-xr-x 9 root wheel 9 May 18 2018 basejail lrwxr-xr-x 1 root wheel 13 Sep 12 2017 bin -> /basejail/bin drwxr-xr-x 10 root wheel 71 Mar 28 19:57 boot dr-xr-xr-x 12 root wheel 512 Mar 28 20:00 dev drwxr-xr-x 27 root wheel 110 Mar 6 12:11 etc lrwxr-xr-x 1 root wheel 9 Sep 12 2017 home -> usr/home/ lrwxr-xr-x 1 root wheel 13 Sep 12 2017 lib -> /basejail/lib lrwxr-xr-x 1 root wheel 17 Sep 12 2017 libexec -> /basejail/libexec drwxr-xr-x 2 root wheel 2 Sep 12 2017 media drwxr-xr-x 2 root wheel 2 Sep 12 2017 mnt drwxr-xr-x 2 root wheel 2 Sep 12 2017 net dr-xr-xr-x 1 root wheel 0 Apr 5 09:49 proc lrwxr-xr-x 1 root wheel 16 Sep 12 2017 rescue -> /basejail/rescue drwx------ 3 root wheel 11 Apr 2 19:02 root lrwxr-xr-x 1 root wheel 14 Sep 12 2017 sbin -> /basejail/sbin lrwxr-xr-x 1 root wheel 11 Sep 12 2017 sys -> usr/src/sys drwxrwxrwt 10 root wheel 12 Apr 5 07:05 tmp drwxr-xr-x 6 root wheel 16 Feb 27 2019 usr drwxr-xr-x 26 root wheel 26 Mar 28 20:00 var # mount -t nullfs|grep myjail /usr/jails/basejail on /usr/jails/myjail/basejail (nullfs, local, read-only) Does your plain jail do the same? bye & Thanks av. P.S. I repeat I solved in another way, so don't get mad at this unless it's in your interest.