We've come across an issue where the POSIX backend polls a file descriptor after it has been closed. The kernel returns POLLNVAL (invalid fd) but Eio ignores it and keeps polling. It manifests in strace like this:
Unfortunately it relies on networking but we've found it to be reliably reproducible.
I haven't investigated why the fd is still being polled after it has been closed but I will submit a small PR to handle POLLNVAL soon, which at least mitigates the issue.
We've come across an issue where the POSIX backend polls a file descriptor after it has been closed. The kernel returns POLLNVAL (invalid fd) but Eio ignores it and keeps polling. It manifests in
strace
like this:and it keeps
ppoll
ing in an infinite loop. (This also seems to trigger a lot of GC activity as seen if you run it withOCAMLRUNPARAM=v=4095
.)This is a straightforward reproduction: https://github.com/quernd/eio-issue-repro
Unfortunately it relies on networking but we've found it to be reliably reproducible.
I haven't investigated why the fd is still being polled after it has been closed but I will submit a small PR to handle POLLNVAL soon, which at least mitigates the issue.