Hi, On Debian kernel 2.6.25, recompiled to apply aufs patches and raise MAX_LOCKDEP_SUBCLASSES to 16UL, plus aufs 20080929, I got the following lockdep warning when using accessing aufs through NFS:
[ 215.484034] =============================================
[ 215.484166] [ INFO: possible recursive locking detected ]
[ 215.484233] 2.6.25-elric #10
[ 215.484293] ---------------------------------------------
[ 215.484360] nfsd/2633 is trying to acquire lock:
[ 215.484425] (&rw->rwsem){----}, at: [<ffffffff8841b33d>]
aufs_permission+0x1c3/0x8b5 [aufs]
[ 215.484674]
[ 215.484674] but task is already holding lock:
[ 215.484792] (&rw->rwsem){----}, at: [<ffffffff88414ec0>]
aufs_readdir+0x152/0x320 [aufs]
[ 215.485036]
[ 215.485036] other info that might help us debug this:
[ 215.485156] 6 locks held by nfsd/2633:
[ 215.485218] #0: (hash_sem){..--}, at: [<ffffffff88306801>]
nfsd+0x189/0x2b4 [nfsd]
[ 215.485489] #1: (&type->i_mutex_dir_key#8){--..}, at: [<ffffffff802ae104>]
vfs_readdir+0x51/0xa9
[ 215.485791] #2: (&rw->rwsem){----}, at: [<ffffffff88414ec0>]
aufs_readdir+0x152/0x320 [aufs]
[ 215.486070] #3: (&rw->rwsem#6){--..}, at: [<ffffffff884117bb>]
au_reval_and_lock_fdi+0xd9/0xbf2 [aufs]
[ 215.486390] #4: (&rw->rwsem#2){----}, at: [<ffffffff8840fa0d>]
di_write_lock+0x87/0xa4 [aufs]
[ 215.486507] #5: (&rw->rwsem#4){----}, at: [<ffffffff884117d4>]
au_reval_and_lock_fdi+0xf2/0xbf2 [aufs]
[ 215.486507]
[ 215.486507] stack backtrace:
[ 215.486507] Pid: 2633, comm: nfsd Not tainted 2.6.25-elric #10
[ 215.486507]
[ 215.486507] Call Trace:
[ 215.486507] [<ffffffff80253b7b>] __lock_acquire+0x8e0/0xc7a
[ 215.486507] [<ffffffff883fe88d>] :aufs:call_do_xino_fwrite+0x0/0x25
[ 215.486507] [<ffffffff80254362>] lock_acquire+0x88/0xb2
[ 215.486507] [<ffffffff8841b33d>] :aufs:aufs_permission+0x1c3/0x8b5
[ 215.486507] [<ffffffff8042f7a0>] down_read+0x32/0x3b
[ 215.486507] [<ffffffff8841b33d>] :aufs:aufs_permission+0x1c3/0x8b5
[ 215.486507] [<ffffffff802a1ee3>] do_sync_write+0x0/0x118
[ 215.486507] [<ffffffff802a8efd>] permission+0xb5/0x10a
[ 215.486507] [<ffffffff802aa9be>] lookup_one_len+0x2d/0x4e
[ 215.486507] [<ffffffff8831241d>] :nfsd:compose_entry_fh+0xc1/0x117
[ 215.486507] [<ffffffff88312669>] :nfsd:encode_entry+0x181/0x39b
[ 215.486507] [<ffffffff88416e92>] :aufs:fillvdir+0x0/0x5f1
[ 215.486507] [<ffffffff88133bd9>] :ext3:call_filldir+0x75/0xa0
[ 215.486507] [<ffffffff88133ed1>] :ext3:ext3_readdir+0x1dc/0x53f
[ 215.486507] [<ffffffff88416e92>] :aufs:fillvdir+0x0/0x5f1
[ 215.486507] [<ffffffff88312893>] :nfsd:nfs3svc_encode_entry_plus+0x10/0x13
[ 215.486507] [<ffffffff88417846>] :aufs:au_vdir_fill_de+0x3c3/0x47f
[ 215.486507] [<ffffffff88312883>] :nfsd:nfs3svc_encode_entry_plus+0x0/0x13
[ 215.486507] [<ffffffff88429515>] :aufs:au_nfsd_readdir_reg+0xc1/0xe4
[ 215.486507] [<ffffffff88414f7c>] :aufs:aufs_readdir+0x20e/0x320
[ 215.486507] [<ffffffff88312883>] :nfsd:nfs3svc_encode_entry_plus+0x0/0x13
[ 215.486507] [<ffffffff8042f622>] mutex_lock_killable_nested+0x2ec/0x2fd
[ 215.486507] [<ffffffff802a0a6c>] __dentry_open+0x114/0x1c0
[ 215.486507] [<ffffffff88312883>] :nfsd:nfs3svc_encode_entry_plus+0x0/0x13
[ 215.486507] [<ffffffff802ae12a>] vfs_readdir+0x77/0xa9
[ 215.486507] [<ffffffff88312883>] :nfsd:nfs3svc_encode_entry_plus+0x0/0x13
[ 215.486507] [<ffffffff8830a306>] :nfsd:nfsd_readdir+0x6d/0xc4
[ 215.486507] [<ffffffff883118ca>] :nfsd:nfsd3_proc_readdirplus+0xf7/0x1f5
[ 215.486507] [<ffffffff88306249>] :nfsd:nfsd_dispatch+0xde/0x1b6
[ 215.486507] [<ffffffff882b3854>] :sunrpc:svc_process+0x3eb/0x707
[ 215.486507] [<ffffffff88306678>] :nfsd:nfsd+0x0/0x2b4
[ 215.486507] [<ffffffff88306818>] :nfsd:nfsd+0x1a0/0x2b4
[ 215.486507] [<ffffffff8020d028>] child_rip+0xa/0x12
[ 215.486507] [<ffffffff8020c5bc>] restore_args+0x0/0x30
[ 215.486507] [<ffffffff88306678>] :nfsd:nfsd+0x0/0x2b4
[ 215.486507] [<ffffffff8020d01e>] child_rip+0x0/0x12
[ 215.486507]
No real deadlock actually occurred at that time.
Relevant parts of /proc/mounts on the NFS server:
/dev/sda10 /srv ext3 rw,errors=continue,data=ordered 0 0
/dev/ram14 /srv/.nfsroot64-scratch ext2 rw,errors=continue 0 0
none /srv/nfsroot64 aufs
rw,si=ac27ff8dd33502e8,xino=/srv/.nfsroot64-scratch/.aufs.xino,noplink,udba=inotify,br:/srv/.nfsroot64-scratch=rw:/srv/.nfsroot64-base=ro
0 0
Relevant parts of '# exportfs -v' on the server:
/srv/nfsroot64
10.4.0.0/16(rw,async,wdelay,crossmnt,no_root_squash,fsid=4242,anonuid=65534,anongid=65534)
Thanks,
Louis
--
Dr Louis Rilling Kerlabs
Skype: louis.rilling Batiment Germanium
Phone: (+33|0) 6 80 89 08 23 80 avenue des Buttes de Coesmes
http://www.kerlabs.com/ 35700 Rennes
signature.asc
Description: Digital signature
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
