RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1017478 - manpage for flock(2) says that flock() does not lock files over NFS, when it does
Summary: manpage for flock(2) says that flock() does not lock files over NFS, when it ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: man-pages-overrides
Version: 6.4
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Jan Chaloupka
QA Contact: Iveta Wiedermann
URL:
Whiteboard:
Depends On:
Blocks: 1119562
TreeView+ depends on / blocked
 
Reported: 2013-10-10 01:52 UTC by advax
Modified: 2014-10-14 07:26 UTC (History)
7 users (show)

Fixed In Version: man-pages-overrides-6.6.2-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: insufficient information about locking files over NFS Consequence: incomplete documenation Fix: information about locking files over NFS is added Result: updated documentation
Clone Of:
Environment:
Last Closed: 2014-10-14 07:26:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
The upstream patch (1.93 KB, text/plain)
2014-06-16 16:08 UTC, Steve Dickson
no flags Details
flock.2 NFS flock for MPO (2.15 KB, patch)
2014-06-17 05:58 UTC, Jan Chaloupka
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1382 0 normal SHIPPED_LIVE man-pages-overrides bug fix update 2014-10-14 01:21:54 UTC

Description advax 2013-10-10 01:52:50 UTC
The manpage for flock(2) states:

flock()  does  not lock files over NFS.  Use fcntl(2) instead: that does  work   over NFS, given a sufficiently recent version of Linux and a server which supports locking.

But as far as I can tell, from a programmer's point of view, flock() does work over NFS. The shell command "flock a.a bash" experimentlaly locks a file on an NFS mounted volume, while in e.g. linux-2.6.18-274.3.1.el5.x86_64/fs/nfs/file.c
there is a comment
"We're simulating flock() locks using posix locks on the server"

suggesting to me that flock() works on NFS in RHEL5 and RHEL6.

Comment 2 Jan Chaloupka 2014-06-12 12:15:00 UTC
Adding steved.

Hi, Steve,

any progress?

Jan

Comment 3 Michael Kerrisk 2014-06-12 12:57:10 UTC
Upstream e449654fdb3f19aafc569df47d12bffdf6276236 probably addresss this bug, I think. That change will go out with the next release.

Comment 4 Steve Dickson 2014-06-16 15:17:27 UTC
(In reply to Michael Kerrisk from comment #3)
> Upstream e449654fdb3f19aafc569df47d12bffdf6276236 probably addresss this
> bug, I think. That change will go out with the next release.

What git tree is that commit relative to?

Comment 5 Michael Kerrisk 2014-06-16 15:23:36 UTC
man-pages Git
https://www.kernel.org/doc/man-pages/download.html

Comment 6 Steve Dickson 2014-06-16 16:08:57 UTC
Created attachment 909193 [details]
The upstream patch

Comment 8 Jan Chaloupka 2014-06-17 05:58:34 UTC
Created attachment 909385 [details]
flock.2 NFS flock for MPO

Comment 9 Jan Chaloupka 2014-06-17 06:00:31 UTC
Thank you very much guys

Comment 17 errata-xmlrpc 2014-10-14 07:26:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1382.html


Note You need to log in before you can comment on or make changes to this bug.