From owner-freebsd-current@FreeBSD.ORG Tue Sep 15 12:49:50 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46CD6106568B for ; Tue, 15 Sep 2009 12:49:50 +0000 (UTC) (envelope-from mel.flynn+fbsd.current@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id E3A028FC13 for ; Tue, 15 Sep 2009 12:49:49 +0000 (UTC) Received: from smoochies.rachie.is-a-geek.net (mailhub.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id E85157E818; Tue, 15 Sep 2009 04:50:01 -0800 (AKDT) From: Mel Flynn To: freebsd-current@freebsd.org Date: Tue, 15 Sep 2009 14:49:47 +0200 User-Agent: KMail/1.12.1 (FreeBSD/8.0-BETA4; KDE/4.3.1; i386; ; ) References: <200909142024.49226.mel.flynn+fbsd.current@mailing.thruhere.net> <200909151403.50609.mel.flynn+fbsd.current@mailing.thruhere.net> <20090915142435.11915wlsxyt6d2g4@webmail.leidinger.net> In-Reply-To: <20090915142435.11915wlsxyt6d2g4@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200909151449.47116.mel.flynn+fbsd.current@mailing.thruhere.net> Cc: Alexander Leidinger Subject: Re: Panic in kern_access X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Sep 2009 12:49:50 -0000 On Tuesday 15 September 2009 14:24:35 Alexander Leidinger wrote: > Quoting Mel Flynn (from > > Tue, 15 Sep 2009 14:03:50 +0200): > > On Tuesday 15 September 2009 13:14:31 Kostik Belousov wrote: > >> On Mon, Sep 14, 2009 at 08:24:49PM +0200, Mel Flynn wrote: > >> > Hi, > >> > > >> > below some crash info. However, since kib@ made some fixes that seem > >> > to relate to this, I shall rebuild my kernel with new sources. > >> > >> No my fixes were related to the issue, AFAIR. > >> > >> > At the time I was building various ports in a jail and asleep, so no > >> > other contributing factors. > >> > > >> > panic: free: address 0xc62e0e00(0xc62e0000) has not been allocated. > >> > > >> > #0 doadump () at pcpu.h:246 > >> > 246 pcpu.h: No such file or directory. > >> > in pcpu.h > >> > (kgdb) #0 doadump () at pcpu.h:246 > >> > #1 0xc0642b57 in boot (howto=260) at > >> > /usr/src/sys/kern/kern_shutdown.c:416 #2 0xc0642e49 in panic > >> > (fmt=Variable "fmt" is not available. > >> > ) at /usr/src/sys/kern/kern_shutdown.c:579 > >> > #3 0xc062fcfe in free (addr=0x0, mtp=0xc091c330) > >> > at /usr/src/sys/kern/kern_malloc.c:444 > >> > #4 0xc063b018 in crfree (cr=0xc795ea80) at > >> > /usr/src/sys/kern/kern_prot.c:1840 > >> > >> I want to see the output of > >> p/x cr > >> and > >> p/x cr->cr_groups > >> from the frame 4. > > > > (kgdb) p/x cr > > $1 = 0xc795ea80 > > (kgdb) p/x cr->cr_groups > > $2 = 0xc62e0e00 > > (kgdb) p/x *cr->cr_groups > > $3 = 0x0 > > (kgdb) p/x *cr > > $4 = {cr_ref = 0x0, cr_uid = 0x0, cr_ruid = 0x0, cr_svuid = 0x0, > > cr_ngroups = 0x2, > > cr_rgid = 0x0, cr_svgid = 0x0, cr_uidinfo = 0xc5523380, > > cr_ruidinfo = 0xc5523380, > > cr_prison = 0xcc3a0800, cr_pspare = 0x0, cr_flags = 0x0, > > cr_pspare2 = {0x0, 0x0}, > > cr_label = 0x0, cr_audit = {ai_auid = 0xffffffff, ai_mask = > > {am_success = 0x0, > > am_failure = 0x0}, ai_termid = {at_port = 0x0, at_type = 0x4, > > at_addr = {0x0, 0x0, > > 0x0, 0x0}}, ai_asid = 0x0, ai_flags = 0x0}, cr_groups = > > 0xc62e0e00, cr_agroups = 0x10} > > > > > > Hmm, since this is in credentials, would it be relevant that I have > > patched kern_jail.c > > to allow /dev/io access? I don't touch credentials,though and X > > wasn't running in the jail > > I would be very surprised if this is related. > > > at the crash time. Just in case, patch is below. > > I have a similar patch: > http://www.leidinger.net/FreeBSD/current-patches/jail.diff > > This patch does not contain the necessary change to the DRI driver, > currently (HEAD) it uses a generic priv, not a dedicated one like in > my patch. When I tried the DRI stuff my system paniced, I hadn't time > yet to investigate further. Did you trace hald/X to see what's the > reason for the long startup time of X in a jail? No, sorry. Once I made the patch I started building the needed ports and ran into pmap issues, which seem to be fixed now with r196780. So, I never actually ran Xorg in the jail, as each time I started compiling, kernel would panic within a few hours. Ironically, I picked this up again this weekend, started compiling and then got this kern_access panic, which trashed quite a few things in the jail's file system. I will first consult a voodoo master to lift the curse on this project ;) -- Mel