Skip to content

os,internal/poll: reads from closed pipes sometimes do not unblock on darwin #63937

@bcmills

Description

@bcmills
#!watchflakes
post <- goos == "darwin" && log ~ `os/exec\.\(\*Cmd\)\.awaitGoroutines` && log ~ `internal/poll\.\(\*pollDesc\)\.waitRead` &&
	!(builder ~ `(gotip|go1\.\d\d)-` && date < "2024-01-18")

We have been tracking a long-running bug on macOS (darwin) in #54461 (comment). That issue title doesn't accurately capture the widespread nature of the problem, nor its defining symptom or suspected root cause; so, I am filing a new issue for it.

On macOS, we see a pattern of test failures with the following characteristics:

Many of these bugs have been worked around by explicitly canceling (or adding a timeout to) the stuck read.

The issues with this symptom have included:

A few other issues may be related but don't (or didn't) include goroutine dumps for the stuck process: they may or may not be due to this failure mode.

Given the symptoms, it seems likely to me that this is either a bug in internal/poll, or a bug in the macOS platform that we have somehow started to trigger.

Note that #61779 was bisected specifically to https://go.dev/cl/420334.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.OS-Darwincompiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    Status

    Todo

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions