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

runtime: go scheduler for channel based threads. futex sleep issue #62451

Closed
kaushikdharamshi opened this issue Sep 5, 2023 · 2 comments
Closed
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@kaushikdharamshi
Copy link

kaushikdharamshi commented Sep 5, 2023

0x1df6179runtime.futexsleep
(0x10000000000runtime.goexit?(, )
0x0?#11, /usr/local/go/src/runtime/asm_amd64.s0x7ffc3068a1d8:?)
multiple threads are getting killed due to futex sleep

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

$ go version
kaushikdharamshi@Kaushiks-MacBook-Pro-2 POC % go version
go version go1.20.1 darwin/arm64

Does this issue reproduce with the latest release?

it showed this issue since go 18.4

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

GOARCH="arm64"

go env Output
$ go env
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/kaushikdharamshi/Library/Caches/go-build"
GOENV="/Users/kaushikdharamshi/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/kaushikdharamshi/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/kaushikdharamshi/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.20.1"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/xx/j0rm66cx2vb7b1hkkc8j94lm0000gn/T/go-build1780489082=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

we created 150 threads using go channels and we also checked no threads are not interrelated or creating a deadlock but somehow it is enting in futex sleep

logs :
0x1df6179runtime.futexsleep
(0x10000000000runtime.goexit?(, )
0x0?#11, /usr/local/go/src/runtime/asm_amd64.s0x7ffc3068a1d8:?) 1571#011 +/usr/local/go/src/runtime/os_linux.go0x1:66 fp= +0xc0004c1fe80x36 sp=
0xc0004c1fe0runtime.notesleep pc=(0x1d968810x7a03dc8

#011created by /usr/local/go/src/runtime/lock_futex.goos/signal.Notify.func1.1:
159 +#0110x87/usr/local/go/src/os/signal/signal.go
:runtime.mPark151(...)
+#11/usr/local/go/src/runtime/proc.go0x2a:
runtime.stopmgoroutine (1)
[#011chan receive/usr/local/go/src/runtime/proc.go, :2228212781 + minutes0x8d]:

What did you expect to see?

this should not crash the application.

What did you see instead?

restarts the appplication

@ianlancetaylor ianlancetaylor changed the title affected/package: go scheduler for channel based threads. futex sleep issue runtime: go scheduler for channel based threads. futex sleep issue Sep 5, 2023
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Sep 5, 2023
@ianlancetaylor
Copy link
Member

Please tell us exactly what you did and exactly what happened. Thanks.

It's normal to see most threads in futexsleep. That is not a problem in itself.

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

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

@gopherbot gopherbot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 5, 2023
@golang golang locked and limited conversation to collaborators Oct 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants