Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jun 2009 12:09:45 -0400
From:      Wesley Shields <wxs@FreeBSD.org>
To:        Dmitry Marakasov <amdmi3@amdmi3.ru>, bz@FreeBSD.org, jamie@FreeBSD.org
Cc:        Michael Moll <kvedulv@kvedulv.de>, freebsd-current@freebsd.org
Subject:   Re: Kernel panic when accessing ZFS-Filesystem via NFS
Message-ID:  <20090603160945.GC21014@atarininja.org>
In-Reply-To: <20090603152810.GA21014@atarininja.org>
References:  <20090601182012.GA21543@darkthrone.kvedulv.de> <20090603121307.GA15659@hades.panopticon> <20090603152810.GA21014@atarininja.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 03, 2009 at 11:28:10AM -0400, Wesley Shields wrote:
> On Wed, Jun 03, 2009 at 04:13:07PM +0400, Dmitry Marakasov wrote:
> > * Michael Moll (kvedulv@kvedulv.de) wrote:
> > 
> > Very same panic here.
> > 
> > Also, for some reason writing dumps to disk don't work, it either
> > stops after writing some megabytes in `Dumping 1554 MB: ...' (maximum
> > value it managed to write is ~800MB), or just freezes with
> > buffer-related message (may try to reproduct panic to get it).
> 
> I'm seeing the same thing but I got a useful vmcore and crash.txt out of
> it. I can put them online if anyone wants to see them.

[ The panic message and backtrace from ddb is at
http://people.freebsd.org/~wxs/crash.txt ]

(kgdb) frame 12
#12 0xffffffff80572e7f in prison_priv_check (cred=0xffffff00168f5900,
priv=334)
    at /usr/home/wxs/freebsd/src/head/sys/kern/kern_jail.c:3315
3315            switch (priv) {
(kgdb) p priv
$6 = 334

334 is PRIV_VFS_MOUNT_OWNER

sys/kern/kern_jail.c:
3451         case PRIV_VFS_MOUNT_OWNER:
3452                 if (cred->cr_prison->pr_allow & PR_ALLOW_MOUNT)
3453                         return (0);
3454                 else
3455                         return (EPERM);

(kgdb) p/x *cred
$7 = {cr_ref = 0x1, cr_uid = 0x0, cr_ruid = 0x0, cr_svuid = 0x0, 
  cr_ngroups = 0x1, cr_groups = {0x0 <repeats 16 times>}, cr_rgid = 0x0, 
  cr_svgid = 0x0, cr_uidinfo = 0x0, cr_ruidinfo = 0x0, cr_prison = 0x0, 
  cr_vimage = 0x0, cr_flags = 0x0, cr_pspare = {0x0, 0x0}, cr_label =
0x0, 
  cr_audit = {ai_auid = 0x0, ai_mask = {am_success = 0x0, am_failure =
0x0}, 
    ai_termid = {at_port = 0x0, at_type = 0x0, at_addr = {0x0, 0x0, 0x0, 
        0x0}}, ai_asid = 0x0, ai_flags = 0x0}}
(kgdb) 

cred->cr_prison is null? It is my understanding that when not jailed
cred->cr_prison should be &prison0 with the new hierarchical jails. The
fact that it is null is causing prison_priv_check to enter the switch
statement, leading to the crash.

I'm not sure why cred->cr_prison is null in this case.

-- WXS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090603160945.GC21014>