-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
api: spannerIssues related to the Spanner API.Issues related to the Spanner API.triage meI really want to be triaged.I really want to be triaged.
Description
Client
Spanner
Environment
On Local Machine(Mac OSX 14.5(23F79))
Go Environment
$ go version
go version go1.22.3 darwin/arm64
go env
$ go env GO111MODULE='' GOARCH='arm64' GOBIN='' GOCACHE='/Users/iwata/Library/Caches/go-build' GOENV='/Users/iwata/Library/Application Support/go/env' GOEXE='' GOEXPERIMENT='' GOFLAGS='' GOHOSTARCH='arm64' GOHOSTOS='darwin' GOINSECURE='' GOMODCACHE='/Users/iwata/.go/pkg/mod' GONOPROXY='github.com/kouzoh*' GONOSUMDB='github.com/kouzoh*' GOOS='darwin' GOPATH='/Users/iwata/.go' GOPRIVATE='github.com/kouzoh*' GOPROXY='https://proxy.golang.org,direct' GOROOT='/opt/homebrew/opt/go/libexec' GOSUMDB='sum.golang.org' GOTMPDIR='' GOTOOLCHAIN='auto' GOTOOLDIR='/opt/homebrew/opt/go/libexec/pkg/tool/darwin_arm64' GOVCS='' GOVERSION='go1.22.3' GCCGO='gccgo' AR='ar' CC='cc' CXX='c++' CGO_ENABLED='1' GOMOD='/Users/iwata/ghq/github.com/kouzoh-mercoin/monorail-contrib/go.mod' 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 -ffile-prefix-map=/var/folders/2g/zplffj9d6z79_t1h6wbfkf240000gp/T/go-build852356415=/tmp/go-build -gno-record-gcc-switches -fno-common'Expected behavior
No race condition
Actual behavior
detects race condition sometimes
Logs
Write
Write at 0x00c000d389e8 by goroutine 1132:
cloud.google.com/go/spanner.(*sessionPool).newSessionHandle()
/home/runner/go/pkg/mod/cloud.google.com/go/spanner@v1.63.0/session.go:931 +0x68b
cloud.google.com/go/spanner.(*sessionPool).take()
/home/runner/go/pkg/mod/cloud.google.com/go/spanner@v1.63.0/session.go:1067 +0xa19
cloud.google.com/go/spanner.(*ReadOnlyTransaction).acquireSingleUse()
/home/runner/go/pkg/mod/cloud.google.com/go/spanner@v1.63.0/transaction.go:821 +0x5a5
cloud.google.com/go/spanner.(*ReadOnlyTransaction).acquire()
/home/runner/go/pkg/mod/cloud.google.com/go/spanner@v1.63.0/transaction.go:798 +0x7b
cloud.google.com/go/spanner.(*txReadOnly).prepareExecuteSQL()
/home/runner/go/pkg/mod/cloud.google.com/go/spanner@v1.63.0/transaction.go:572 +0x8a
cloud.google.com/go/spanner.(*txReadOnly).query()
/home/runner/go/pkg/mod/cloud.google.com/go/spanner@v1.63.0/transaction.go:526 +0x1af
cloud.google.com/go/spanner.(*txReadOnly).QueryWithOptions()
/home/runner/go/pkg/mod/cloud.google.com/go/spanner@v1.63.0/transaction.go:482 +0x1de
...
Read
Previous read at 0x00c000d389e8 by goroutine 1232:
cloud.google.com/go/spanner.(*sessionPool).getTrackedSessionHandleStacksLocked()
/home/runner/go/pkg/mod/cloud.google.com/go/spanner@v1.63.0/session.go:980 +0x1b8
cloud.google.com/go/spanner.(*sessionPool).errGetSessionTimeoutWithTrackedSessionHandles()
/home/runner/go/pkg/mod/cloud.google.com/go/spanner@v1.63.0/session.go:964 +0x58
cloud.google.com/go/spanner.(*sessionPool).errGetSessionTimeout()
/home/runner/go/pkg/mod/cloud.google.com/go/spanner@v1.63.0/session.go:947 +0xc5
cloud.google.com/go/spanner.(*sessionPool).take()
/home/runner/go/pkg/mod/cloud.google.com/go/spanner@v1.63.0/session.go:1094 +0xd04
cloud.google.com/go/spanner.(*ReadOnlyTransaction).acquireSingleUse()
/home/runner/go/pkg/mod/cloud.google.com/go/spanner@v1.63.0/transaction.go:821 +0x5a5
cloud.google.com/go/spanner.(*ReadOnlyTransaction).acquire()
/home/runner/go/pkg/mod/cloud.google.com/go/spanner@v1.63.0/transaction.go:798 +0x7b
cloud.google.com/go/spanner.(*txReadOnly).prepareExecuteSQL()
/home/runner/go/pkg/mod/cloud.google.com/go/spanner@v1.63.0/transaction.go:572 +0x8a
cloud.google.com/go/spanner.(*txReadOnly).query()
/home/runner/go/pkg/mod/cloud.google.com/go/spanner@v1.63.0/transaction.go:526 +0x1af
cloud.google.com/go/spanner.(*txReadOnly).Query()
/home/runner/go/pkg/mod/cloud.google.com/go/spanner@v1.63.0/transaction.go:470 +0x173
...
Additional context
I'm using cloud.google.com/go/spanner@v1.63.0
.
Here is my SessionPoolConfig
.
spanner.SessionPoolConfig{
TrackSessionHandles: true,
InactiveTransactionRemovalOptions: spanner.InactiveTransactionRemovalOptions{
ActionOnInactiveTransaction: spanner.WarnAndClose,
},
}
Metadata
Metadata
Assignees
Labels
api: spannerIssues related to the Spanner API.Issues related to the Spanner API.triage meI really want to be triaged.I really want to be triaged.