From owner-svn-src-all@freebsd.org Tue Jun 21 18:50:26 2016 Return-Path: Delivered-To: svn-src-all@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 B880FAC5382; Tue, 21 Jun 2016 18:50:26 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 819CA1C7F; Tue, 21 Jun 2016 18:50:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id VAA11991; Tue, 21 Jun 2016 21:50:17 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1bFQkb-000IMc-B3; Tue, 21 Jun 2016 21:50:17 +0300 Subject: Re: svn commit: r301929 - head/sys/kern To: Konstantin Belousov , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201606151556.u5FFu3pt032257@repo.freebsd.org> From: Andriy Gapon Message-ID: <5200834c-c3d4-6331-eecb-155e6453ba96@FreeBSD.org> Date: Tue, 21 Jun 2016 21:49:24 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <201606151556.u5FFu3pt032257@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2016 18:50:26 -0000 On 15/06/2016 18:56, Konstantin Belousov wrote: > Author: kib > Date: Wed Jun 15 15:56:03 2016 > New Revision: 301929 > URL: https://svnweb.freebsd.org/changeset/base/301929 > > Log: > Do not assume that we own the use reference on the covered vnode until > we set MNTK_UNMOUNT flag on the mp. Otherwise parallel unmount which > wins race with us could dereference the covered vnode, and we are > left with the locked freed memory. > > Reported and tested by: pho > Sponsored by: The FreeBSD Foundation > Approved by: re (gjb) > MFC after: 1 week Kostik, does this change fix (or is likely to fix) the following panic? Thanks! VNASSERT failed 0xfffff8000c926588: tag none, type VBAD usecount 0, writecount 0, refcount 0 mountedhere 0 VNASSERT failed 0xfffff8000e95f000: tag none, type VBAD usecount 0, writecount 0, refcount 0 mountedhere 0 flags () lock type zfs: EXCL by thread 0xfffff80020921a00 (pid 2017, zfs, tid 100794) panic: No vop_unlock(0xfffff8000e95f000, 0xfffffe004df8a980) cpuid = 2 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe004df8a820 vpanic() at vpanic+0x182/frame 0xfffffe004df8a8a0 kassert_panic() at kassert_panic+0x126/frame 0xfffffe004df8a910 VOP_UNLOCK_APV() at VOP_UNLOCK_APV+0x94/frame 0xfffffe004df8a940 dounmount() at dounmount+0x138/frame 0xfffffe004df8a9c0 sys_unmount() at sys_unmount+0x35d/frame 0xfffffe004df8aae0 amd64_syscall() at amd64_syscall+0x2db/frame 0xfffffe004df8abf0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe004df8abf0 --- syscall (22, FreeBSD ELF64, sys_unmount), rip = 0x8012f4e4a, rsp = 0x7fffffffc298, rbp = 0x7fffffffc300 --- KDB: enter: panic [ thread pid 2017 tid 100794 ] Stopped at kdb_enter+0x3b: movq $0,kdb_why P.S. Not sure why two VNASSERTs are reported here, but this is copied verbatim from a console. > Modified: > head/sys/kern/vfs_mount.c -- Andriy Gapon