FATAL error fsyncing in fileio with mode=mmap

Bug #1262178 reported by Ignacio Nin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sysbench
Status tracked in Trunk
0.4
New
Undecided
Unassigned
Trunk
Fix Committed
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

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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