From 39cd05e0bbf12f4d0f11c7328a01d133ff036860 Mon Sep 17 00:00:00 2001 From: Chelsea Mafrica Date: Thu, 16 Sep 2021 11:10:02 -0700 Subject: [PATCH] runtime: tracing: Use root context to stop tracing Call StopTracing with s.rootCtx, which is the root context for tracing, instead of s.ctx, which is parent to a subset of trace spans. Fixes #2661 Signed-off-by: Chelsea Mafrica --- src/runtime/pkg/containerd-shim-v2/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/pkg/containerd-shim-v2/service.go b/src/runtime/pkg/containerd-shim-v2/service.go index 40a9ecb85f..b17266efac 100644 --- a/src/runtime/pkg/containerd-shim-v2/service.go +++ b/src/runtime/pkg/containerd-shim-v2/service.go @@ -940,7 +940,7 @@ func (s *service) Shutdown(ctx context.Context, r *taskAPI.ShutdownRequest) (_ * s.mu.Unlock() span.End() - katatrace.StopTracing(s.ctx) + katatrace.StopTracing(s.rootCtx) s.cancel()