FATAL error fsyncing in fileio with mode=mmap

Bug #1262178 reported by Ignacio Nin on 2013-12-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sysbench
Status tracked in Trunk
0.4
Undecided
Unassigned
Trunk
Undecided
Ignacio Nin

Bug Description

When using fileio with file-io-mode=mmap, sysbench fails to fsync the files with the rather cryptic message:

FATAL: Failed to fsync file! id: 0 fd: 3 errno = 0 (Success)

Notice errno is not activated, because fsync() actually succeded. The error comes from a skewered sysbench/tests/fileio/sb_fileio.c's file_sync() return value for mode=mmap. The fix is rather trivial, needs a return sentence for the case different that the catch-all return 1 at the end of the function.

To reproduce:

$ sysbench --test=fileio --file-num=1 --file-total-size=1M prepare
$ sysbench --test=fileio --file-num=1 --file-total-size=1M --file-io-mode=mmap --file-test-mode=seqwr run

Related branches

Alexey Kopytov (akopytov) wrote :

Dear Mr. Nin,

Thank you for the bug report and the contributed fix!

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

Other bug subscribers