From 98c2ca13c181580a9bf30274e6c1b1d9822d7059 Mon Sep 17 00:00:00 2001 From: Chelsea Mafrica Date: Thu, 16 Sep 2021 11:18:32 -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. Backport of #2662 Fixes #2663 Signed-off-by: Chelsea Mafrica --- src/runtime/containerd-shim-v2/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/containerd-shim-v2/service.go b/src/runtime/containerd-shim-v2/service.go index c3375bb915..d0dc439c1c 100644 --- a/src/runtime/containerd-shim-v2/service.go +++ b/src/runtime/containerd-shim-v2/service.go @@ -911,7 +911,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()