Skip to content

cmd/go,os: EAGAIN when writing to stdout/stderr during test #58408

@adob

Description

@adob

What version of Go are you using (go version)?

$ go version

go version go1.20 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build674872367=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Calls to fmt.Printf() during test fail with /dev/stdout: resource temporarily unavailable when printing long lines after part of the output has been printed. The output is truncated.

This can be worked around by passing the -bench flag to suppress output redirection during test execution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GoCommandcmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions