Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-1461

LP #1262651: os_file_fsync() should handle fsync() returning EINTR

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None

      Description

      **Reported in Launchpad by Laurynas Biveinis last update 19-12-2013 12:59:00

      Splitting out the fsync() case out of bug 764395:

      [19 Dec 12:46] Laurynas Biveinis

      Description:
      fsync() is documented by POSIX to have EINTR as one of the valid return values [1]. Thus, os_file_fsync() should handle it and retry instead of failing. Note that the same function in mysys (my_sync()) does this.

      [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/fsync.html

      This was discovered while fixing bug 60788 in Percona Server.

      How to repeat:
      Code analysis

      Suggested fix:
      The function already has a retry loop, add a case for ret == -1 && errno == EINTR.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            lpjirasync lpjirasync (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Smart Checklist