libuv: uv_pipe_open/uv_read_start regression in v1.23.1 and later
- Version: v1.23.1
- Platform: macOS 10.14
The following few lines (added in 40498795a and pushed to v1.23.1) seem to break uv_pipe_open() for pipes created with pipe2() / pipe():
I found this problem trying to upgrade uvloop to v1.23.2; the test_write_pipe test crashes with “[Errno 57] Socket is not connected”. With the above few lines commented out everything works as expected.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (16 by maintainers)
Commits related to this issue
- forcely add UV_HANDLE_READABLE on pipe_t * in order to detect peer close on O_WRONLY pipe_t * refs libuv/libuv#2058 * refs #317 — committed to fantix/uvloop by fantix 4 years ago
- forcely add UV_HANDLE_READABLE on pipe_t * in order to detect peer close on O_WRONLY pipe_t * partially reverted d8fe153 * refs libuv/libuv#2058 * refs #317 * fixes #311, fixes #312 — committed to fantix/uvloop by fantix 4 years ago
- forcely add UV_HANDLE_READABLE on pipe_t * in order to detect peer close on O_WRONLY pipe_t * partially reverted d8fe153 * refs libuv/libuv#2058 * refs #317 * fixes #311, fixes #312 — committed to fantix/uvloop by fantix 4 years ago
- forcely add UV_HANDLE_READABLE on pipe_t * in order to detect peer close on O_WRONLY pipe_t * partially reverted d8fe153 * refs libuv/libuv#2058 * refs #317 * fixes #311, fixes #312 — committed to MagicStack/uvloop by fantix 4 years ago
- unix: re-allow WRONLY fd in uv_read_start For the writing end (O_WRONLY) of a pipe(2), we should also allow polling for read, so that the user could listen for a broken pipe on the writing end using ... — committed to fantix/libuv by fantix 4 years ago
- unix: re-allow WRONLY fd in uv_read_start For the writing end (O_WRONLY) of a pipe(2), we should also allow polling for read, so that the user could listen for a broken pipe on the writing end using ... — committed to fantix/libuv by fantix 4 years ago
- unix: re-allow WRONLY fd in uv_read_start For the writing end (O_WRONLY) of a pipe(2), we should also allow polling for read, so that the user could listen for a broken pipe on the writing end using ... — committed to fantix/libuv by fantix 4 years ago
- unix: re-allow WRONLY fd in uv_read_start For the writing end (O_WRONLY) of a pipe(2), we should also allow polling for read, so that the user could listen for a broken pipe on the writing end using ... — committed to fantix/libuv by fantix 4 years ago
- unix: re-allow WRONLY fd in uv_read_start For the writing end (O_WRONLY) of a pipe(2), we should also allow polling for read, so that the user could listen for a broken pipe on the writing end using ... — committed to fantix/libuv by fantix 4 years ago
- unix: re-allow WRONLY fd in uv_read_start For the writing end (O_WRONLY) of a pipe(2), we should also allow polling for read, so that the user could listen for a broken pipe on the writing end using ... — committed to fantix/libuv by fantix 4 years ago
- unix: re-allow WRONLY fd in uv_read_start For the writing end (O_WRONLY) of a pipe(2), we should also allow polling for read, so that the user could listen for a broken pipe on the writing end using ... — committed to santigimeno/libuv by fantix 4 years ago
- unix: re-allow WRONLY fd in uv_read_start For the writing end (O_WRONLY) of a pipe(2), we should also allow polling for read, so that the user could listen for a broken pipe on the writing end using ... — committed to fantix/libuv by fantix 4 years ago
- unix: re-allow WRONLY fd in uv_read_start For the writing end (O_WRONLY) of a pipe(2), we should also allow polling for read, so that the user could listen for a broken pipe on the writing end using ... — committed to fantix/libuv by fantix 4 years ago
- unix: re-allow WRONLY fd in uv_read_start For the writing end (O_WRONLY) of a pipe(2), we should also allow polling for read, so that the user could listen for a broken pipe on the writing end using ... — committed to fantix/libuv by fantix 4 years ago
- unix: re-allow WRONLY fd in uv_read_start For the writing end (O_WRONLY) of a pipe(2), we should also allow polling for read, so that the user could listen for a broken pipe on the writing end using ... — committed to fantix/libuv by fantix 4 years ago
- forcely add UV_HANDLE_READABLE on pipe_t * in order to detect peer close on O_WRONLY pipe_t * partially reverted d8fe153 * refs libuv/libuv#2058 * refs #317 * fixes #311, fixes #312 — committed to Olaf1022/Ultra-fast-asyncio by Olaf1022 4 years ago
Looks like it’s indeed working. Thanks so much @bnoordhuis and @saghul. Closing this now.
Sure, but I need some solution to detect if write end is disconnected, otherwise libuv is forever broken for uvloop 😦
Could you please elaborate on this?
But… it always worked just fine up until bugfix v1.23.1 release. Did we have a portability issue in libuv for all these years? IMO, v1.23.1 breaks backwards compat in a big way without offering any solution to how unbreak it.
I’ll copy a few other devs just in case they can help us here: @saghul @bnoordhuis