kernel panic caused by zfs/sa.c

2012-07-19 Thread Greg Bonett
Hello,

I'm experiencing a kernel panic that appears to be caused by zfs.

No errors are making it into /var/log/messages, but here is the error
message that appears on my screen after panic (transcribed):

panic solaris assert BSWAP_32(sa_hdr_phys->sa_magic) == SA_MAGIC,
file: 
/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c, 
line 1262

I can reproduce this by running "cd /usr/ports/www/webkit-ghtk2; make
clean"

I looked at line 1262 in sa.c and it's part of a bit of code that checks
if byte swapping is necessary. The code starting at line 1260:


if (IS_SA_BONUSTYPE(bonustype) && sa_hdr_phys->sa_magic != SA_MAGIC &&
sa_hdr_phys->sa_magic != 0) {
VERIFY(BSWAP_32(sa_hdr_phys->sa_magic) == SA_MAGIC);
sa_byteswap(hdl, buftype);
}

As far as I can tell, my source is up to date and this code is the same
as what is in 9-STABLE. 

I'm not sure what's causing the panic, does anyone have a suggestion?

Thanks for the help.

--Greg


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: kernel panic caused by zfs/sa.c

2012-07-19 Thread Olivier Smedts
2012/7/19 Greg Bonett :
> Hello,
>
> I'm experiencing a kernel panic that appears to be caused by zfs.
>
> No errors are making it into /var/log/messages, but here is the error
> message that appears on my screen after panic (transcribed):
>
> panic solaris assert BSWAP_32(sa_hdr_phys->sa_magic) == SA_MAGIC,
> file: 
> /src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c, 
> line 1262
>
> I can reproduce this by running "cd /usr/ports/www/webkit-ghtk2; make
> clean"

If that's some sort of filesystem corruption, and you use portsnap, do
you still have a panic after "portsnap extract www/webkit-gtk2 && cd
/usr/ports/www/webkit-gtk2 && make clean" ?

> I looked at line 1262 in sa.c and it's part of a bit of code that checks
> if byte swapping is necessary. The code starting at line 1260:
>
>
> if (IS_SA_BONUSTYPE(bonustype) && sa_hdr_phys->sa_magic != SA_MAGIC &&
> sa_hdr_phys->sa_magic != 0) {
> VERIFY(BSWAP_32(sa_hdr_phys->sa_magic) == SA_MAGIC);
> sa_byteswap(hdl, buftype);
> }
>
> As far as I can tell, my source is up to date and this code is the same
> as what is in 9-STABLE.
>
> I'm not sure what's causing the panic, does anyone have a suggestion?
>
> Thanks for the help.
>
> --Greg
>
>
> ___
> freebsd-stable@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"



-- 
Olivier Smedts _
ASCII ribbon campaign ( )
e-mail: oliv...@gid0.org- against HTML email & vCards  X
www: http://www.gid0.org- against proprietary attachments / \

  "Il y a seulement 10 sortes de gens dans le monde :
  ceux qui comprennent le binaire,
  et ceux qui ne le comprennent pas."
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: kernel panic caused by zfs/sa.c

2012-07-19 Thread Greg Bonett
> > I'm experiencing a kernel panic that appears to be caused by zfs.
> >
> > No errors are making it into /var/log/messages, but here is the
> > error message that appears on my screen after panic (transcribed):
> >
> > panic solaris assert BSWAP_32(sa_hdr_phys->sa_magic) == SA_MAGIC,
> > file: 
> > /src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c,
> > line 1262
> >
> > I can reproduce this by running "cd /usr/ports/www/webkit-ghtk2;
> > make clean"
> 
> If that's some sort of filesystem corruption, and you use portsnap, do
> you still have a panic after "portsnap extract www/webkit-gtk2 && cd
> /usr/ports/www/webkit-gtk2 && make clean" ?
> 

Thanks for the suggestions, but "portsnap extract www/webkit-gtk2"
causes a panic with the same error. Any other ideas?

Also, in case it's relevant - this zpool is comprised of geli devices.

Thanks.

> > I looked at line 1262 in sa.c and it's part of a bit of code that
> > checks if byte swapping is necessary. The code starting at line
> > 1260:
> >
> >
> > if (IS_SA_BONUSTYPE(bonustype) && sa_hdr_phys->sa_magic != SA_MAGIC
> > && sa_hdr_phys->sa_magic != 0) {
> > VERIFY(BSWAP_32(sa_hdr_phys->sa_magic) ==
> > SA_MAGIC); sa_byteswap(hdl, buftype);
> > }
> >
> > As far as I can tell, my source is up to date and this code is the
> > same as what is in 9-STABLE.
> >
> > I'm not sure what's causing the panic, does anyone have a
> > suggestion?
> >
> > Thanks for the help.
> >
> > --Greg
> >
> >


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: kernel panic caused by zfs/sa.c

2012-08-12 Thread Mikael Fridh
On Thu, Jul 19, 2012 at 11:36 PM, Olivier Smedts  wrote:
> 2012/7/19 Greg Bonett :
>> Hello,
>>
>> I'm experiencing a kernel panic that appears to be caused by zfs.
>>
>> No errors are making it into /var/log/messages, but here is the error
>> message that appears on my screen after panic (transcribed):
>>
>> panic solaris assert BSWAP_32(sa_hdr_phys->sa_magic) == SA_MAGIC,
>> file: 
>> /src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c, 
>> line 1262

Happening pretty much daily.
This was previously an old 8.2 patched with an early zpool v28.
Recently upgraded it to 9.0.

I guess next I will attempt recreating all filesystems... if it's as
you say -- a filesystem problem and not caused by hardware issues...


faction.local.int dumped core - see /var/crash/vmcore.9

Sat Aug 11 11:28:55 CEST 2012

FreeBSD faction.local.int 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #1:
Mon Jul 16 22:59:11 CEST 2012
r...@faction.local.int:/usr/obj/usr/src/sys/GENERIC  amd64

panic: solaris assert: BSWAP_32(sa_hdr_phys->sa_magic) == SA_MAGIC,
file: 
/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c,
line: 1262

GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...

Unread portion of the kernel message buffer:
panic: solaris assert: BSWAP_32(sa_hdr_phys->sa_magic) == SA_MAGIC,
file: 
/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c,
line: 1262
cpuid = 0
KDB: stack backtrace:
#0 0x808680fe at kdb_backtrace+0x5e
#1 0x80832cb7 at panic+0x187
#2 0x8141fb8e at sa_build_index+0x2ee
#3 0x8141fc65 at sa_handle_get_from_db+0xd5
#4 0x8144c8f1 at zfs_znode_sa_init+0xd1
#5 0x8144d93a at zfs_znode_alloc+0xba
#6 0x8144df5f at zfs_zget+0x2af
#7 0x81462f48 at zfs_dirent_lock+0x488
#8 0x814631d9 at zfs_dirlook+0x69
#9 0x8147346b at zfs_lookup+0x26b
#10 0x81473cc1 at zfs_freebsd_lookup+0x81
#11 0x808b2be3 at vfs_cache_lookup+0xf3
#12 0x80b7dbb0 at VOP_LOOKUP_APV+0x40
#13 0x808b9fa4 at lookup+0x464
#14 0x808bb056 at namei+0x4d6
#15 0x808cadf3 at kern_statat_vnhook+0xb3
#16 0x808cafb5 at kern_statat+0x15
#17 0x808cb07a at sys_lstat+0x2a
Uptime: 18h15m30s
Dumping 1739 out of 3306 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91%

Reading symbols from /boot/kernel/zfs.ko...Reading symbols from
/boot/kernel/zfs.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/zfs.ko
Reading symbols from /boot/kernel/opensolaris.ko...Reading symbols
from /boot/kernel/opensolaris.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/opensolaris.ko
Reading symbols from /boot/kernel/pf.ko...Reading symbols from
/boot/kernel/pf.ko.symbols...done.
done.
Loaded symbols for /boot/kernel/pf.ko
Reading symbols from /usr/local/modules/fuse.ko...done.
Loaded symbols for /usr/local/modules/fuse.ko
#0  doadump (textdump=Variable "textdump" is not available.
) at pcpu.h:224
224 pcpu.h: No such file or directory.
in pcpu.h
(kgdb) #0  doadump (textdump=Variable "textdump" is not available.
) at pcpu.h:224
#1  0x808327f5 in kern_reboot (howto=260)
at /usr/src/sys/kern/kern_shutdown.c:442
#2  0x80832ca1 in panic (fmt=Variable "fmt" is not available.
)
at /usr/src/sys/kern/kern_shutdown.c:607
#3  0x8141fb8e in sa_build_index (hdl=Variable "hdl" is not available.
)
at 
/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c:1262
#4  0x8141fc65 in sa_handle_get_from_db (os=0xfe0007619400,
db=0xfe000ef8fd20, userp=0xfe00b016d4b0, hdl_type=Variable
"hdl_type" is not available.
)
at 
/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c:1367
#5  0x8144c8f1 in zfs_znode_sa_init (zfsvfs=0xfe00074f6000,
zp=0xfe00b016d4b0, db=0xfe000ef8fd20, obj_type=DMU_OT_SA,
sa_hdl=0x0)
at 
/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c:601
#6  0x8144d93a in zfs_znode_alloc (zfsvfs=0xfe00074f6000,
db=0xfe000ef8fd20, blksz=Variable "blksz" is not available.
)
at 
/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c:683
#7  0x8144df5f in zfs_zget (zfsvfs=0xfe00074f6000,
obj_num=437071, zpp=0xff80fa343498)
at 
/usr/src/sys/modules/zfs/../../cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c:1247
#8  0x81462f48 in zfs_dirent_lock (dlpp=0xff80fa3434a0,
dzp=0xfe0039fa0960, name=0xff80fa343580 "CVS",
zpp=0xff80fa343498, flag=Variable "flag"