NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/54314: -current (20190619) NPF load LOCKDEBUG panics LOCKDEBUG: Mutex error: assert_sleepable,70: spin lock held
>Number: 54314
>Category: kern
>Synopsis: LOCKDEBUG: Mutex error: assert_sleepable,70: spin lock held when loading NPF
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jun 20 13:40:00 +0000 2019
>Originator: Frank Kardel
>Release: NetBSD 8.99.46
>Organization:
>Environment:
System: NetBSD pip.kardel.name 8.99.46 NetBSD 8.99.46 (GENERIC) #1: Wed Jun 19 16:46:35 CEST 2019 kardel%pip.kardel.name@localhost:/src/NetBSD/cur/src/obj.amd64/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
When loading the npf configuration a LOCKDEBUG kernel panics
with
(gdb) bt
#0 0xffffffff80222c25 in cpu_reboot (howto=howto@entry=260, bootstr=bootstr@entry=0x0) at /src/NetBSD/cur/src/sys/arch/amd64/amd64/machdep.c:728
#1 0xffffffff80a24516 in vpanic (fmt=fmt@entry=0xffffffff81421310 "LOCKDEBUG: %s error: %s,%zu: %s", ap=ap@entry=0xffffc40495822a28)
at /src/NetBSD/cur/src/sys/kern/subr_prf.c:336
#2 0xffffffff80a245c7 in panic (fmt=fmt@entry=0xffffffff81421310 "LOCKDEBUG: %s error: %s,%zu: %s") at /src/NetBSD/cur/src/sys/kern/subr_prf.c:255
#3 0xffffffff80a19dca in lockdebug_abort1 (func=0xffffffff812a4920 <__func__.6294> "assert_sleepable", line=70, ld=0xffffc400846eee30, s=6,
msg=0xffffffff81421173 "spin lock held", dopanic=<optimized out>) at /src/NetBSD/cur/src/sys/kern/subr_lockdebug.c:811
#4 0xffffffff809cd151 in assert_sleepable () at /src/NetBSD/cur/src/sys/kern/kern_lock.c:70
#5 0xffffffff80a22450 in pool_cache_get_paddr (pc=0xffff861b7d9e9440, flags=flags@entry=1, pap=pap@entry=0x0) at /src/NetBSD/cur/src/sys/kern/subr_pool.c:2443
#6 0xffffffff80a16a22 in kmem_intr_alloc (requested_size=requested_size@entry=32, kmflags=kmflags@entry=1) at /src/NetBSD/cur/src/sys/kern/subr_kmem.c:268
#7 0xffffffff80a16c91 in kmem_intr_zalloc (size=size@entry=32, kmflags=kmflags@entry=1) at /src/NetBSD/cur/src/sys/kern/subr_kmem.c:289
#8 0xffffffff80a17024 in kmem_zalloc (size=size@entry=32, kmflags=kmflags@entry=1) at /src/NetBSD/cur/src/sys/kern/subr_kmem.c:375
#9 0xffffffff80799162 in table_ifaddr_insert (ent=0xffff861b6c76bfd8, alen=<optimized out>, t=0xffff861b6da0c6d0) at /src/NetBSD/cur/src/sys/net/npf/npf_tableset.c:516
#10 npf_table_insert (t=t@entry=0xffff861b6da0c6d0, alen=<optimized out>, addr=addr@entry=0xffffc40495822c60, mask=mask@entry=255 '\377')
at /src/NetBSD/cur/src/sys/net/npf/npf_tableset.c:593
#11 0xffffffff807a174e in npf_ifaddr_sync (npf=npf@entry=0xffff860c907685f8, ifp=ifp@entry=0xffff860c80699868) at /src/NetBSD/cur/src/sys/net/npf/npf_ifaddr.c:144
#12 0xffffffff807a1840 in npf_ifaddr_syncall (npf=npf@entry=0xffff860c907685f8) at /src/NetBSD/cur/src/sys/net/npf/npf_ifaddr.c:175
#13 0xffffffff80793074 in npf_config_load (npf=npf@entry=0xffff860c907685f8, rset=0xfffffffffffffc69, tset=0xffff860c907685f8, nset=0xffff860c80699868,
rpset=<optimized out>, conns=<optimized out>, flush=false) at /src/NetBSD/cur/src/sys/net/npf/npf_conf.c:186
#14 0xffffffff807942e5 in npfctl_load_nvlist (errdict=0xffff861b6dfa7090, npf_dict=0xffff861b6de65290, npf=0xffff860c907685f8)
at /src/NetBSD/cur/src/sys/net/npf/npf_ctl.c:565
#15 npfctl_load (npf=0xffff860c907685f8, cmd=<optimized out>, data=0xffffc40495822ee0) at /src/NetBSD/cur/src/sys/net/npf/npf_ctl.c:608
#16 0xffffffff80a96170 in VOP_IOCTL (vp=vp@entry=0xffff861b6e480430, command=command@entry=3222818406, data=data@entry=0xffffc40495822ee0, fflag=<optimized out>,
cred=<optimized out>) at /src/NetBSD/cur/src/sys/kern/vnode_if.c:610
#17 0xffffffff80a8cae3 in vn_ioctl (fp=0xffff861b6ca78600, com=3222818406, data=0xffffc40495822ee0) at /src/NetBSD/cur/src/sys/kern/vfs_vnops.c:772
#18 0xffffffff80a33168 in sys_ioctl (l=<optimized out>, uap=0xffffc40495823000, retval=<optimized out>) at /src/NetBSD/cur/src/sys/kern/sys_generic.c:671
#19 0xffffffff80251a8e in sy_call (rval=0xffffc40495822fb0, uap=0xffffc40495823000, l=0xffff861b6cd5d980, sy=0xffffffff81858230 <sysent+1296>)
at /src/NetBSD/cur/src/sys/sys/syscallvar.h:65
#20 sy_invoke (code=54, rval=0xffffc40495822fb0, uap=0xffffc40495823000, l=0xffff861b6cd5d980, sy=0xffffffff81858230 <sysent+1296>)
at /src/NetBSD/cur/src/sys/sys/syscallvar.h:94
#21 syscall (frame=0xffffc40495823000) at /src/NetBSD/cur/src/sys/arch/x86/x86/syscall.c:138
#22 0xffffffff802096dd in handle_syscall ()
(gdb) print panicstr
$1 = 0xffffffff819a9520 <scratchstr> "LOCKDEBUG: Mutex error: assert_sleepable,70: spin lock held"
>How-To-Repeat:
Use a -current LOCKDEBUG kernel.
Probably use an NPF config with "ext_if=wm0" "$ext_ifaddrs = ifaddrs($ext_if)"
start NPF
>Fix:
check locking with respect to allocation.
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index