diff --git a/pkg/util/stop/BUILD.bazel b/pkg/util/stop/BUILD.bazel index 6e471916a2cb..e7fb967bbe2c 100644 --- a/pkg/util/stop/BUILD.bazel +++ b/pkg/util/stop/BUILD.bazel @@ -8,6 +8,7 @@ go_library( deps = [ "//pkg/kv/kvpb", "//pkg/util/debugutil", + "//pkg/util/growstack", "//pkg/util/leaktest", "//pkg/util/log", "//pkg/util/log/logcrash", diff --git a/pkg/util/stop/stopper.go b/pkg/util/stop/stopper.go index 99933c479c37..50dd17e489ca 100644 --- a/pkg/util/stop/stopper.go +++ b/pkg/util/stop/stopper.go @@ -16,6 +16,7 @@ import ( "github.com/cockroachdb/cockroach/pkg/kv/kvpb" "github.com/cockroachdb/cockroach/pkg/util/debugutil" + "github.com/cockroachdb/cockroach/pkg/util/growstack" "github.com/cockroachdb/cockroach/pkg/util/leaktest" "github.com/cockroachdb/cockroach/pkg/util/log" "github.com/cockroachdb/cockroach/pkg/util/log/logcrash" @@ -486,6 +487,7 @@ func (s *Stopper) RunAsyncTaskEx(ctx context.Context, opt TaskOpts, f func(conte // Call f on another goroutine. taskStarted = true // Another goroutine now takes ownership of the alloc, if any. go func(taskName string) { + growstack.Grow() defer s.runPostlude() defer s.startRegion(ctx, taskName).End() defer sp.Finish()