From owner-freebsd-bugs@freebsd.org Sat Jun 17 08:27:55 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 CC929BF4D55 for ; Sat, 17 Jun 2017 08:27:55 +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 BA93384663 for ; Sat, 17 Jun 2017 08:27:55 +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 v5H8Rtvi096270 for ; Sat, 17 Jun 2017 08:27:55 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 219846] [panic] [kevent] mutex nm_kn_lock not owned, netmap with INVARIANTS+WITNESS Date: Sat, 17 Jun 2017 08:27:56 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed 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: Message-ID: In-Reply-To: References: 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: Sat, 17 Jun 2017 08:27:55 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219846 --- Comment #2 from Harald Schmalzbauer --- Like kib@ suggested in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206053, I already tried= to replacing 1 with 0 in the sys/dev/netmap/netmap_freebsd.c:netmap_kqfilter()= at the call to knlist_add(), which does indeed prevent the initial panic (when= the guest boots), but ends up in another panic short afterwards: (quoting my github report) panic: mutex nm_kn_lock owned at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_event.c:2176 cpuid =3D 6 KDB: stack backtrace: #0 0xffffffff805cb1a7 at kdb_backtrace+0x67 #1 0xffffffff8058b0e6 at vpanic+0x186 #2 0xffffffff8058b163 at panic+0x43 #3 0xffffffff8056c216 at __mtx_assert+0xc6 now: #4 0xffffffff80545219 at knote+0x39 #5 0xffffffff8041ebc7 at nm_os_selwakeup+0x87 #6 0xffffffff8041c94d at netmap_notify+0x1d #7 0xffffffff8041c701 at netmap_poll+0x821 #8 0xffffffff8041f63c at netmap_knrw+0x6c #9 0xffffffff805443d7 at kqueue_kevent+0x397 #10 0xffffffff80543fd6 at kern_kevent_fp+0x96 #11 0xffffffff80543eef at kern_kevent+0x9f #12 0xffffffff80543cf8 at sys_kevent+0x138 #13 0xffffffff80881b5a at amd64_syscall+0x57a #14 0xffffffff8086563b at Xfast_syscall+0xfb #0 doadump (textdump=3D) at pcpu.h:222 #1 0xffffffff8058ab60 in kern_reboot (howto=3D260) at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_shutdown.c:366 #2 0xffffffff8058b120 in vpanic (fmt=3D, ap=3D) at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_shutdown.c:759 #3 0xffffffff8058b163 in panic (fmt=3D) at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_shutdown.c:690 #4 0xffffffff8056c216 in __mtx_assert (c=3D, what=3D, file=3D, line=3D) at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_mutex.c:1013 #5 0xffffffff80545219 in knote (list=3D, hint=3D256, lockflags=3D0) at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_event.c:2034 #6 0xffffffff8041ebc7 in nm_os_selwakeup (si=3D0xfffffe00088b94c0) at /usr/local/share/deploy-tools/RELENG_11/src/sys/dev/netmap/netmap_freebsd.c= :1259 #7 0xffffffff8041c94d in netmap_notify (kring=3D, flags=3D) at /usr/local/share/deploy-tools/RELENG_11/src/sys/dev/netmap/netmap.c:2777 #8 0xffffffff8041c701 in netmap_poll (priv=3D, events=3D, sr=3D0x0) at /usr/local/share/deploy-tools/RELENG_11/src/sys/dev/netmap/netmap.c:2735 #9 0xffffffff8041f63c in netmap_knrw (kn=3D, hint=3D, events=3D1) at /usr/local/share/deploy-tools/RELENG_11/src/sys/dev/netmap/netmap_freebsd.c= :1313 #10 0xffffffff805443d7 in kqueue_kevent (kq=3D0xfffff8001aa08600, td=3D0xfffff80141470560, nchanges=3D, nevents=3D, k_ops=3D0xfffffe045b5028a0, timeout=3D) at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_event.c:1700 #11 0xffffffff80543fd6 in kern_kevent_fp (td=3D0xfffff80141470560, fp=3D, nchanges=3D0, nevents=3D, k_ops=3D, timeout=3D) at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_event.c:1050 #12 0xffffffff80543eef in kern_kevent (td=3D0xfffff80141470560, fd=3D6, nchanges=3D0, nevents=3D64, k_ops=3D0xfffffe045b5028a0, timeout=3D0x0) at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_event.c:993 #13 0xffffffff80543cf8 in sys_kevent (td=3D0xfffff80141470560, uap=3D0xfffffe045b502a30) at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_event.c:925 #14 0xffffffff80881b5a in amd64_syscall (td=3D0xfffff80141470560, traced=3D0) at subr_syscall.c:135 #15 0xffffffff8086563b in Xfast_syscall () at /usr/local/share/deploy-tools/RELENG_11/src/sys/amd64/amd64/exception.S:396 #16 0x000000080122813a in ?? () --=20 You are receiving this mail because: You are the assignee for the bug.=