Skip to content

x/playground: exec.Cmd.StdoutPipe() example: all goroutines are asleep #71101

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

Closed
bfallik opened this issue Jan 3, 2025 · 2 comments
Closed
Milestone

Comments

@bfallik
Copy link

bfallik commented Jan 3, 2025

Go version

unknown

Output of go env in your module/workspace:

unknown

What did you do?

Ran the example code here: https://pkg.go.dev/os/exec#example-Cmd.StdoutPipe

What did you see happen?

Output:

fatal error: all goroutines are asleep - deadlock!

goroutine 1 [IO wait]:
internal/poll.runtime_pollWait(0x7ee60f415680, 0x72)
	/usr/local/go-faketime/src/runtime/netpoll.go:351 +0x85
internal/poll.(*pollDesc).wait(0xc000078240?, 0xc00010e000?, 0x1)
	/usr/local/go-faketime/src/internal/poll/fd_poll_runtime.go:84 +0x27
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/go-faketime/src/internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0xc000078240, {0xc00010e000, 0x200, 0x200})
	/usr/local/go-faketime/src/internal/poll/fd_unix.go:165 +0x27a
os.(*File).read(...)
	/usr/local/go-faketime/src/os/file_posix.go:29
os.(*File).Read(0xc00004c048, {0xc00010e000?, 0x28?, 0x512380?})
	/usr/local/go-faketime/src/os/file.go:124 +0x52
encoding/json.(*Decoder).refill(0xc00010c000)
	/usr/local/go-faketime/src/encoding/json/stream.go:165 +0x188
encoding/json.(*Decoder).readValue(0xc00010c000)
	/usr/local/go-faketime/src/encoding/json/stream.go:140 +0x85
encoding/json.(*Decoder).Decode(0xc00010c000, {0x4efe60, 0xc000010030})
	/usr/local/go-faketime/src/encoding/json/stream.go:63 +0x75
main.main()
	/tmp/sandbox2132264063/prog.go:23 +0x193

What did you expect to see?

Program output instead of the fatal error.

@gopherbot gopherbot added this to the Unreleased milestone Jan 3, 2025
@seankhliao
Copy link
Member

Duplicate of #41202

@seankhliao seankhliao marked this as a duplicate of #41202 Jan 3, 2025
@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants