Skip to content
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

x/sync/singleflight: hard to verify package won't crash program #60060

Closed
bobby-stripe opened this issue May 8, 2023 · 2 comments
Closed

x/sync/singleflight: hard to verify package won't crash program #60060

bobby-stripe opened this issue May 8, 2023 · 2 comments
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@bobby-stripe
Copy link

bobby-stripe commented May 8, 2023

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

$ go version
go version go1.19.8 darwin/arm64

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
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/bobby/Library/Caches/go-build"
GOENV="/Users/bobby/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/bobby/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/bobby/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/homebrew/Cellar/go@1.19/1.19.8/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/homebrew/Cellar/go@1.19/1.19.8/libexec/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.19.8"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/bobby/go/src/golang.org/x/sync/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/n9/5v96tjj94738f5qrbj_lfw780000gn/T/go-build3674175445=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

singleflight contains a go panic(e) line. It took a very long time to convince outselves that we wouldn't result in a program crash when using singleflight.Group.Do().

What did you expect to see?

Simpler control flow and/or comments :)

What did you see instead?

The code as exists today.

@gopherbot gopherbot added this to the Unreleased milestone May 8, 2023
@gopherbot
Copy link

Change https://go.dev/cl/493716 mentions this issue: singleflight: simplify logic around panic

@seankhliao seankhliao added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label May 9, 2023
@gopherbot
Copy link

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants