From owner-freebsd-current@FreeBSD.ORG Mon Apr 9 14:31:47 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F779106564A; Mon, 9 Apr 2012 14:31:47 +0000 (UTC) (envelope-from kwhite@site.uottawa.ca) Received: from courriel.site.uottawa.ca (eecsmail.engineering.uottawa.ca [137.122.24.224]) by mx1.freebsd.org (Postfix) with ESMTP id 164418FC17; Mon, 9 Apr 2012 14:31:46 +0000 (UTC) Received: from courriel.site.uottawa.ca (localhost [127.0.0.1]) by courriel.site.uottawa.ca (8.14.4/8.14.4) with ESMTP id q39EVdme023402; Mon, 9 Apr 2012 10:31:39 -0400 (EDT) (envelope-from kwhite@site.uottawa.ca) Received: from 74.51.53.177 (SquirrelMail authenticated user kwhite) by courriel.site.uottawa.ca with HTTP; Mon, 9 Apr 2012 10:31:39 -0400 (EDT) Message-ID: <14043.74.51.53.177.1333981899.squirrel@courriel.site.uottawa.ca> In-Reply-To: <20120408221127.969e8e71.daichi@freebsd.org> References: <55056.74.51.53.177.1333762589.squirrel@courriel.site.uottawa.ca> <20120408221127.969e8e71.daichi@freebsd.org> Date: Mon, 9 Apr 2012 10:31:39 -0400 (EDT) From: kwhite@site.uottawa.ca To: "Daichi GOTO" User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Mailman-Approved-At: Mon, 09 Apr 2012 16:24:29 +0000 Cc: kwhite@site.uottawa.ca, freebsd-current@freebsd.org Subject: Re: (unionfs) panic: excl->share with r230341 and above X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Apr 2012 14:31:47 -0000 > Hi > > Please try an attached patch that improves handlings of fs locks. > I think that this patch can resolve this issue. If that works well, > I'm going to refine and commit it to head. > Thanks! I tried your patch but get the same panic: FreeBSD 10.0-CURRENT #6 r233856M: Mon Apr 9 09:47:42 EDT 2012 ... exclusive lock of (lockmgr) ufs @ /usr/src/sys/modules/unionfs/../../fs/unionfs/union_vnops.c:1897 while share locked from /usr/src/sys/modules/unionfs/../../fs/unionfs/ union_vnops.c:1897 panic: excl->share cpuid = 0 KDB: enter: panic [ thread pid 38 tid 100050 ] Stopped at kdb_enter+0x3b: movl $0,kdb_why db> show all locks Process 38 (ls) thread 0xc56dd2e0 (100050) exclusive sleep mutex vnode interlock (vnode interlock) r = 0 (0xc5797d38) locked @ /usr/src/sys/modules/unionfs/../../fs/unionfs/union_vnops.c:1889 shared lockmgr ufs (ufs) r = 0 (0xc5797d18) locked @ /usr/src/sys/modules/unionfs/../../fs/unionfs/union_vnops.c:1897 db> > On Fri, 6 Apr 2012 21:36:29 -0400 (EDT) > kwhite@site.uottawa.ca wrote: >> Starting with r230341, I get the following panic when trying to run >> an executable on a unionfs filesystem: >> >> exclusive lock of (lockmgr) ufs @ >> /usr/src/sys/modules/unionfs/../../fs/unionfs/union_vnops.c:1843 >> while share locked from >> /usr/src/sys/modules/unionfs/../../fs/unionfs/union_vnops.c:1843 >> panic: excl->share >> cpuid = 0 >> KDB: enter: panic >> >> Narrowing down with a binary search: r230340 (no panic), r230341 >> (panic). >> >> How to repeat: >> # uuname -a >> FreeBSD 10.0-CURRENT FreeBSD 10.0-CURRENT #5 r233946M: Fri Apr >> 6 >> 21:09:32 EDT 2012 kwhite@demo:/usr/src/obj/usr/src/sys/GENERIC >> i386 >> >> # mkdir /tmp/local >> # mount -t unionfs -o noatime /tmp/local /usr/local >> # cp /bin/ls /usr/local/bin/ls >> # /usr/local/bin/ls >> .... >> exclusive lock of (lockmgr) ufs @ >> /usr/src/sys/modules/unionfs/../../fs/unionfs/union_vnops.c:1843 >> while share locked from >> /usr/src/sys/modules/unionfs/../../fs/unionfs/union_vnops.c:1843 >> panic: excl->share >> cpuid = 0 >> KDB: enter: panic >> [ thread pid 68 tid 100054 ] >> Stopped at kdb_enter+0x3b: movl $0,kdb_why >> db> show all locks >> Process 68 (ls) thread 0xc5780000 (100054) >> exclusive sleep mutex vnode interlock (vnode interlock) r = 0 >> (0xc57cec28) locked @ >> /usr/src/sys/modules/unionfs/../../fs/unionfs/union_vnops.c:1835 >> shared lockmgr ufs (ufs) r = 0 (0xc57cec08) locked @ >> /usr/src/sys/modules/unionfs/../../fs/unionfs/union_vnops.c:1843 >> db> >> >> Workaround? >> After reverting the change from LK_EXCLUSIVE to LK_SHARED >> in sys/kern/kern_exec.c, executables on union filesystems no >> longer cause a panic. >> >> ...keith >> >> >> _______________________________________________ >> freebsd-current@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to >> "freebsd-current-unsubscribe@freebsd.org" > > > -- > Daichi GOTO (daichi) > FreeBSD Committer, http://www.FreeBSD.org The Power To Serve >