cockroachdb / cockroachdb/cockroach
ccl/sqlproxyccl: TestCancelQuery failed
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
ccl/sqlproxyccl.TestCancelQuery [failed](https://mesolite.cluster.engflow.com/invocations/default/20c3a546-0683-413f-8782-5632202dea3d?testReportRun=1&testReportShard=7&testReportAttempt=1#targets-Ly9wa2cvY2NsL3NxbHByb3h5Y2NsOnNxbHByb3h5Y2NsX3Rlc3Q=) on release-24.3.29-rc @ [355b8510991b454c416545fe638388d9dc861576](https://github.com/cockroachdb/cockroach/commits/355b8510991b454c416545fe638388d9dc861576):
```
github.com/cockroachdb/cockroach/pkg/ccl/sqlproxyccl.(*forwarder).TransferConnection()
pkg/ccl/sqlproxyccl/conn_migration.go:149 +0x11b
github.com/cockroachdb/cockroach/pkg/ccl/sqlproxyccl/balancer.(*Balancer).processQueue.func1.1()
pkg/ccl/sqlproxyccl/balancer/balancer.go:371 +0x267
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2()
pkg/util/stop/stopper.go:498 +0x338
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx.gowrap1()
pkg/util/stop/stopper.go:499 +0x4f
Previous write at 0x000012b18d48 by goroutine 4915:
reflect.typedmemmove()
GOROOT/src/runtime/mbarrier.go:203 +0x0
reflect.Value.Set()
GOROOT/src/reflect/value.go:2330 +0x184
github.com/cockroachdb/cockroach/pkg/testutils.TestingHook.func1()
pkg/testutils/hook.go:18 +0x70
runtime.deferreturn()
GOROOT/src/runtime/panic.go:602 +0x5d
testing.tRunner()
GOROOT/src/testing/testing.go:1689 +0x21e
testing.(*T).Run.gowrap1()
GOROOT/src/testing/testing.go:1742 +0x44
Goroutine 4918 (running) created at:
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx()
pkg/util/stop/stopper.go:488 +0x785
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTask()
pkg/util/stop/stopper.go:359 +0x1ef
github.com/cockroachdb/cockroach/pkg/ccl/sqlproxyccl/balancer.(*Balancer).processQueue.func1()
pkg/ccl/sqlproxyccl/balancer/balancer.go:363 +0xc0
github.com/cockroachdb/cockroach/pkg/ccl/sqlproxyccl/balancer.(*Balancer).processQueue()
pkg/ccl/sqlproxyccl/balancer/balancer.go:386 +0xa5
github.com/cockroachdb/cockroach/pkg/ccl/sqlproxyccl/balancer.(*Balancer).processQueue-fm()
:1 +0x47
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2()
pkg/util/stop/stopper.go:498 +0x338
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx.gowrap1()
pkg/util/stop/stopper.go:499 +0x4f
Goroutine 4915 (finished) created at:
testing.(*T).Run()
GOROOT/src/testing/testing.go:1742 +0x825
github.com/cockroachdb/cockroach/pkg/ccl/sqlproxyccl.TestCancelQuery()
pkg/ccl/sqlproxyccl/proxy_handler_test.go:1724 +0x1cde
testing.tRunner()
GOROOT/src/testing/testing.go:1689 +0x21e
testing.(*T).Run.gowrap1()
GOROOT/src/testing/testing.go:1742 +0x44
==================
=== RUN TestCancelQuery/cancel_after_migrating_a_session
```
Parameters:
- attempt=1
- race=true
- run=1
- shard=7
Help
See also: [How To Investigate a Go Test Failure \(internal\)](https://cockroachlabs.atlassian.net/l/c/HgfXfJgM)
/cc @cockroachdb/sqlproxy-prs @cockroachdb/server
[This test on roachdash](https://roachdash.crdb.dev/?filter=status:open%20t:.*TestCancelQuery.*&sort=title+created&display=lastcommented+project) | [Improve this report!](https://github.com/cockroachdb/cockroach/tree/master/pkg/cmd/bazci/githubpost/issues)
Jira issue: CRDB-61115
Contributor guide
Research direction
Start by reproducing ccl/sqlproxyccl.TestCancelQuery with the race detector, focusing on the cancel-after-migrating-a-session case in pkg/ccl/sqlproxyccl/proxy_handler_test.go. Read the reported paths in conn_migration.go, balancer/balancer.go, and testutils/hook.go to trace the conflicting access. Done means the test passes without a race report.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100