This is fixed by upstream commit:
commit 68faa4727c0e2d7d255d9b97e754f2cda748f141
Author: Jens Axboe <axboe@kernel.dk>
Date: Tue Aug 25 12:27:50 2020 -0600
io_uring: don't use poll handler if file can't be nonblocking read/written
We're testing whether we first get some data, then a zero return on the
next one when it's closed. The buggy behavior was to arm a poll handler,
which isn't notified when the pipe is closed.
Signed-off-by: Jens Axboe <axboe@kernel.dk>