Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.4.0
-
Linux, NFS
-
b2c7c489ab40efb1f2f64aba5b90f5f4fb8d8536
Description
[Linux] When QLockFile is used on NFS then it will run into problems with the native lock indicating the resource is not available. This can easily happen with QSettings as it uses lock files internally too and this becomes more apparant from Qt 5.4.0.
This seems to be the case with NFS 4.x and the current kernel versions as flock == fcntl. Therefore
if (fcntlWorksAfterFlock() && fcntl(fd, F_SETLK, &flockData;) == -1) // for networked filesystems
fails for networked filesystems. fcntlWorksAfterFlock() seems to not catch that case, as it only globally determines if that is possible but that would be needed on per filesystem basis.
Although this does not readily show up as a problem in Qt 5.3.x the code is the same there, but due to the change of QSettings to use QLockFile this has become much more apparent as the warnings come quite a lot.