From owner-freebsd-bugs@freebsd.org Wed Jun 7 16:24:09 2017 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1D02C78E4B for ; Wed, 7 Jun 2017 16:24:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D01FB79D20 for ; Wed, 7 Jun 2017 16:24:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v57GO9qL073973 for ; Wed, 7 Jun 2017 16:24:09 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 219846] [panic] mutex nm_kn_lock not owned, netmap LOR Date: Wed, 07 Jun 2017 16:24:09 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: bugzilla.freebsd@omnilan.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jun 2017 16:24:10 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219846 Bug ID: 219846 Summary: [panic] mutex nm_kn_lock not owned, netmap LOR Product: Base System Version: 11.0-STABLE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: bugzilla.freebsd@omnilan.de The following panic happens on stable/11, r319654, after creating a vale(4) port as byhve(8)-virtio backend, but only if kernel was compiled with WITNE= SS and INVARIANTS options: panic: mutex nm_kn_lock not owned at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_event.c:2169 cpuid =3D 6 KDB: stack backtrace: #0 0xffffffff805bf327 at kdb_backtrace+0x67 #1 0xffffffff8057f266 at vpanic+0x186 #2 0xffffffff8057f2e3 at panic+0x43 #3 0xffffffff805603d4 at __mtx_assert+0xb4 #4 0xffffffff805395f0 at knlist_add+0x20 #5 0xffffffff80418d80 at netmap_kqfilter+0x110 #6 0xffffffff8045a667 at devfs_kqfilter_f+0x77 #7 0xffffffff8053787b at kqueue_register+0x78b #8 0xffffffff805382a2 at kqueue_kevent+0x92 #9 0xffffffff805381a6 at kern_kevent_fp+0x96 #10 0xffffffff805380bf at kern_kevent+0x9f #11 0xffffffff80537ec8 at sys_kevent+0x138 #12 0xffffffff80875b7a at amd64_syscall+0x57a #13 0xffffffff8085965b at Xfast_syscall+0xfb (kgdb) bt #0 doadump (textdump=3D) at pcpu.h:222 #1 0xffffffff8057ece0 in kern_reboot (howto=3D260) at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_shutdown.c:366 #2 0xffffffff8057f2a0 in vpanic (fmt=3D, ap=3D) at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_shutdown.c= :759 #3 0xffffffff8057f2e3 in panic (fmt=3D) at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_shutdown.c:690 #4 0xffffffff805603d4 in __mtx_assert (c=3D0x0, what=3D0, file=3D0x0, line= =3D0) at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_mutex.c:1000 #5 0xffffffff805395f0 in knlist_add (knl=3D0xfffffe0008a6c448, kn=3D0xfffff801be72ee80, islocked=3D1) at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_event.c:20= 89 #6 0xffffffff80418d80 in netmap_kqfilter (dev=3D, kn=3D0xfffff801be72ee80) at /usr/local/share/deploy-tools/RELENG_11/src/sys/dev/netmap/netmap_freebsd.c= :781 #7 0xffffffff8045a667 in devfs_kqfilter_f (fp=3D0xfffff8002441d3c0, kn=3D0xfffff801be72ee80) at /usr/local/share/deploy-tools/RELENG_11/src/sys/fs/devfs/devfs_vnops.c:837 #8 0xffffffff8053787b in kqueue_register (kq=3D0xfffff8001a65ba00, kev=3D0xfffffe0446ceb650, td=3D0xfffff8003d11e560, waitok=3D) at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_event.c:13= 34 #9 0xffffffff805382a2 in kqueue_kevent (kq=3D0xfffff8001a65ba00, td=3D0xfffff8003d11e560, nchanges=3D4, nevents=3D, k_ops=3D0xfffffe0446ceb8a0,=20 timeout=3D) at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_event.c:1019 #10 0xffffffff805381a6 in kern_kevent_fp (td=3D0xfffff8003d11e560, fp=3D, nchanges=3D4, nevents=3D,=20 k_ops=3D, timeout=3D) at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_event.c:1050 #11 0xffffffff805380bf in kern_kevent (td=3D0xfffff8003d11e560, fd=3D7, nch= anges=3D4, nevents=3D0, k_ops=3D0xfffffe0446ceb8a0, timeout=3D0x0) at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_event.c:993 #12 0xffffffff80537ec8 in sys_kevent (td=3D0xfffff8003d11e560, uap=3D0xfffffe0446ceba30) at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_event.c:925 #13 0xffffffff80875b7a in amd64_syscall (td=3D0xfffff8003d11e560, traced=3D= 0) at subr_syscall.c:135 #14 0xffffffff8085965b in Xfast_syscall () at /usr/local/share/deploy-tools/RELENG_11/src/sys/amd64/amd64/exception.S:396 #15 0x000000080122713a in ?? () Previous frame inner to this frame (corrupt stack?) Without WITNESS and INVARIANTS, the bhyve guest gets booted and runs fine u= p to some point. Reported via ML also for HEAD netmap code merged to stable, but this trace = is from stable/11 netmap code! (https://lists.freebsd.org/pipermail/freebsd-net/2017-June/048124.html) -harry --=20 You are receiving this mail because: You are the assignee for the bug.=