Skip to content

Segmentation fault on null and filestat ioengine when pre_read option is true #1045

Open
@Martins3

Description

@Martins3

1. what's the bug?

null engine and filestat only have io_ops::open_file hook, when pre_read option is true, in function pre_read_file

if(did_open)
  td->io_ops->close_file(td, f)

Using io_ops::close_file cause the segfault

2. environment

It should work for every platform, tested on Arch Linux with 4.14 kernel version

3. fio version

3.21

Compiled with commit hash code d13596b

4. how to reproduce

  1. add pre_read=1 to example/filestat-ioengine.fio
  2. fio example/filestat-ioengine.fio

Metadata

Metadata

Assignees

No one assigned

    Labels

    triagedIssue cause is understood but a patch is needed to fix it

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions