Skip to content

Commit 0da720f

Browse files
authored
Hot fix to avoid process to block indefinitely on shutdown (#4134)
* Hot fix to avoid process to block indefinitely on shutdown Signed-off-by: Marco Pracucci <[email protected]> * Added CHANGELOG entry Signed-off-by: Marco Pracucci <[email protected]>
1 parent c724737 commit 0da720f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
* [BUGFIX] Frontend, Query-scheduler: allow querier to notify about shutdown without providing any authentication. #4066
7474
* [BUGFIX] Querier: fixed race condition causing queries to fail right after querier startup with the "empty ring" error. #4068
7575
* [BUGFIX] Compactor: Increment `cortex_compactor_runs_failed_total` if compactor failed compact a single tenant. #4094
76+
* [BUGFIX] Tracing: hot fix to avoid the Jaeger tracing client to indefinitely block the Cortex process shutdown in case the HTTP connection to the tracing backend is blocked. #4134
7677

7778
## Blocksconvert
7879

cmd/cortex/main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,10 @@ func main() {
153153
}
154154

155155
// Setting the environment variable JAEGER_AGENT_HOST enables tracing.
156-
if trace, err := tracing.NewFromEnv(name); err != nil {
156+
// Do NOT call trace.Close() because of an known issue which could cause the process to block indefinitely
157+
// on shutdown. See: https://github.com/jaegertracing/jaeger-client-go/issues/577
158+
if _, err := tracing.NewFromEnv(name); err != nil {
157159
level.Error(util_log.Logger).Log("msg", "Failed to setup tracing", "err", err.Error())
158-
} else {
159-
defer trace.Close()
160160
}
161161
}
162162

0 commit comments

Comments
 (0)