cmd/exec: Wait hangs on DragonflyBSD if child has a PTY that has been written to #56132
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
OS-Dragonfly
Milestone
What version of Go are you using (
go version
)?tip at 6a9aaf1
Does this issue reproduce with the latest release?
Yes,
1.19.2
What operating system and processor architecture are you using (
go env
)?dragonfly-amd64
. Specifically, thedragonfly-amd64-622
builder/gomote.go env
OutputWhat did you do?
Run
TestDragonfly
from CL 441916.This test:
posix_openpt
et al via cgo inos/signal/internal/pty
).Setsid
), process group (Setpgid
), setting the controlling terminal (Setctty
), and setting foreground (Foreground
) don't seem to make a difference either way, so the repro skips them.cmd.Wait
.What did you expect to see?
Test passes.
Note that TryBots passed on all other Unix OSes.
What did you see instead?
Test hangs, and eventually times out.
Specifically, the child exits (
CALL exit(0)
according to ktrace), but the parentwait6
call never returns. Full ktrace dump is attached here.This feels like an OS bug, though I attempted to recreate this in C (
dragonfly.c
in CL 441916) and was not able to reproduce. That said, there are some differences from Go, most notably that both the parent and child are multithreaded in Go.cc @golang/dragonfly
The text was updated successfully, but these errors were encountered: