Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-43454

[Linux] When QLockFile is used on NFS then it will run into problems with the native lock indicating the resource is not available

XMLWordPrintable

    • b2c7c489ab40efb1f2f64aba5b90f5f4fb8d8536

      [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.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Unassigned Unassigned
            andysh Andy Shaw
            Votes:
            12 Vote for this issue
            Watchers:
            24 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes