NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/52709: Panic in filt_genfsread building lang/go package



>Number:         52709
>Category:       kern
>Synopsis:       Panic in filt_genfsread building lang/go package
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 09 15:35:00 +0000 2017
>Originator:     Andreas Gustafsson
>Release:        NetBSD 7.1 kernel, 7.0 userland
>Organization:

>Environment:
System: NetBSD
Architecture: x86_64
Machine: amd64
>Description:

I am trying to update pkgsrc on a NetBSD 7.0/amd64 system by running
"pkg_rolling-replace -v -u -k", but every time it reaches lang/go
pacakge (go-1.9.2), the kernel panics.  I upgraded the kernel to 7.1,
but that didn't help.

guido /var/crash # gdb /netbsd
(gdb) target kvm netbsd.2.core
0xffffffff806417b5 in cpu_reboot (howto=howto@entry=260, bootstr=bootstr@entry=0x0) at /bracket/prod/7.1/src/sys/arch/amd64/amd64/machdep.c:671
671                     dumpsys();
(gdb) where
#0  0xffffffff806417b5 in cpu_reboot (howto=howto@entry=260, bootstr=bootstr@entry=0x0) at /bracket/prod/7.1/src/sys/arch/amd64/amd64/machdep.c:671
#1  0xffffffff80869bf2 in vpanic (fmt=fmt@entry=0xffffffff80d1be42 "trap", ap=ap@entry=0xfffffe8158f0e9e0) at /bracket/prod/7.1/src/sys/kern/subr_prf.c:340
#2  0xffffffff80869cad in panic (fmt=fmt@entry=0xffffffff80d1be42 "trap") at /bracket/prod/7.1/src/sys/kern/subr_prf.c:256
#3  0xffffffff808acf86 in trap (frame=0xfffffe8158f0eb00) at /bracket/prod/7.1/src/sys/arch/amd64/amd64/trap.c:298
#4  0xffffffff80100f46 in alltraps ()
#5  0xffffffff805d1bcd in mutex_oncpu (owner=owner@entry=18446744073709551600) at /bracket/prod/7.1/src/sys/kern/kern_mutex.c:395
#6  0xffffffff805d1cea in mutex_oncpu (owner=18446744073709551600) at /bracket/prod/7.1/src/sys/kern/kern_mutex.c:518
#7  mutex_vector_enter (mtx=0xfffffe8bafbf73c0) at /bracket/prod/7.1/src/sys/kern/kern_mutex.c:527
#8  0xffffffff80360901 in filt_genfsread (kn=0xfffffe8bc2644f00, hint=<optimized out>) at /bracket/prod/7.1/src/sys/miscfs/genfs/genfs_vnops.c:538
#9  0xffffffff805c34f8 in kqueue_scan (kevcnt=8, keops=0xffffffff80be3720 <kevent_native_ops>, keops=0xffffffff80be3720 <kevent_native_ops>, kevbuf=0xfffffe8158f0ed18, retval=0xfffffe8158f0eeb8, tsp=0x0, ulistp=0xc420293438, maxevents=64, 
    fp=<optimized out>) at /bracket/prod/7.1/src/sys/kern/kern_event.c:1233
#10 kevent1 (retval=0xfffffe8158f0eeb8, fd=4, changelist=<optimized out>, nchanges=<optimized out>, eventlist=0xc420293438, nevents=64, timeout=0x0, keops=keops@entry=0xffffffff80be3720 <kevent_native_ops>)
    at /bracket/prod/7.1/src/sys/kern/kern_event.c:896
#11 0xffffffff805c3670 in sys___kevent50 (l=<optimized out>, uap=<optimized out>, retval=<optimized out>) at /bracket/prod/7.1/src/sys/kern/kern_event.c:817
#12 0xffffffff80884c2a in sy_call (rval=0xfffffe8158f0eeb8, uap=0xfffffe8158f0ef00, l=0xfffffe8bbaac51a0, sy=0xffffffff810093b0 <sysent+6960>) at /bracket/prod/7.1/src/sys/sys/syscallvar.h:61
#13 sy_invoke (code=435, rval=0xfffffe8158f0eeb8, uap=0xfffffe8158f0ef00, l=0xfffffe8bbaac51a0, sy=0xffffffff810093b0 <sysent+6960>) at /bracket/prod/7.1/src/sys/sys/syscallvar.h:85
#14 syscall (frame=0xfffffe8158f0ef00) at /bracket/prod/7.1/src/sys/arch/x86/x86/syscall.c:156
#15 0xffffffff80100691 in Xsyscall ()
(gdb) frame 5
#5  0xffffffff805d1bcd in mutex_oncpu (owner=owner@entry=18446744073709551600) at /bracket/prod/7.1/src/sys/kern/kern_mutex.c:395
395             l = (lwp_t *)MUTEX_OWNER(owner);
(gdb) print /x owner
$2 = 0xfffffffffffffff0
538                     mutex_enter(vp->v_interlock);
(gdb) frame 8
#8  0xffffffff80360901 in filt_genfsread (kn=0xfffffe8bc2644f00, hint=<optimized out>) at /bracket/prod/7.1/src/sys/miscfs/genfs/genfs_vnops.c:538
(gdb) print *vp
$4 = {v_uobj = {vmobjlock = 0xfffffe8bafbf73c0, pgops = 0xffffffff80c67620 <uvm_vnodeops>, memq = {tqh_first = 0x0, tqh_last = 0xfffffe8bdaa3e5e0}, uo_npages = 0, uo_refs = 0, rb_tree = {rbt_root = 0x0, rbt_ops = 0xffffffff80c67500 <uvm_page_tree_ops>, 
      rbt_minmax = {0x0, 0x0}}, uo_ubc = {lh_first = 0x0}}, v_cv = {cv_opaque = {0x0, 0xfffffe8bdaa3e620, 0xffffffff80d078da}}, v_size = 0, v_writesize = 0, v_iflag = 1572864, v_vflag = 48, v_uflag = 0, v_numoutput = 0, v_writecount = 0, v_holdcnt = 0, 
  v_synclist_slot = 0, v_mount = 0x0, v_op = 0xfffffe8c166d6e00, v_freelist = {tqe_next = 0xfffffe815870b260, tqe_prev = 0xfffffe8bc8e0b700}, v_freelisthd = 0x0, v_mntvnodes = {tqe_next = 0x0, tqe_prev = 0xfffffe8158071310}, v_cleanblkhd = {
    lh_first = 0x0}, v_dirtyblkhd = {lh_first = 0x0}, v_synclist = {tqe_next = 0x0, tqe_prev = 0x0}, v_dnclist = {lh_first = 0x0}, v_nclist = {lh_first = 0x0}, v_un = {vu_mountedhere = 0x0, vu_socket = 0x0, vu_specnode = 0x0, vu_fifoinfo = 0x0, 
    vu_ractx = 0x0}, v_type = VDIR, v_tag = VT_NON, v_lock = {rw_owner = 0}, v_data = 0x0, v_klist = {slh_first = 0x0}}
(gdb) print /x *vp->v_uobj.vmobjlock
$8 = {u = {mtxa_owner = 0xfffffffffffffff0}}

See also https://github.com/golang/go/issues/20836 and PR 44402.

>How-To-Repeat:

Perhaps try to build lang/go from pkgsrc on a NetBSD 7/amd64 system?

>Fix:



Home | Main Index | Thread Index | Old Index