FreeBSDDesktop / DEPRECATED-freebsd-base-graphics

Fork of FreeBSD's base repository to work on graphics-stack-related projects
Other
49 stars 13 forks source link

ZFS kernel panic after latest IFC #104

Closed nomadlogic closed 7 years ago

nomadlogic commented 7 years ago

after this latest commit: 727b6b09e8e148a6f9c3910292ed07ef8b6b52ad I'm having pretty reliable kernel panics which looks like they are related to ZFS. I'm running this machine under a TrueOS boot environment currently but have access to to two previous kernel panics.

here is the first one:

Unread portion of the kernel message buffer:
vt_kms_postswitch() at vt_kms_postswitch+0x48/frame 0xfffffe0233db4030
vt_window_switch() at vt_window_switch+0xdb/frame 0xfffffe0233db4070
vtterm_cngrab() at vtterm_cngrab+0x20/frame 0xfffffe0233db4090
cngrab() at cngrab+0x32/frame 0xfffffe0233db40b0
vpanic() at vpanic+0x106/frame 0xfffffe0233db4130
panic() at panic+0x43/frame 0xfffffe0233db4190
assfail() at assfail+0x1a/frame 0xfffffe0233db41a0
zfs_freebsd_write() at zfs_freebsd_write+0xb0e/frame 0xfffffe0233db43d0
VOP_WRITE_APV() at VOP_WRITE_APV+0x169/frame 0xfffffe0233db44e0
vn_write() at vn_write+0x215/frame 0xfffffe0233db4560
Dumping 3934 out of 8045 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91%
<snip>
#0  doadump (textdump=0) at pcpu.h:222
222     pcpu.h: No such file or directory.
        in pcpu.h
(kgdb) #0  doadump (textdump=0) at pcpu.h:222
#1  0xffffffff831ce719 in vt_kms_postswitch (arg=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/modules/drm/drm/../../../dev/drm/linux_fb.c:82
#2  0xffffffff808ee63b in vt_window_switch (vw=0xffffffff81744a70)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/dev/vt/vt_core.c:540
#3  0xffffffff808ec0a0 in vtterm_cngrab (tm=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/dev/vt/vt_core.c:1465
#4  0xffffffff80a092f2 in cngrab ()
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_cons.c:368
#5  0xffffffff80a639a6 in vpanic (
    fmt=0xffffffff823caec1 "solaris assert: %s, file: %s, line: %d", 
    ap=0xfffffe0233db4170)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_shutdown.c:745
#6  0xffffffff80a63aa3 in panic (fmt=0x0)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_shutdown.c:690
#7  0xffffffff823ca23a in assfail (a=<value optimized out>, 
    f=<value optimized out>, l=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c:81
#8  0xffffffff82123a4e in zfs_freebsd_write (ap=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c:430
#9  0xffffffff80ff2369 in VOP_WRITE_APV (vop=<value optimized out>, 
    a=<value optimized out>) at vnode_if.c:1000
#10 0xffffffff80b3bc35 in vn_write (fp=0xfffff8000adb1a00, 
    uio=0xfffffe0233db4800, active_cred=0x7f6bd, flags=<value optimized out>, 
    td=0x0) at vnode_if.h:413
#11 0xffffffff80b39792 in vn_io_fault1 ()
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/vfs_vnops.c:1060
#12 0xffffffff80b37ad4 in vn_io_fault (fp=<value optimized out>, 
    uio=<value optimized out>, active_cred=<value optimized out>, 
    flags=<value optimized out>, td=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/vfs_vnops.c:1165
#13 0xffffffff80ac8d94 in dofilewrite (td=0xfffff80217f65510, fd=17, 
    fp=0xfffff8000adb1a00, auio=0xfffffe0233db4800, 
    offset=<value optimized out>, flags=0) at file.h:312
#14 0xffffffff80ac8a38 in kern_writev (td=0xfffff80217f65510, fd=17, 
    auio=0xfffffe0233db4800)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/sys_generic.c:510
#15 0xffffffff80ac89c4 in sys_write (td=0x0, uap=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/sys_generic.c:423
#16 0xffffffff80edfd44 in amd64_syscall (td=0xfffff80217f65510, traced=0)
    at subr_syscall.c:135
#17 0xffffffff80ebf79b in Xfast_syscall ()
    at /usr/home/pwright/git/freebsd-base-graphics/sys/amd64/amd64/exception.S:396
#18 0x000000080340e33a in ?? ()
Previous frame inner to this frame (corrupt stack?)
Current language:  auto; currently minimal
(kgdb) 
nomadlogic commented 7 years ago

second panic - this is using the scfb xorg driver and no i915kms module is loaded. reason i'm posting this is we may want to re-sync from upstream:

Unread portion of the kernel message buffer:
panic: solaris assert: pp != NULL && !pp->valid, file: /usr/home/pwright/git/freebsd-base-graphics/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c, line: 430
cpuid = 7
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0233c840b0
vpanic() at vpanic+0x182/frame 0xfffffe0233c84130
panic() at panic+0x43/frame 0xfffffe0233c84190
assfail() at assfail+0x1a/frame 0xfffffe0233c841a0
zfs_freebsd_write() at zfs_freebsd_write+0xb0e/frame 0xfffffe0233c843d0
VOP_WRITE_APV() at VOP_WRITE_APV+0x169/frame 0xfffffe0233c844e0
vn_write() at vn_write+0x215/frame 0xfffffe0233c84560
vn_io_fault1() at vn_io_fault1+0x1d2/frame 0xfffffe0233c846c0
vn_io_fault() at vn_io_fault+0x194/frame 0xfffffe0233c84740
dofilewrite() at dofilewrite+0xa4/frame 0xfffffe0233c84790
kern_writev() at kern_writev+0x68/frame 0xfffffe0233c847e0
sys_write() at sys_write+0x84/frame 0xfffffe0233c84830
amd64_syscall() at amd64_syscall+0x314/frame 0xfffffe0233c849b0
Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe0233c849b0
--- syscall (4, FreeBSD ELF64, sys_write), rip = 0x80340e33a, rsp = 0x7fffdf9fad78, rbp = 0x7fffdf9fadb0 ---
KDB: enter: panic
<snip>
#1  0xffffffff80395c5b in db_dump (dummy=<value optimized out>, dummy2=false, 
    dummy3=0, dummy4=0x0)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/ddb/db_command.c:546
#2  0xffffffff80395a59 in db_command (cmd_table=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/ddb/db_command.c:453
#3  0xffffffff803957b4 in db_command_loop ()
    at /usr/home/pwright/git/freebsd-base-graphics/sys/ddb/db_command.c:506
#4  0xffffffff8039886f in db_trap (type=<value optimized out>, 
    code=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/ddb/db_main.c:248
#5  0xffffffff80aa5c53 in kdb_trap (type=<value optimized out>, 
    code=<value optimized out>, tf=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/subr_kdb.c:654
#6  0xffffffff80edecc4 in trap (frame=0xfffffe0233c83fe0)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/amd64/amd64/trap.c:537
#7  0xffffffff80ebf4b1 in calltrap ()
    at /usr/home/pwright/git/freebsd-base-graphics/sys/amd64/amd64/exception.S:236
#8  0xffffffff80aa52fb in kdb_enter (why=0xffffffff813c554e "panic", 
    msg=0x80 <Address 0x80 out of bounds>) at cpufunc.h:63
#9  0xffffffff80a63a3f in vpanic (fmt=<value optimized out>, 
    ap=0xfffffe0233c84170)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_shutdown.c:760
#10 0xffffffff80a63aa3 in panic (fmt=0xffffffff81a29c90 "\004")
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/kern_shutdown.c:690
#11 0xffffffff823ca23a in assfail (a=<value optimized out>, 
    f=<value optimized out>, l=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/cddl/compat/opensolaris/kern/opensolaris_cmn_err.c:81
#12 0xffffffff82123a4e in zfs_freebsd_write (ap=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c:430
#13 0xffffffff80ff2369 in VOP_WRITE_APV (vop=<value optimized out>, 
    a=<value optimized out>) at vnode_if.c:1000
#14 0xffffffff80b3bc35 in vn_write (fp=0xfffff8000ade9c30, 
    uio=0xfffffe0233c84800, active_cred=0x7f6bd, flags=<value optimized out>, 
    td=0x0) at vnode_if.h:413
#15 0xffffffff80b39792 in vn_io_fault1 ()
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/vfs_vnops.c:1060
#16 0xffffffff80b37ad4 in vn_io_fault (fp=<value optimized out>, 
    uio=<value optimized out>, active_cred=<value optimized out>, 
    flags=<value optimized out>, td=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/vfs_vnops.c:1165
#17 0xffffffff80ac8d94 in dofilewrite (td=0xfffff801b6e80a20, fd=17, 
    fp=0xfffff8000ade9c30, auio=0xfffffe0233c84800, 
    offset=<value optimized out>, flags=0) at file.h:312
#18 0xffffffff80ac8a38 in kern_writev (td=0xfffff801b6e80a20, fd=17, 
    auio=0xfffffe0233c84800)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/sys_generic.c:510
#19 0xffffffff80ac89c4 in sys_write (td=0xffffffff81a29c90, 
    uap=<value optimized out>)
    at /usr/home/pwright/git/freebsd-base-graphics/sys/kern/sys_generic.c:423
#20 0xffffffff80edfd44 in amd64_syscall (td=0xfffff801b6e80a20, traced=0)
    at subr_syscall.c:135
#21 0xffffffff80ebf79b in Xfast_syscall ()
    at /usr/home/pwright/git/freebsd-base-graphics/sys/amd64/amd64/exception.S:396
#22 0x000000080340e33a in ?? ()
Previous frame inner to this frame (corrupt stack?)
Current language:  auto; currently minimal
mattmacy commented 7 years ago

IFCed just now. Clearly not a drm-next bug though.

nomadlogic commented 7 years ago

Thanks - I'm building now and will test tomorrow. Agree - it's def related to an upstream bug. Cheers!

mattmacy commented 7 years ago

Just hit this on my VM :(

nomadlogic commented 7 years ago

This looks good as per the latest IFC.