From: "Mantas M." <grawity@gmail.com>
To: util-linux@vger.kernel.org
Subject: lslocks – "failed to parse pid: 'WRITE'"
Date: Thu, 07 Feb 2013 16:42:55 +0200 [thread overview]
Message-ID: <kf0ehe$q7h$1@ger.gmane.org> (raw)
When one process is holding an exclusive lock on a file, and other
processes are waiting for the lock to be released, the contents of
/proc/locks look like this:
$ cat /proc/locks
1: FLOCK ADVISORY WRITE 431143 00:0f:6325223 0 EOF
1: -> FLOCK ADVISORY WRITE 405209 00:0f:6325223 0 EOF
1: -> FLOCK ADVISORY WRITE 399578 00:0f:6325223 0 EOF
1: -> FLOCK ADVISORY WRITE 434120 00:0f:6325223 0 EOF
2: FLOCK ADVISORY WRITE 359765 08:04:28180839 0 EOF
3: FLOCK ADVISORY WRITE 359765 08:04:28180837 0 EOF
4: POSIX ADVISORY WRITE 434729 08:04:8653261 0 EOF
4: -> POSIX ADVISORY WRITE 434737 08:04:8653261 0 EOF
5: FLOCK ADVISORY WRITE 359765 08:04:28180836 0 EOF
6: ...
If I try to run `lslocks`, it fails to parse the "->" lines and exits
with an error message:
lslocks: failed to parse pid: 'WRITE'
Can be reproduced by:
touch foo & flock foo -c "sleep 100" & flock foo -c "sleep 100" &
touch foo & lckdo -w foo sleep 100 & lckdo -w foo sleep 100 &
--
Mantas Mikulėnas <grawity@gmail.com>
next reply other threads:[~2013-02-07 14:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-07 14:42 Mantas M. [this message]
2013-02-11 22:42 ` lslocks – "failed to parse pid: 'WRITE'" Sami Kerola
2013-02-11 23:23 ` Mantas Mikulėnas
2013-02-12 11:12 ` Karel Zak
2013-02-12 11:23 ` Sami Kerola
2013-02-12 11:56 ` Bernhard Voelker
2013-02-12 13:18 ` Karel Zak
2013-02-14 15:02 ` Karel Zak
2013-02-12 13:20 ` Karel Zak
2013-02-14 15:44 ` Karel Zak
2013-02-12 10:35 ` Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='kf0ehe$q7h$1@ger.gmane.org' \
--to=grawity@gmail.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.