Skip to contentSkip to conversation

NLM mutex deadlock in 2.6.22.9

DISCUSSION Frank van Maarseveen 2 participants 2 messages Oct 2, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

nlmsvc_lock() starts out with a

        mutex_lock(&file->f_mutex);

and at some point via the garbage collector it calls mutex_lock() again. alt-sysrq-t said:

lockd D ABD55800 0 4462 2 (L-TLB)

       f6849d28 00000046 000ee6b2 abd55800 00000000 c0141ed3 c070daac 00157800 
       f779e900 00000000 f6f08f50 c0898154 f6f08a00 00000000 eefdb7d8 c2a21d80 
       f6f08a00 f6f08b0c 000186a0 3ee72980 000002ab 00000001 00000001 c0573e61 
Call Trace:
 [<c0573f32>] __mutex_lock_slowpath+0xb2/0x250
 [<c0573e61>] mutex_lock+0x21/0x30
 [<c0233ff9>] nlmsvc_traverse_blocks+0x29/0xa0
 [<c0236589>] nlm_traverse_files+0x89/0x240
 [<c02368eb>] nlmsvc_mark_resources+0x1b/0x30
 [<c0233179>] nlm_gc_hosts+0x59/0x1a0
 [<c02326f4>] nlm_lookup_host+0x44/0x350
 [<c0232b3f>] nlmsvc_lookup_host+0x5f/0x70
		nlmsvc_create_block() is inlined
 [<c023433d>] nlmsvc_lock+0x14d/0x360
 [<c023961a>] nlm4svc_proc_lock+0xea/0x140
 [<c05600a0>] svc_process+0x320/0x700
 [<c0233663>] lockd+0x133/0x270
 [<c0105337>] kernel_thread_helper+0x7/0x10
Signature · 9 lines
Frank

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#1 lore raw
Quoted 18 lines · Frank van Maarseveen

nlmsvc_lock() starts out with a

        mutex_lock(&file->f_mutex);

and at some point via the garbage collector it calls mutex_lock() again. alt-sysrq-t said:

lockd D ABD55800 0 4462 2 (L-TLB)

       f6849d28 00000046 000ee6b2 abd55800 00000000 c0141ed3 c070daac 00157800 
       f779e900 00000000 f6f08f50 c0898154 f6f08a00 00000000 eefdb7d8 c2a21d80 
       f6f08a00 f6f08b0c 000186a0 3ee72980 000002ab 00000001 00000001 c0573e61 
Call Trace:
 [<c0573f32>] __mutex_lock_slowpath+0xb2/0x250
 [<c0573e61>] mutex_lock+0x21/0x30
 [<c0233ff9>] nlmsvc_traverse_blocks+0x29/0xa0
 [<c0236589>] nlm_traverse_files+0x89/0x240
 [<c02368eb>] nlmsvc_mark_resources+0x1b/0x30
 [<c0233179>] nlm_gc_hosts+0x59/0x1a0
Quoted 8 lines
 [<c02326f4>] nlm_lookup_host+0x44/0x350
 [<c0232b3f>] nlmsvc_lookup_host+0x5f/0x70
		nlmsvc_create_block() is inlined
 [<c023433d>] nlmsvc_lock+0x14d/0x360
 [<c023961a>] nlm4svc_proc_lock+0xea/0x140
 [<c05600a0>] svc_process+0x320/0x700
 [<c0233663>] lockd+0x133/0x270
 [<c0105337>] kernel_thread_helper+0x7/0x10

The following fix has already been sent to [email protected]...

http://client.linux-nfs.org/Linux-2.6.x/2.6.23-rc8/linux-2.6.23-001-fix_lockd_circular_dependency.dif

Trond

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs