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

sql: test flakes in TestLogic due to use of Span after Finish #95501

Closed
knz opened this issue Jan 19, 2023 · 2 comments
Closed

sql: test flakes in TestLogic due to use of Span after Finish #95501

knz opened this issue Jan 19, 2023 · 2 comments
Labels
A-sql-execution Relating to SQL execution. A-tracing Relating to tracing in CockroachDB. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. C-test-failure Broken test (automatically or manually discovered). T-sql-queries SQL Queries Team

Comments

@knz
Copy link
Contributor

knz commented Jan 19, 2023

Found here: https://teamcity.cockroachdb.com/buildConfiguration/Cockroach_BazelEssentialCi/8366413?showRootCauses=false&expandBuildChangesSection=true&expandBuildProblemsSection=true&expandBuildTestsSection=true

panic: use of Span after Finish. Span: setup-flow-async. Finish previously called at: <stack not captured. Set debugUseAfterFinish> [recovered]
  panic: use of Span after Finish. Span: setup-flow-async. Finish previously called at: <stack not captured. Set debugUseAfterFinish>
goroutine 236 [running]:
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).recover(0xc0083fb3c8?, {0x6145a28, 0xc000c045d0})
  github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:229 +0x6a
panic({0x449b620, 0xc002a4a340})
  GOROOT/src/runtime/panic.go:884 +0x212
github.com/cockroachdb/cockroach/pkg/util/tracing.(*Span).detectUseAfterFinish(0xc0041001e0?)
  github.com/cockroachdb/cockroach/pkg/util/tracing/span.go:181 +0x12b
github.com/cockroachdb/cockroach/pkg/util/tracing.(*Tracer).startSpanGeneric(0xc00017cd20, {0x61631c8, 0x8cf9090}, {0x4e01326, 0x2b}, {{0x0}, 0x0, {0x0, 0x0, {{0x0, ...}, ...}, ...}, ...})
  github.com/cockroachdb/cockroach/pkg/util/tracing/tracer.go:1221 +0xa4e
github.com/cockroachdb/cockroach/pkg/util/tracing.(*Tracer).StartSpanCtx(0xc006f7c000?, {0x61631c8?, 0x8cf9090?}, {0x4e01326?, 0x2b?}, {0xc001a83c58?, 0x2?, 0xc0025b1690?})
  github.com/cockroachdb/cockroach/pkg/util/tracing/tracer.go:1075 +0xe7
github.com/cockroachdb/cockroach/pkg/util/tracing.(*Tracer).StartSpan(...)
  github.com/cockroachdb/cockroach/pkg/util/tracing/tracer.go:959
github.com/cockroachdb/cockroach/pkg/util/tracing/grpcinterceptor.ClientInterceptor.func2({0x6145a28, 0xc003962540}, {0x4e01326, 0x2b}, {0x4b700e0, 0xc002030600}, {0x4b70220, 0xc002550738}, 0xc003962540?, 0x501ffb0, ...)
  github.com/cockroachdb/cockroach/pkg/util/tracing/grpcinterceptor/grpc_interceptor.go:233 +0x233
google.golang.org/grpc.(*ClientConn).Invoke(0xc0051fa5a8?, {0x6145a28?, 0xc003962540?}, {0x4e01326?, 0x0?}, {0x4b700e0?, 0xc002030600?}, {0x4b70220?, 0xc002550738?}, {0x0, ...})
  google.golang.org/grpc/external/org_golang_google_grpc/call.go:35 +0x223
github.com/cockroachdb/cockroach/pkg/sql/execinfrapb.(*distSQLClient).SetupFlow(0xc001a83e00, {0x6145a28, 0xc003962540}, 0xc001a83e8c?, {0x0, 0x0, 0x0})
  github.com/cockroachdb/cockroach/pkg/sql/execinfrapb/bazel-out/k8-fastbuild/bin/pkg/sql/execinfrapb/execinfrapb_go_proto_/github.com/cockroachdb/cockroach/pkg/sql/execinfrapb/api.pb.go:499 +0xc9
github.com/cockroachdb/cockroach/pkg/sql.runnerRequest.run({{0x6145a28, 0xc003962540}, 0xc000d22700, 0xc002030600, 0x2, 0xc005d69c80})
  github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:111 +0x10e
github.com/cockroachdb/cockroach/pkg/sql.(*runnerCoordinator).init.func1({0xc00197b400, 0x792b203030303030})
  github.com/cockroachdb/cockroach/pkg/sql/distsql_running.go:146 +0x8f
github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx.func2()
  github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:470 +0x146
created by github.com/cockroachdb/cockroach/pkg/util/stop.(*Stopper).RunAsyncTaskEx
  github.com/cockroachdb/cockroach/pkg/util/stop/stopper.go:461 +0x43b

cc @andreimatei @yuzefovich for triage.

Jira issue: CRDB-23555

@knz knz added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. C-test-failure Broken test (automatically or manually discovered). A-sql-execution Relating to SQL execution. A-tracing Relating to tracing in CockroachDB. labels Jan 19, 2023
@blathers-crl blathers-crl bot added the T-sql-queries SQL Queries Team label Jan 19, 2023
@mgartner
Copy link
Collaborator

I believe @yuzefovich merged a fix for this last night.

@yuzefovich
Copy link
Member

fixed by #95482

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-execution Relating to SQL execution. A-tracing Relating to tracing in CockroachDB. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. C-test-failure Broken test (automatically or manually discovered). T-sql-queries SQL Queries Team
Projects
Archived in project
Development

No branches or pull requests

3 participants