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

QSaveFile::commit fails with "Interrupted system call" on android

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.10
    • 5.10.0
    • Core: I/O
    • None
    • 4ba535616b8d3dfda7fbe162c6513f3008c1077a

    Description

      Our projects sends errors returned from the QSaveFile::commit to Crashlytics as Non-fatal events and we see small amount of "Interrupted system call" from our android users.

      QSaveFile::commit calls fsync without retrying the call if it fails with EINTR:

      https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/io/qfsfileengine_unix.cpp#n186

      Posix programming manual includes EINTR in a list of posible errors of fsync:

      https://linux.die.net/man/3/fsync

      Looks like QFSFileEnginePrivate::nativeSyncToDisk unix implementation misses proper handling of the EINTR.

       

      P.S. We do use fsync directly in our code base and the same monitoring shows that android implementation of fsync do fails with EINTR. Retrying fsycn on EINTR fixes this issue.

       

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            s.vidyuk Sergey Vidyuk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes