Skip to contentSkip to conversation

flock LOCK_EX hangs

DISCUSSION Baurzhan Ismagulov 2 participants 4 messages May 16, 2007 – May 31, 2007

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

Hello all,

I'm experiencing problems with the kernel NFS server. The client hangs on the flock call. This is Debian etch, Linux 2.6.16-1-686-smp, the server and the client is the same machine. The directory is exported with rw, no mount options. The lockd kernel thread is present, rpcinfo -p reports nlockmgr registered, the firewall passes all the traffic through.

I've googled and searched the list archive, the postings are usually quite old (only two were from 2006 and referred to Linux 2.6), and I couldn't see how I could further analyze the problem. I've also tried mounting with nolock, but this apparently makes flock / fcntl to fail, since the tools I use (automake and debootstrap, although I checked this only with the latter) exited with an error code, and I rely upon it.

How can I fix the problem?

Thanks in advance,

Signature · 11 lines
Baurzhan Ismagulov
http://www.kz-easy.com/

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
#1 lore raw
Quoted 7 lines · Baurzhan Ismagulov

I'm experiencing problems with the kernel NFS server. The client hangs on the flock call. This is Debian etch, Linux 2.6.16-1-686-smp, the server and the client is the same machine. The directory is exported with rw, no mount options. The lockd kernel thread is present, rpcinfo -p reports nlockmgr registered, the firewall passes all the traffic through.

Quoted 6 lines

I've googled and searched the list archive, the postings are usually quite old (only two were from 2006 and referred to Linux 2.6), and I couldn't see how I could further analyze the problem. I've also tried mounting with nolock, but this apparently makes flock / fcntl to fail, since the tools I use (automake and debootstrap, although I checked this only with the latter) exited with an error code, and I rely upon it.

Might be fun to watch the network traffic as this is happening. I'd probably do something like

wireshark -Slk -ilo

then try to get a lock, and try to understand what's happening on the "network": is the client sending requests that the server doesn't answer? Or are there errors coming back? Etc.

Or you could run

tcpdump -s0 -ilo -wtmp.pcap

and mail a copy of tmp.pcap and somebody could take a look.

There's also been a lot fixed since 2.6.16, so it might be worth trying something newer.

--b.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#2 lore raw

Hello Bruce,

Quoted 1 line · J. Bruce Fields

Might be fun to watch the network traffic as this is happening.

Eh, I've hoped someone would have a silver bullet for me, so that I don't have to do that :) .

There is one LOCK request and one LOCK reply with the NLM DENIED GRACE PERIOD error. Does this say anything?

This is still under 2.6.16, I'm planning to upgrade on Friday, unless the problem can be solved with the current version. Besides, is it possible to turn on logging? Also, I've seen the following messages in the kernel log: "do_vfs_lock: VFS is out of sync with lock manager!" This happened only when I dumped the traffic the last time, not within the day, when I tried many times (the logs were not rotated).

Any ideas?

With kind regards,

Signature · 2 lines
Baurzhan Ismagulov
http://www.kz-easy.com/

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#3 lore raw
In reply to J. Bruce Fields

Hello Bruce,

Quoted 2 lines · J. Bruce Fields
Quoted 2 lines

I'm experiencing problems with the kernel NFS server. The client hangs on the flock call.

...

Quoted 2 lines

There's also been a lot fixed since 2.6.16, so it might be worth trying something newer.

I've tried 2.6.20, and it worked. It's amazing how long time it has been since I had kernel bugs, I haven't even thought in that direction. Thanks much!

With kind regards,

Signature · 11 lines
Baurzhan Ismagulov
http://www.kz-easy.com/

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs