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

Suspect QLockFail::lock() may fail sporadically on Windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.8.2
    • Core: I/O
    • None
    • Windows

      I am seeing flakiness in code where QLockFile is locked/unlocked frequently. QLockFile::lock() fails with error code QLockFile::PermissionError when this happens. This means that Qt’s implementation calls CreateFile which fails with ERROR_ACCESS_DENIED.

      The CreateFile documentation states

      If you rename or delete a file and then restore it shortly afterward, the system searches the cache for file information to restore. Cached information includes its short/long name pair and creation time.

      If you call CreateFile on a file that is pending deletion as a result of a previous call to DeleteFile, the function fails. The operating system delays file deletion until all handles to the file are closed. GetLastError returns ERROR_ACCESS_DENIED.

        For Gerrit Dashboard: QTBUG-140053
        # Subject Branch Project Status CR V

            thiago Thiago Macieira
            johanseg Jøger Hansegård
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: