← Back to team overview

enterprise-support team mailing list archive

[Bug 1262651] [NEW] os_file_fsync() should handle fsync() returning EINTR

 

Public bug reported:

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.

** Affects: mysql-server
     Importance: Unknown
         Status: Unknown

** Affects: percona-server
     Importance: Medium
         Status: Fix Released

** Affects: percona-server/5.1
     Importance: Medium
         Status: Fix Released

** Affects: percona-server/5.5
     Importance: Medium
         Status: Fix Released


** Tags: upstream

** Also affects: percona-server/5.1
   Importance: Undecided
       Status: New

** Also affects: percona-server/5.5
   Importance: Undecided
       Status: New

** Changed in: percona-server
       Status: New => Fix Released

** Changed in: percona-server/5.1
       Status: New => Fix Released

** Changed in: percona-server/5.5
       Status: New => Fix Released

** Tags added: upstream

** Changed in: percona-server
   Importance: Undecided => Medium

** Changed in: percona-server/5.1
   Importance: Undecided => Medium

** Changed in: percona-server/5.5
   Importance: Undecided => Medium

** Bug watch added: MySQL Bug System #71183
   http://bugs.mysql.com/bug.php?id=71183

** Also affects: mysql-server via
   http://bugs.mysql.com/bug.php?id=71183
   Importance: Unknown
       Status: Unknown

** Changed in: percona-server/5.1
    Milestone: None => 5.1.56-12.7

** Changed in: percona-server/5.5
    Milestone: None => 5.5-20.2stable

-- 
You received this bug notification because you are a member of Ubuntu
Server/Client Support Team, which is subscribed to MySQL.
Matching subscriptions: Ubuntu Server/Client Support Team
https://bugs.launchpad.net/bugs/1262651

Title:
  os_file_fsync() should handle fsync() returning EINTR

To manage notifications about this bug go to:
https://bugs.launchpad.net/mysql-server/+bug/1262651/+subscriptions


Follow ups

References