os_file_fsync() should handle fsync() returning EINTR

Bug #1262651 reported by Laurynas Biveinis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
Medium
Unassigned
5.1
Fix Released
Medium
Unassigned
5.5
Fix Released
Medium
Unassigned

Bug Description

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.

Tags: upstream
Changed in percona-server:
status: New → Fix Released
tags: added: upstream
Changed in percona-server:
importance: Undecided → Medium
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1461

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.