-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exceed reader limits #11530
Exceed reader limits #11530
Conversation
The tests fail at line 263 of repl.jl, Annoyingly, if I write to STDOUT just before the readall, the test passes... |
I believe this has exposed something that was going wrong anyway. The libuv read callback is being invoked with a negative nread: -5 for me, perhaps for everyone. It looks like it happens instead of an invocation with The callback notifies readnotify waiters that an error occurred, but doesn't I don't know why the read callback is being invoked with a negative nread. |
The error is UV_EIO. I believe it relates to the interaction between the TTY master and its slaves. This SO question says that closing all the slaves on a TTY causes reading from the master to fail with EIO. It suggests keeping a "spare" slave open, but if we do that The updated PR also changes the callback handler to notify close-waiters. Should that actually be in a separate PR, or is it okay in this one? Aside: It looks like writing to stdout hides the problem because by the time the write has finished, the subprocess has already exited and closed the slave so readbytes doesn't ever wait for the readnotify condition and it never sees the error. The error state isn't stored anywhere permanent, so it looks like we can never know it happened. That feels like a bug. |
I can't make |
i'm looking into possible fixes for this |
Possible fix for #10282, #10655.
This introduces
readbytes(cmd::AsyncStream)
. Is it bad form to introduce new methods in a bugfix?No tests. Sorry.