-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
os: panic on short write in fd_unix.go #22522
Comments
I'm a little weirded out by the "short write" error too. Surely |
This issue looks very similar to #22102 |
@sigmonsays Can you show us the strace output so we can see precisely how the I think this can only happen if |
write system call trace snipped below, will attach also
|
A clarification on the previous strace.txt file because I changed the example code. The panic occurs with both data larger and smaller. The strace uses data := []byte("Hello\n") and the example uses data = []byte("A\n") |
The strace shows the problem.
The program called |
Closing as dup of #22102. |
how is a panic acceptable behavior in this case? |
Is it really worth adding a specific test for |
For what it's worth, POSIX specifically forbids
-- http://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html |
What version of Go are you using (
go version
)?go 1.9
Does this issue reproduce with the latest release?
reproduced in 1.9, properly returns an error "short write" on 1.8
What operating system and processor architecture are you using (
go env
)?linux, x86 64
What did you do?
example code
What did you expect to see?
a error returned instead of a panic
What did you see instead?
panic
The text was updated successfully, but these errors were encountered: