Re: (unionfs) panic: excl->share with r230341 and above

From: Daichi GOTO <daichi_at_freebsd.org>
Date: Sun, 8 Apr 2012 22:11:27 +0900
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.

On Fri, 6 Apr 2012 21:36:29 -0400 (EDT)
kwhite_at_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 _at_
> /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_at_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 _at_
> /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 _at_
> /usr/src/sys/modules/unionfs/../../fs/unionfs/union_vnops.c:1835
>         shared lockmgr ufs (ufs) r = 0 (0xc57cec08) locked _at_
> /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_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"


-- 
Daichi GOTO (daichi)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve

Received on Sun Apr 08 2012 - 11:11:29 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:25 UTC