We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
go version
$ go version 1.7.3
Can't reproduce
go env
Linux 3.10.0-327.36.58.4.x86_64 #1 SMP x86_64 GNU/Linux
$ go env GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/root/gopath" GORACE="" GOROOT="/usr/lib/golang" GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64" GCCGO="/usr/bin/gccgo" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build779701576=/tmp/go-build -gno-record-gcc-switches" CXX="g++" CGO_ENABLED="1" PKG_CONFIG="pkg-config" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2"
Loop creation process: for i := 0; i < 1000; i++ { cmd[i] = exec.Command("sleep", "1") err := cmd[i].Start() if err != nil { fmt.Println("start process error:", err) os.Exit(2) } } for i := 0; i < 1000; i++ { err := cmd[i].Wait() if err != nil { fmt.Println("wait error:", err) os.Exit(3) } }
Successfully created 1000 processes
errmsg: fork/exec:broken pipe:""
View the source code, found that the error code may be as follows:
2)func forkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err error) maybe return epipe from:https://github.com/golang/go/blob/release-branch.go1.7/src/syscall/exec_unix.go + 209
Close(p[1]) n, err = readlen(p[0], (*byte)(unsafe.Pointer(&err1)), int(unsafe.Sizeof(err1))) Close(p[0]) if err != nil || n != 0 { if n == int(unsafe.Sizeof(err1)) { err = Errno(err1) } if err == nil { err = EPIPE //The error can happen here } // Child failed; wait for it to exit, to make sure // the zombies don't accumulate. _, err1 := Wait4(pid, &wstatus, 0, nil) for err1 == EINTR { _, err1 = Wait4(pid, &wstatus, 0, nil) } return 0, err } // Read got EOF, so pipe closed on exec, so exec succeeded. return pid, nil
Now I can't reproduce the error. Can you tell me what scenes might return this error when reading pipe?
The text was updated successfully, but these errors were encountered:
Go 1.7 is no longer supported.
I was unable to reproduce the problem with either Go 1.7 or tip.
Sorry, something went wrong.
Timed out in state WaitingForInfo. Closing.
(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)
No branches or pull requests
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Can't reproduce
What operating system and processor architecture are you using (
go env
)?Linux 3.10.0-327.36.58.4.x86_64 #1 SMP x86_64 GNU/Linux
go env
OutputWhat did you do?
Loop creation process:
for i := 0; i < 1000; i++ {
cmd[i] = exec.Command("sleep", "1")
err := cmd[i].Start()
if err != nil {
fmt.Println("start process error:", err)
os.Exit(2)
}
}
for i := 0; i < 1000; i++ {
err := cmd[i].Wait()
if err != nil {
fmt.Println("wait error:", err)
os.Exit(3)
}
}
What did you expect to see?
Successfully created 1000 processes
What did you see instead?
errmsg:
fork/exec:broken pipe:""
View the source code, found that the error code may be as follows:
from: https://github.com/golang/go/blob/release-branch.go1.7/src/os/exec_posix.go +47
pid, h, e := syscall.StartProcess(name, argv, sysattr)
if e != nil {
return nil, &PathError{"fork/exec", name, e}
}
2)func forkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err error) maybe return epipe
from:https://github.com/golang/go/blob/release-branch.go1.7/src/syscall/exec_unix.go + 209
Now I can't reproduce the error. Can you tell me what scenes might return this error when reading pipe?
The text was updated successfully, but these errors were encountered: