From owner-freebsd-jail@FreeBSD.ORG Sun Dec 16 11:05:15 2012 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B4336998 for ; Sun, 16 Dec 2012 11:05:15 +0000 (UTC) (envelope-from zaphod@berentweb.com) Received: from sam.nabble.com (sam.nabble.com [216.139.236.26]) by mx1.freebsd.org (Postfix) with ESMTP id 8F9CF8FC0A for ; Sun, 16 Dec 2012 11:05:15 +0000 (UTC) Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1TkC1y-0006Zb-PL for freebsd-jail@freebsd.org; Sun, 16 Dec 2012 03:05:14 -0800 Date: Sun, 16 Dec 2012 03:05:14 -0800 (PST) From: Beeblebrox To: freebsd-jail@freebsd.org Message-ID: <1355655914763-5769704.post@n5.nabble.com> In-Reply-To: <1353705747809-5763645.post@n5.nabble.com> References: <1353705747809-5763645.post@n5.nabble.com> Subject: Options for updating jail world (regular and ezjail) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Dec 2012 11:05:15 -0000 I have worked on this problem and I also want to clarify the question: * After buildworld / installworld on host, one would like to update jail worlds also. * My Jail worlds do not need man pages, src, ports, etc. But my host world does need those. * After installworld on host, in /usr/src/release do: # make release -DNOSRC -DNOPORTS -DNODOC -DNO_MAN DNO_GAMES -DNO_INFO -DNO_JAIL * Update native jail and ezjail base using the release sources (ftp or release.iso) So my question is how to update exactly: 1. for ezjail would it be: #ezjail-admin update -h file://usr/obj/src/release/release.iso It is possible to install from the disc1 CDRom, or an extracted -RELEASE directory, by specifying the host argument as file://path/to/source. However, the "-h" option is not availble for the update (only the install) Also, ezjail gives this warning for the update. As the old basejail is not deleted, but merely overwritten, this usually leaves all jails in a state where they still find older versions of libraries they were linked against. Okay, so what is the solution to that problem? 2. For the base jail, normally # make installworld DESTDIR=/pathto/jail would be enough but since I want to use the trimmed-down release version, that won't work. Should I just extract the *txz files? 3. As another solution there seems to be the freebsd-update method for both types of jails, but I need some insight as to how well this would work (I have never used freebsd-update so I do not know its capabilities). Thanks and Regards. -- View this message in context: http://freebsd.1045724.n5.nabble.com/Options-for-updating-jail-world-regular-and-ezjail-tp5763645p5769704.html Sent from the freebsd-jail mailing list archive at Nabble.com. From owner-freebsd-jail@FreeBSD.ORG Mon Dec 17 11:06:46 2012 Return-Path: Delivered-To: freebsd-jail@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0309698A for ; Mon, 17 Dec 2012 11:06:46 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id DA9AE8FC12 for ; Mon, 17 Dec 2012 11:06:45 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qBHB6jkq023488 for ; Mon, 17 Dec 2012 11:06:45 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qBHB6jxS023486 for freebsd-jail@FreeBSD.org; Mon, 17 Dec 2012 11:06:45 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 17 Dec 2012 11:06:45 GMT Message-Id: <201212171106.qBHB6jxS023486@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-jail@FreeBSD.org Subject: Current problem reports assigned to freebsd-jail@FreeBSD.org X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2012 11:06:46 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/174436 jail [jail] Jails with numbers as names don't work o bin/173469 jail [jail] regression: security.jail.sysvipc_allowed=1 no o kern/169751 jail [jail] reading routing information does not work in ja o bin/167911 jail new jail(8) problem with removal, ifconfg -alias and k o kern/159918 jail [jail] inter-jail communication failure o kern/156111 jail [jail] procstat -b not supported in jail o misc/155765 jail [patch] `buildworld' does not honors WITHOUT_JAIL o conf/154246 jail [jail] [patch] Bad symlink created if devfs mount poin o conf/149050 jail [jail] rcorder ``nojail'' too coarse for Jail+VNET s conf/142972 jail [jail] [patch] Support JAILv2 and vnet in rc.d/jail o conf/141317 jail [patch] uncorrect jail stop in /etc/rc.d/jail o kern/133265 jail [jail] is there a solution how to run nfs client in ja o kern/119842 jail [smbfs] [jail] "Bad address" with smbfs inside a jail o bin/99566 jail [jail] [patch] fstat(1) according to specified jid 14 problems total. From owner-freebsd-jail@FreeBSD.ORG Mon Dec 17 14:10:04 2012 Return-Path: Delivered-To: freebsd-jail@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 79B4B5CE for ; Mon, 17 Dec 2012 14:10:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 5E8888FC13 for ; Mon, 17 Dec 2012 14:10:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qBHEA478033731 for ; Mon, 17 Dec 2012 14:10:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qBHEA4Ys033730; Mon, 17 Dec 2012 14:10:04 GMT (envelope-from gnats) Date: Mon, 17 Dec 2012 14:10:04 GMT Message-Id: <201212171410.qBHEA4Ys033730@freefall.freebsd.org> To: freebsd-jail@FreeBSD.org Cc: From: Robert Schulze Subject: Re: misc/174436: [jail] Jails with numbers as names don't work X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Robert Schulze List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2012 14:10:04 -0000 The following reply was made to PR kern/174436; it has been noted by GNATS. From: Robert Schulze To: Mateusz Guzik Cc: bug-followup@FreeBSD.org Subject: Re: misc/174436: [jail] Jails with numbers as names don't work Date: Mon, 17 Dec 2012 14:57:06 +0100 Hello, Am 14.12.2012 17:01, schrieb Mateusz Guzik: > Hi, > > can you provide backtrace from this panic? Are you able to reproduce it? I can reproduce this behaviour reliably. Here is a backtrace, I had to type that manually: fault virtual address = 0x110 fault code = supervisor read data, page not present instruction pointer = 0x20:0xffffffff804d9d54 stack pointer = 0x28:0xffffff8489ce47d0 frame pointer = 0x28:0xffffff8489ce47f0 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 1058 (jail) trap number = 12 panic: page fault cpuid = 7 KDB: stack backtrace: #0 0xffffffff8053de06 at kdb_backtrace+0x66 #1 0xffffffff80507c6e at panic+0x1ce #2 0xffffffff807579f0 at trap_fatal+0x290 #3 0xffffffff80757d28 at trap_pfault+0x1e8 #4 0xffffffff8075832e at trap+0x3be #5 0xffffffff80741bef at calltrap+0x8 #6 0xffffffff804dbef6 at prison_deref+0x1f6 #7 0xffffffff804debff at kern_jail_set+0x14af #8 0xffffffff804e1282 at sys_jail_set+0x62 #9 0xffffffff807572d0 at amd64_syscall+0x540 #10 0xffffffff80741ed7 at Xfast_syscall+0xf7 with kind regards, Robert Schulze From owner-freebsd-jail@FreeBSD.ORG Mon Dec 17 21:40:01 2012 Return-Path: Delivered-To: freebsd-jail@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 71B7ACBC for ; Mon, 17 Dec 2012 21:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 3A9FF8FC0A for ; Mon, 17 Dec 2012 21:40:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qBHLe1X4058410 for ; Mon, 17 Dec 2012 21:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qBHLe1hv058409; Mon, 17 Dec 2012 21:40:01 GMT (envelope-from gnats) Date: Mon, 17 Dec 2012 21:40:01 GMT Message-Id: <201212172140.qBHLe1hv058409@freefall.freebsd.org> To: freebsd-jail@FreeBSD.org Cc: From: Mateusz Guzik Subject: Re: misc/174436: [jail] Jails with numbers as names don't work X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Mateusz Guzik List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2012 21:40:01 -0000 The following reply was made to PR kern/174436; it has been noted by GNATS. From: Mateusz Guzik To: Robert Schulze Cc: bug-followup@FreeBSD.org Subject: Re: misc/174436: [jail] Jails with numbers as names don't work Date: Mon, 17 Dec 2012 22:31:27 +0100 On Mon, Dec 17, 2012 at 02:57:06PM +0100, Robert Schulze wrote: > Hello, > > Am 14.12.2012 17:01, schrieb Mateusz Guzik: > >Hi, > > > >can you provide backtrace from this panic? Are you able to reproduce it? > > I can reproduce this behaviour reliably. Can you send me your kernel or put somewhere for download? If not, provide output of the following: # addr2line -e /boot/kernel/kernel 0xffffffff804debff # addr2line -e /boot/kernel/kernel 0xffffffff804dbef6 Also I don't think that '0' has any significance here. Can you change it to something else and try again? Can you try with different IP? Preferably 127.0.0.2 on lo0. > Here is a backtrace, I had to type that manually: > > fault virtual address = 0x110 > fault code = supervisor read data, page not present > instruction pointer = 0x20:0xffffffff804d9d54 > stack pointer = 0x28:0xffffff8489ce47d0 > frame pointer = 0x28:0xffffff8489ce47f0 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 1058 (jail) > trap number = 12 > panic: page fault > cpuid = 7 > KDB: stack backtrace: > #0 0xffffffff8053de06 at kdb_backtrace+0x66 > #1 0xffffffff80507c6e at panic+0x1ce > #2 0xffffffff807579f0 at trap_fatal+0x290 > #3 0xffffffff80757d28 at trap_pfault+0x1e8 > #4 0xffffffff8075832e at trap+0x3be > #5 0xffffffff80741bef at calltrap+0x8 > #6 0xffffffff804dbef6 at prison_deref+0x1f6 > #7 0xffffffff804debff at kern_jail_set+0x14af > #8 0xffffffff804e1282 at sys_jail_set+0x62 > #9 0xffffffff807572d0 at amd64_syscall+0x540 > #10 0xffffffff80741ed7 at Xfast_syscall+0xf7 > > with kind regards, > Robert Schulze -- Mateusz Guzik From owner-freebsd-jail@FreeBSD.ORG Tue Dec 18 09:50:01 2012 Return-Path: Delivered-To: freebsd-jail@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8859749E for ; Tue, 18 Dec 2012 09:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 503BA8FC18 for ; Tue, 18 Dec 2012 09:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qBI9o1RZ004939 for ; Tue, 18 Dec 2012 09:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qBI9o10B004934; Tue, 18 Dec 2012 09:50:01 GMT (envelope-from gnats) Date: Tue, 18 Dec 2012 09:50:01 GMT Message-Id: <201212180950.qBI9o10B004934@freefall.freebsd.org> To: freebsd-jail@FreeBSD.org Cc: From: Robert Schulze Subject: Re: misc/174436: [jail] Jails with numbers as names don't work X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Robert Schulze List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 09:50:01 -0000 The following reply was made to PR kern/174436; it has been noted by GNATS. From: Robert Schulze To: Mateusz Guzik Cc: bug-followup@FreeBSD.org Subject: Re: misc/174436: [jail] Jails with numbers as names don't work Date: Tue, 18 Dec 2012 10:48:18 +0100 Hi, Am 17.12.2012 22:31, schrieb Mateusz Guzik: > > Can you send me your kernel or put somewhere for download? > > If not, provide output of the following: > # addr2line -e /boot/kernel/kernel 0xffffffff804debff > # addr2line -e /boot/kernel/kernel 0xffffffff804dbef6 # addr2line -e /boot/kernel/kernel 0xffffffff804debff /usr/src/sys/kern/kern_jail.c:1848 # addr2line -e /boot/kernel/kernel 0xffffffff804dbef6 /usr/src/sys/kern/kern_jail.c:4537 Shall I build GENERIC on this machine and try again? > > Also I don't think that '0' has any significance here. Can you change it > to something else and try again? Can you try with different IP? > Preferably 127.0.0.2 on lo0. # vi /etc/rc.conf jail_0_rootdir="/mnt/jail-0" jail_0_hostname="foobar.example.com" jail_0_ip="127.0.0.2" jail_0_devfs_enable="YES" jail_0_interface="lo0" # /etc/rc.d/jail onestart 0 Configuring jails:. Starting jails: -> SAME panic # vi /etc/rc.conf jail_j0_rootdir="/mnt/jail-0" jail_j0_hostname="foobar.example.com" jail_j0_ip="127.0.0.2" jail_j0_devfs_enable="YES" jail_j0_interface="lo0" # /etc/rc.d/jail onestart j0 Configuring jails:. Starting jails: foobar.example.com -> NO panic. # jls JID IP Address Hostname Path 1 127.0.0.2 foobar.example.com /mnt/jail-0 with kind regards, Robert Schulze From owner-freebsd-jail@FreeBSD.ORG Tue Dec 18 10:20:01 2012 Return-Path: Delivered-To: freebsd-jail@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5208592 for ; Tue, 18 Dec 2012 10:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 1AF698FC16 for ; Tue, 18 Dec 2012 10:20:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qBIAK0OC006572 for ; Tue, 18 Dec 2012 10:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qBIAK0eu006571; Tue, 18 Dec 2012 10:20:00 GMT (envelope-from gnats) Date: Tue, 18 Dec 2012 10:20:00 GMT Message-Id: <201212181020.qBIAK0eu006571@freefall.freebsd.org> To: freebsd-jail@FreeBSD.org Cc: From: Mateusz Guzik Subject: Re: misc/174436: [jail] Jails with numbers as names don't work X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Mateusz Guzik List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 10:20:01 -0000 The following reply was made to PR kern/174436; it has been noted by GNATS. From: Mateusz Guzik To: Robert Schulze Cc: bug-followup@FreeBSD.org Subject: Re: misc/174436: [jail] Jails with numbers as names don't work Date: Tue, 18 Dec 2012 11:18:37 +0100 On Tue, Dec 18, 2012 at 10:48:18AM +0100, Robert Schulze wrote: > Hi, > > Am 17.12.2012 22:31, schrieb Mateusz Guzik: > > > >Can you send me your kernel or put somewhere for download? > > > >If not, provide output of the following: > ># addr2line -e /boot/kernel/kernel 0xffffffff804debff > ># addr2line -e /boot/kernel/kernel 0xffffffff804dbef6 > > # addr2line -e /boot/kernel/kernel 0xffffffff804debff > /usr/src/sys/kern/kern_jail.c:1848 > # addr2line -e /boot/kernel/kernel 0xffffffff804dbef6 > /usr/src/sys/kern/kern_jail.c:4537 > > >Also I don't think that '0' has any significance here. Can you change it > >to something else and try again? Can you try with different IP? > >Preferably 127.0.0.2 on lo0. > I was reading wrong version of rc.d script. Name is passed with -n switch. Looks like we can get to prison_deref before RACCT is initialized for given prison. Please test the following: diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 1dc43ab..7ca1d72 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -2604,7 +2604,8 @@ prison_deref(struct prison *pr, int flags) cpuset_rel(pr->pr_cpuset); osd_jail_exit(pr); #ifdef RACCT - prison_racct_detach(pr); + if (pr->pr_prison_racct != NULL) + prison_racct_detach(pr); #endif free(pr, M_PRISON); -- Mateusz Guzik From owner-freebsd-jail@FreeBSD.ORG Tue Dec 18 11:10:01 2012 Return-Path: Delivered-To: freebsd-jail@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 515B5CDA for ; Tue, 18 Dec 2012 11:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 34A9B8FC15 for ; Tue, 18 Dec 2012 11:10:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qBIBA1C0009345 for ; Tue, 18 Dec 2012 11:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qBIBA1ZB009344; Tue, 18 Dec 2012 11:10:01 GMT (envelope-from gnats) Date: Tue, 18 Dec 2012 11:10:01 GMT Message-Id: <201212181110.qBIBA1ZB009344@freefall.freebsd.org> To: freebsd-jail@FreeBSD.org Cc: From: Robert Schulze Subject: Re: misc/174436: [jail] Jails with numbers as names don't work X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Robert Schulze List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 11:10:01 -0000 The following reply was made to PR kern/174436; it has been noted by GNATS. From: Robert Schulze To: Mateusz Guzik Cc: bug-followup@FreeBSD.org Subject: Re: misc/174436: [jail] Jails with numbers as names don't work Date: Tue, 18 Dec 2012 12:01:43 +0100 Hi, Am 18.12.2012 11:18, schrieb Mateusz Guzik: > I was reading wrong version of rc.d script. Name is passed with -n switch. > > Looks like we can get to prison_deref before RACCT is initialized for > given prison. > > Please test the following: > diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c > index 1dc43ab..7ca1d72 100644 > --- a/sys/kern/kern_jail.c > +++ b/sys/kern/kern_jail.c > @@ -2604,7 +2604,8 @@ prison_deref(struct prison *pr, int flags) > cpuset_rel(pr->pr_cpuset); > osd_jail_exit(pr); > #ifdef RACCT > - prison_racct_detach(pr); > + if (pr->pr_prison_racct != NULL) > + prison_racct_detach(pr); > #endif > free(pr, M_PRISON); > this fixed the panic, but the jail can still not be started: # /etc/rc.d/jail onestart 0 Configuring jails:. Starting jails: cannot start jail "0": . with kind regards, Robert Schulze From owner-freebsd-jail@FreeBSD.ORG Tue Dec 18 11:10:02 2012 Return-Path: Delivered-To: freebsd-jail@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 54630CDD for ; Tue, 18 Dec 2012 11:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 3A15E8FC17 for ; Tue, 18 Dec 2012 11:10:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qBIBA2hn009353 for ; Tue, 18 Dec 2012 11:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qBIBA1nl009352; Tue, 18 Dec 2012 11:10:01 GMT (envelope-from gnats) Date: Tue, 18 Dec 2012 11:10:01 GMT Message-Id: <201212181110.qBIBA1nl009352@freefall.freebsd.org> To: freebsd-jail@FreeBSD.org Cc: From: Mateusz Guzik Subject: Re: misc/174436: [jail] Jails with numbers as names don't work X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Mateusz Guzik List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 11:10:02 -0000 The following reply was made to PR kern/174436; it has been noted by GNATS. From: Mateusz Guzik To: Robert Schulze Cc: bug-followup@FreeBSD.org Subject: Re: misc/174436: [jail] Jails with numbers as names don't work Date: Tue, 18 Dec 2012 12:08:30 +0100 On Tue, Dec 18, 2012 at 12:01:43PM +0100, Robert Schulze wrote: > Hi, > > Am 18.12.2012 11:18, schrieb Mateusz Guzik: > >I was reading wrong version of rc.d script. Name is passed with -n switch. > > > >Looks like we can get to prison_deref before RACCT is initialized for > >given prison. > > > >Please test the following: > >diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c > >index 1dc43ab..7ca1d72 100644 > >--- a/sys/kern/kern_jail.c > >+++ b/sys/kern/kern_jail.c > >@@ -2604,7 +2604,8 @@ prison_deref(struct prison *pr, int flags) > > cpuset_rel(pr->pr_cpuset); > > osd_jail_exit(pr); > > #ifdef RACCT > >- prison_racct_detach(pr); > >+ if (pr->pr_prison_racct != NULL) > >+ prison_racct_detach(pr); > > #endif > > free(pr, M_PRISON); > > > > this fixed the panic, but the jail can still not be started: > > # /etc/rc.d/jail onestart 0 > Configuring jails:. > Starting jails: cannot start jail "0": > . Forgot to add: '0' is explicitly forbidden. Underlying reason is that you already have jail 0 - your main system. The only problem here was that cleanup was incorrect. And possibly documentation should note that '0' is already taken. -- Mateusz Guzik