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