Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
03-30-2010, 11:09 AM
|
#1
|
|
LQ Newbie
Registered: Mar 2010
Posts: 10
Rep:
|
duplicate ids in /proc/locks
Hi All,
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
2.6.18-164.11.1.el5xen (Xen release for virtualisation)
I'm trying to track down a problem with a utility that used to work and now hangs indefinitely. Since its hanging, I suspected a locking problem, and went to have a look for the process ids in /proc/locks; I get:
148: FLOCK ADVISORY WRITE 30279 ca:21:49153 0 EOF
148: -> FLOCK ADVISORY READ 30282 ca:21:49153 0 EOF
Now as near as I can tell this shouldn't be my problem, since the two ADVISORY locks - one READ and one WRITE - shouldn't conflict with one another. But I'd like to understand it all the same. I haven't been able to find any kind of definitive guide for the format of /proc/locks entries, but what I did find in the manuals specifically states:
"Each lock has its own line which starts with a unique number. "
Which is obviously not true; both of my lines start with the same number. Also, since most search engines don't seem to play nicely with symbols, I can't find any reference to what the "->" means. Can anyone explain? Or point me to a good reference?
Thanks much,
- rob.
|
|
|
|
04-03-2010, 05:13 AM
|
#2
|
|
Member
Registered: Feb 2007
Location: USA
Distribution: opensuse, slackware
Posts: 35
Rep:
|
man 5 proc
As for your 'hanging process', I would use strace to find what resource it is trying to acquire or wait on.
strace -o /var/tmp/foo myProg
You may need to use -f, ymmv.
|
|
|
1 members found this post helpful.
|
04-05-2010, 10:54 AM
|
#3
|
|
LQ Newbie
Registered: Mar 2010
Posts: 10
Original Poster
Rep:
|
man 5 proc has this to say about /proc/locks:
Quote:
/proc/locks
This file shows current file locks (flock(2) and fcntl(2)) and leases (fcntl(2)).
|
...and thats it. Not exactly a fount of information about the format. (I of course followed up on the man pages for the system calls, but none of them say anything about the format of the locks file.)
But strace is a useful one that I hadn't used before - thanks for the pointer.
|
|
|
|
04-05-2010, 11:18 AM
|
#4
|
|
Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,644
|
Quote:
Originally Posted by codedr
man 5 proc
|
Before suggesting "man" you might want to review the man page you're talking about yourself to see if it includes the answer. Typically what I do is point out that man has the answer then quote the section or part of the section. In this case man did not have the answer.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:20 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|