Closed markpapadakis closed 4 months ago
UPDATE: use of SPLICE_F_MOVE makes no difference; fails either way.
UPDATE: turns out this is not io-uring specific; using writev()/splice() directly results in the same issue. Maybe its a kernel issue, or maybe I am ignoring some specifics related to the use of corks and splice.
Closing this one, as it's not a liburing/io_uring issue. You may want to write a test case and report it to the linux kernel mailing list. Though I'm unsure of how maintained splice is these days...
Suppose that a sender:
SPLICE_F_MOVE | SPLICE_F_NONBLOCK
to copy/move some(say all but 1) byte in a pipe to fd1 ( bytesout 1)SPLICE_F_MOVE | SPLICE_F_NONBLOCK
to copy/move all remaining bytes in the pipe (say, 1 byte) to fd1 (bytes_out_2)the receiver then reads()s:
Effectively, the 2 extra bytes received in read2 are those that were writev()-ed initially and were already received in read1. Somehow those are duplicated in the kernel (or it looks like they are).
So it only fails if the above scenario plays out.