Re: Panic in kern_access

From: Mel Flynn <mel.flynn+fbsd.current_at_mailing.thruhere.net>
Date: Tue, 15 Sep 2009 14:49:47 +0200
On Tuesday 15 September 2009 14:24:35 Alexander Leidinger wrote:
> Quoting Mel Flynn <mel.flynn+fbsd.current_at_mailing.thruhere.net> (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_at_ 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
Received on Tue Sep 15 2009 - 10:49:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:55 UTC