-
-
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
improve TTY write buffering #6375
Comments
I am getting the same issue although I would actually change the title to include "memory corruption" or something.
destroys my runtime and terminal. |
I also encountered the issue. |
Notice my comment |
This is release-blocking. |
Removing the TTY write methods from base/stream.jl appears to fix this problem. But then the test output is screwed up,
This, in turn, seems to be fixed by diff --git a/base/multi.jl b/base/multi.jl
index 5eafe68..14cecab 100644
--- a/base/multi.jl
+++ b/base/multi.jl
@@ -1035,7 +1035,7 @@ function create_worker(privhost, port, pubhost, stream, config, manage)
@async begin
while !eof(stream)
line = readline(stream)
- print("\tFrom worker $(wrker.id):\t",bytestring(line))
+ print("\tFrom worker $(wrker.id):\t $line")
end
end
end |
@loladiro could you comment on @nolta 's above suggestion? |
Yeah, that would work fine. I haven't gotten a chance yet to look at what the hell libuv did to ttys, but that is certainly the right change if they are now not thread-blocking. |
This change has already been made: aadabde |
I think @JeffBezanson was referring to removing the TTY methods, which I don't think has happened yet. |
Ah, gotcha. On Tue, Apr 8, 2014 at 3:52 PM, Keno Fischer [email protected]:
|
Removing the TTY methods is ok, but the fix in multi.jl is not general --- other code that uses |
The action item here is to make use of libuvs capability to write multiple buffers in one write request and block on that. Might get to it tomorrow. |
moving this to 0.4, since the bug is fixed |
closing this since the original bug was fixed, the followup issue has been improved by adding locking to streams during IO, and further improvement is covered by #3887 |
Noticed initially in some code that printed lot of debug messages on to stdout.
The following results in occasional garbage being printed on the terminal (tried on macos and ubuntu):
Seems to work fine if printed on to a file instead.
The text was updated successfully, but these errors were encountered: