axboe / fio

Flexible I/O Tester
GNU General Public License v2.0
5.23k stars 1.26k forks source link

Crash with kb_base=1000 #1244

Closed viccornell closed 3 years ago

viccornell commented 3 years ago

Please acknowledge the following before creating a ticket

Description of the bug: fio crashes with error when kb_base is set to 1000. Setting kb_base avoid the crash.

fio: io_u error on file jobSR.0.0: Invalid argument: read offset=15000, buflen=1000 fio: io_u error on file jobSR.0.0: Invalid argument: read offset=14000, buflen=1000

Environment: Linux home2 4.18.0-240.15.1.el8_3.x86_64 #1 SMP Mon Mar 1 17:16:16 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux CentOS Linux release 8.3.2011

fio version: 3.25 and 3.27x

Reproduction steps

Run: fio --kb_base =1000 --size=1g --bs=1K --iodepth=16 --direct=1 --ioengine=posixaio --name=jobSR --rw=read --stonewall

If you remove the kb_base option or set it to 1024 then it runs without error

axboe commented 3 years ago

I don't see a crash, but I do see the kernel telling you that doing 1000b O_DIRECT is not valid. O_DIRECT must be (at least) sector aligned, and hence a power-of-2.

viccornell commented 3 years ago

Ah. OK. I guess “crash” was a bit of dramatic license. What I should have said was that the program exited with an error. It looks like my customers’ benchmark script is even worse than I thought. Thanks for the quick reply and the info about O_DIRECT.

Best Regards,

Vic

Sent from my iPhone

On 7 Jul 2021, at 18:56, Jens Axboe @.***> wrote:

I don't see a crash, but I do see the kernel telling you that doing 1000b O_DIRECT is not valid. O_DIRECT must be (at least) sector aligned, and hence a power-of-2.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

axboe commented 3 years ago

No problem, please close the issue.

On Jul 7, 2021, at 12:18 PM, viccornell @.***> wrote:

 Ah. OK. I guess “crash” was a bit of dramatic license. What I should have said was that the program exited with an error. It looks like my customers’ benchmark script is even worse than I thought. Thanks for the quick reply and the info about O_DIRECT.

Best Regards,

Vic

Sent from my iPhone

On 7 Jul 2021, at 18:56, Jens Axboe @.***> wrote:

I don't see a crash, but I do see the kernel telling you that doing 1000b O_DIRECT is not valid. O_DIRECT must be (at least) sector aligned, and hence a power-of-2.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

viccornell commented 3 years ago

Error explained. Thanks.