GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Keep watching an fd after a poll error on Linux by Ayush701-code-zm · Pull Request #791 · MagicStack/uvloop ConversationFixes #787 On Linux, libuv reports This change makes a poll error behave like asyncio's level-triggered epoll:
Tests: four Linux-only tests in One thing to note: like asyncio, an fd stuck in an error state now keeps calling its callback every iteration until it is removed. If you'd prefer only the smaller fix (dropping the closed poll from
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsOn Linux, libuv reports POLLERR to the poll callback as UV_EBADF after it has stopped the watcher. UVPoll handled this as a fatal error: it ran the reader and the writer once, dropped them and closed the handle, which stayed in Loop._polls. The fd was then no longer watched, a later add_writer() raised RuntimeError and re-arming from the callback did nothing. Match asyncio (level-triggered epoll) instead: run the callbacks as for a ready fd and start the poll again, so they keep being called until they are removed. If the fd is gone or the restart fails, close the handle, remove it from Loop._polls so that a later add_reader() or add_writer() creates a new one, and report the error to the exception handler. Fixes MagicStack#787.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. uvloop stops watching a handle after an error of it on LinuxUh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |