fio
fio copied to clipboard
ZBD: assertion when check offset valid during reset zone
Please acknowledge the following before creating a ticket
- [y ] I have read the GitHub issues section of REPORTING-BUGS.
Description of the bug:
- During io testing with percentage size on the ZBD device, fio asserted when check offset valid: assertion when check offset valid during reset zone
Environment: 5.15.0-53-generic #59~20.04.1-Ubuntu SMP Thu Oct 20 15:10:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
fio version: fio-3.36 and old versions
Reproduction steps
- reproduce cmd: fio -filename=/dev/nvme0n1 -ioengine=libaio -direct=1 -iodepth=32 -thread -name=fio_name -numjobs=1 -group_reporting -verify_backlog=16777216 -cpus_allowed=1 -rw=write -zonemode=zbd -significant_figures=10 -bs=128K -do_verify=1 -verify_pattern=0x5A -offset=53% -max_open_zones=16 -size=20%
- necessary to reproduce the issue (https://stackoverflow.com/help/mcve ) --> use the percentage value for the param "offset" & "size" is easy to reproduce.
The root cause is that the "f->file_offset" and "f->io_size" was ever adjusted in function "zbd_zone_align_file_sizes" of zbd.c, however during libfio.c ~ clear_io_state(), when it get the file offset through "get_start_offset()", the returned offset value is still the original one instead of the adjusted value in zbd.c, which caused the assertion.
Since you already root caused the problem, why not just send a patch or PR to fix it?
Since you already root caused the problem, why not just send a patch or PR to fix it?
I'm not sure about the detailed procedure for requesting PR to fio repo, is there any guidance doc? Thanks.
Here is a guide that seems reasonable: https://opensource.com/article/19/7/create-pull-request-github
@vincentkfu thanks for the guide link, i followed it and requested a PR: https://github.com/axboe/fio/pull/1728 for the fix.