Skip to content

Commit 9466628

Browse files
craig[bot]andreimatei
andcommitted
Merge #26716
26716: cli: use the right context for logging on signal r=andreimatei a=andreimatei We were using a long-gone context with a potentially finished span, leading to log-after-finish crashes. Fixes #26715 Release note: None Co-authored-by: Andrei Matei <andrei@cockroachlabs.com>
2 parents b4b0522 + 80afdb8 commit 9466628

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/cli/start.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ func runStart(cmd *cobra.Command, args []string) error {
764764
case sig := <-signalCh:
765765
// This new signal is not welcome, as it interferes with the graceful
766766
// shutdown process.
767-
log.Shout(ctx, log.Severity_ERROR, fmt.Sprintf(
767+
log.Shout(shutdownCtx, log.Severity_ERROR, fmt.Sprintf(
768768
"received signal '%s' during shutdown, initiating hard shutdown%s", sig, hardShutdownHint))
769769
handleSignalDuringShutdown(sig)
770770
panic("unreachable")

0 commit comments

Comments
 (0)