bug in fio file offset tracking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Juan found a bug in fio verify. On the second iteration of verifying a
file, the position tracking is broken. In the strace output below, the
second lseek is missing after re-opening the test file to verify a
second time.

I suspect the problem is fio is tracking it's position in the file but
didn't clear that position tracking after closing (or opening) the
file. And since fio thinks it's at the right position, no lseek is
issued. Just a guess.

job files attached. Very small test file gets created (64KB).

cheers,
grant

./fio example/juan_write.fio
...
strace -f -e lseek,read,close,open ./fio examples/juan_verify.fio
...
[pid 21828] open("juan_write_file", O_RDONLY) = 3
[pid 21828] lseek(3, 57344, SEEK_SET)   = 57344
[pid 21828] read(3, "\312\254\n\0\0
\0\0\0\0\0\0\0\0\0\0\226\300`\316\377\377\377\377\0\340\0\0\0\0\0\0"...,
8192) = 8192
[pid 21828] lseek(3, 0, SEEK_SET)       = 0
[pid 21828] read(3, "\312\254\n\0\0
\0\0\0\0\0\0\0\0\0\0\226\300`\316\377\377\377\377\0\0\0\0\0\0\0\0"...,
8192) = 8192
[pid 21828] read(3, "\312\254\n\0\0
\0\0\0\0\0\0\0\0\0\0\226\300`\316\377\377\377\377\0 \0\0\0\0\0\0"...,
8192) = 8192
[pid 21828] read(3, "\312\254\n\0\0
\0\0\0\0\0\0\0\0\0\0\226\300`\316\377\377\377\377\0@\0\0\0\0\0\0"...,
8192) = 8192
[pid 21828] read(3, "\312\254\n\0\0
\0\0\0\0\0\0\0\0\0\0\226\300`\316\377\377\377\377\0`\0\0\0\0\0\0"...,
8192) = 8192
[pid 21828] read(3, "\312\254\n\0\0
\0\0\0\0\0\0\0\0\0\0\226\300`\316\377\377\377\377\0\200\0\0\0\0\0\0"...,
8192) = 8192
[pid 21828] read(3, "\312\254\n\0\0
\0\0\0\0\0\0\0\0\0\0\226\300`\316\377\377\377\377\0\240\0\0\0\0\0\0"...,
8192) = 8192
[pid 21828] read(3, "\312\254\n\0\0
\0\0\0\0\0\0\0\0\0\0\226\300`\316\377\377\377\377\0\300\0\0\0\0\0\0"...,
8192) = 8192
[pid 21828] close(3)                    = 0
[pid 21828] open("juan_write_file", O_RDONLY) = 3
[pid 21828] read(3, "\312\254\n\0\0
\0\0\0\0\0\0\0\0\0\0\226\300`\316\377\377\377\377\0\0\0\0\0\0\0\0"...,
8192) = 8192
meta: verify failed at file juan_write_file offset 57344, length 8192
[pid 21828] open("juan_write_file.57344.received",
O_WRONLY|O_CREAT|O_TRUNC, 0644) = 4
[pid 21828] close(4)                    = 0
       received data dumped as juan_write_file.57344.received
[pid 21828] open("juan_write_file.57344.expected",
O_WRONLY|O_CREAT|O_TRUNC, 0644) = 4
[pid 21828] close(4)                    = 0
       expected data dumped as juan_write_file.57344.expected
[pid 21828] lseek(3, 0, SEEK_SET)       = 0
[pid 21828] read(3, "\312\254\n\0\0
\0\0\0\0\0\0\0\0\0\0\226\300`\316\377\377\377\377\0\0\0\0\0\0\0\0"...,
8192) = 8192
[pid 21828] read(3,  <unfinished ...>

Attachment: juan_write.fio
Description: Binary data

Attachment: juan_verify.fio
Description: Binary data


[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux