[Tarantool-patches] [PATCH 01/16] fio: don't use shared buffer in pread()
Cyrill Gorcunov
gorcunov at gmail.com
Mon Mar 22 10:19:56 MSK 2021
On Sat, Mar 20, 2021 at 01:42:31AM +0100, Vladislav Shpilevoy wrote:
> fio:pread() used buffer.IBUF_SHARED, which might be reused after a
> yield. As a result, if pread() was called from 2 different fibers
> or in parallel with something else using IBUF_SHARED, it would
> turn the buffer into garbage for all parallel usages.
>
> The same problem existed for read(), and was fixed in
> c7c24f841322528c17714482d150b769d0afcddb ("fio: Fix race condition
> in fio.read"). But apparently pread() was missed.
>
> What is worse, the original commit's test passed even without the
> fix from that commit. Because it didn't check the results of
> read()s called from 2 fibers.
>
> The patch fixes pread() and adds a test covering both read() and
> pread(). The old test from the original commit is dropped.
Ack as obvious
More information about the Tarantool-patches
mailing list