View Issue Details

IDProjectCategoryView StatusLast Update
0013845CentOS-7kernelpublic2018-05-11 17:10
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0013845: 7.4 kernel changes flock over nfs behavior
Descriptionprior to the 7.4 kernel, flock on an nfs file would allow an exclusive lock for a read-only file. now it fails with EBADF. shared locks for read only work fine, as do exclusive locks for files open with write.

i don't have access to upstream based systems to tell if this is a change from there, which is most likely.
Steps To Reproducetouch foo
perl -e 'open(x,"<","foo");flock(x,2) || die $!'

Bad file descriptor at -e line 1.

change < to > and it will work without error.
Additional Informationthis broke quite a few of our system maintenance scripts, so it at least needs to be documented if it is going to be the new behavior.

if this is from upstream, will someone from the centos team push the issue to them?
Tagsflock, nfs




2017-09-18 18:15

manager   ~0030112

That's something you need to do: raise the issue on


2017-09-18 18:31

reporter   ~0030113

i can't confirm it is from upstream as i don't have access to a system running that. until that is confirmed, i don't think a bugzilla entry is appropriate. i'm hoping someone else that sees this can do the testing.


2017-10-02 15:22

reporter   ~0030276

We have had the same problem after rebooting into the 7.4 kernel. We could verify that the bug occurs in RHEL, too.

q7joey, we used your reproducer to report it upstream:


2017-10-02 15:28

reporter   ~0030277

great. any chance that bugzilla id could be made public so i can follow it?


2017-10-02 15:36

reporter   ~0030278

q7joey, we would love to do so. but somehow the report has gotten an "Private Group" flag that is read-only to us. maybe someone at redhat has to uncheck it?

we'll post an update here, if something happens.


2017-10-02 15:59

manager   ~0030279

All kernel bugs on bugzilla are automatically marked as private. You can add email addresses to the list allowed to see the bz.


2017-10-02 16:50

reporter   ~0030280

our report was marked as duplicate.

please use for tracking now.


2017-11-23 14:57

reporter   ~0030641

Is there any progress on this issue?


2017-11-23 17:15

manager   ~0030642

Questions about the status of an upstream issue need to be directed to upstream. CentOS has no knowledge of what's going on behind the scenes in private bugzilla entries and cannot help. When RH fix the problem and provide a public updated package then it will automatically be inherited by CentOS.


2017-11-29 12:31

reporter   ~0030672

FYI, there has been some activity in the upstream bug report. The status of has changed from [fix] ON_QA to [fix] VERIFIED after patches for NFS were made available in kernel-3.10.0-799.el7.


2017-11-29 16:34

manager   ~0030675

Relevant RHEL solution article is here:

"This bug is expected to be fixed on RHEL 7.5."

Hopefully they backport the fix to 7.4.


2018-05-11 17:10

manager   ~0031768

CentOS 7.5.1804 is out. Closing this bug report as 'resolved'. Feel free to reopen (or start a new report) if this is not the case.

Issue History

Date Modified Username Field Change
2017-09-18 18:04 q7joey New Issue
2017-09-18 18:04 q7joey Tag Attached: flock
2017-09-18 18:04 q7joey Tag Attached: nfs
2017-09-18 18:15 TrevorH Note Added: 0030112
2017-09-18 18:31 q7joey Note Added: 0030113
2017-10-02 15:22 filex Note Added: 0030276
2017-10-02 15:28 q7joey Note Added: 0030277
2017-10-02 15:36 filex Note Added: 0030278
2017-10-02 15:59 TrevorH Note Added: 0030279
2017-10-02 16:50 filex Note Added: 0030280
2017-11-23 14:57 eugenysp Note Added: 0030641
2017-11-23 17:15 TrevorH Note Added: 0030642
2017-11-29 12:31 filex Note Added: 0030672
2017-11-29 16:34 toracat Note Added: 0030675
2017-11-29 16:34 toracat Status new => confirmed
2018-05-11 17:10 toracat Note Added: 0031768
2018-05-11 17:10 toracat Status confirmed => resolved
2018-05-11 17:10 toracat Resolution open => fixed