diff --git a/pkg/util/tracing/bench_test.go b/pkg/util/tracing/bench_test.go index 3678fa0a4aac..8f8d7d6a95ec 100644 --- a/pkg/util/tracing/bench_test.go +++ b/pkg/util/tracing/bench_test.go @@ -15,6 +15,7 @@ import ( "fmt" "testing" + "github.com/cockroachdb/cockroach/pkg/testutils/skip" "github.com/cockroachdb/logtags" "github.com/gogo/protobuf/types" ) @@ -25,6 +26,7 @@ import ( // This benchmark explicitly excludes construction of // the SpanOptions, which require allocations as well. func BenchmarkTracer_StartSpanCtx(b *testing.B) { + skip.UnderDeadlock(b, "span reuse triggers false-positives in the deadlock detector") ctx := context.Background() staticLogTags := logtags.Buffer{} @@ -103,6 +105,7 @@ func BenchmarkSpan_GetRecording(b *testing.B) { } func BenchmarkRecordingWithStructuredEvent(b *testing.B) { + skip.UnderDeadlock(b, "span reuse triggers false-positives in the deadlock detector") tr := NewTracerWithOpt(context.Background(), WithTracingMode(TracingModeActiveSpansRegistry), WithSpanReusePercent(100)) @@ -121,6 +124,7 @@ func BenchmarkRecordingWithStructuredEvent(b *testing.B) { // BenchmarkSpanCreation creates traces with a couple of spans in them. func BenchmarkSpanCreation(b *testing.B) { + skip.UnderDeadlock(b, "span reuse triggers false-positives in the deadlock detector") tr := NewTracerWithOpt(context.Background(), WithTracingMode(TracingModeActiveSpansRegistry), WithSpanReusePercent(100)) diff --git a/pkg/util/tracing/tracer_external_test.go b/pkg/util/tracing/tracer_external_test.go index 56785cade0a7..8dea18c13810 100644 --- a/pkg/util/tracing/tracer_external_test.go +++ b/pkg/util/tracing/tracer_external_test.go @@ -32,6 +32,7 @@ import ( func TestSpanPooling(t *testing.T) { defer leaktest.AfterTest(t)() skip.UnderRace(t, "sync.Pool seems to be emptied very frequently under race, making the test unreliable") + skip.UnderDeadlock(t, "span reuse triggers false-positives in the deadlock detector") defer log.Scope(t).Close(t) ctx := context.Background() tr := tracing.NewTracerWithOpt(ctx, diff --git a/pkg/util/tracing/tracer_test.go b/pkg/util/tracing/tracer_test.go index 4f0a459c2991..3039db22a1fe 100644 --- a/pkg/util/tracing/tracer_test.go +++ b/pkg/util/tracing/tracer_test.go @@ -718,6 +718,7 @@ func TestChildNeedsSameTracerAsParent(t *testing.T) { // one. func TestSpanReuse(t *testing.T) { skip.UnderRace(t, "sync.Pool seems to be emptied very frequently under race, making the test unreliable") + skip.UnderDeadlock(t, "span reuse triggers false-positives in the deadlock detector") ctx := context.Background() tr := NewTracerWithOpt(ctx, // Ask the tracer to always reuse spans, overriding the testing's