trace: update tracing-subscriber to 0.2.0-alpha.5#423
Conversation
This includes hawkw/sharded-slab@dfdd7ae, which fixes a memory leak in the slab used for storing per-span data. I've done some testing, and proxy RSS under load seems pretty stable after the update. Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
|
Hmm... does this break log formatting? I see log lines like after enabling trace logging |
|
Hmm, I'm also seeing some weird behavior with the log env... logs trace events for metrics modules |
|
@olix0r the trace events in |
hmm...that looks wrong to me — I didn't see this while testing, but I'll have to take another look? Edit: hmm, everything looks fine for me: |
|
Also... did the formatter change to no longer format levels as 4-char strings? We now see |
|
@olix0r whoops, I thought that our old custom formatter was identical to the default except for the (no longer used) custom logging contexts, but I had forgotten we formatted levels differently. FWIW, the default formatter should left-pad 4-character levels like INFO and WARN already. I can re-add a custom formatter to make it identical to the old formatting, though! |
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
ugh, apparently it only does that when ANSI colors are enabled? that looks like a bug upstream |
|
tokio-rs/tracing#560 should fix any wrong formatting with ansi colors turned off |
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
|
@olix0r I've published a new |
|
I've tested this and don't see any of the issues I reported earlier |
This release fixes a bug in the proxy's logging subsystem that could cause the proxy to consume memory until the process is OOMKilled, especially when the proxy was configured to log diagnostic information. The proxy also now properly emits `grpc-status` headers when signaling proxy errors to gRPC clients. This release upgrades the proxy's Rust version, the `http` crate dependency to address RUSTSEC-2019-0033 and RUSTSEC-2019-0034, and the `prost` crate dependency has been patched to address RUSTSEC-2020-02. --- * internal: Introduce a locking middleware (linkerd/linkerd2-proxy#408) * Update to Rust 1.40 with new Cargo.lock format (linkerd/linkerd2-proxy#410) * Update http to v0.1.21 (linkerd/linkerd2-proxy#412) * internal: Split retry, http-classify, and http-metrics (linkerd/linkerd2-proxy#409) * Actually update http to v0.1.21 (linkerd/linkerd2-proxy#413) * patch `prost` 0.5 to pick up security fix (linkerd/linkerd2-proxy#414) * metrics: Make Counter & Gauge atomic (linkerd/linkerd2-proxy#415) * Set grpc-status headers on dispatch errors (linkerd/linkerd2-proxy#416) * trace: update `tracing-subscriber` to 0.2.0-alpha.4 (linkerd/linkerd2-proxy#418) * discover: Warn on discovery error (linkerd/linkerd2-proxy#422) * router: Avoid large up-front allocations (linkerd/linkerd2-proxy#421) * errors: Set correct HTTP version on responses (linkerd/linkerd2-proxy#424) * app: initialize tracing prior to parsing env vars (linkerd/linkerd2-proxy#425) * trace: update tracing-subscriber to 0.2.0-alpha.6 (linkerd/linkerd2-proxy#423)
This release fixes a bug in the proxy's logging subsystem that could cause the proxy to consume memory until the process is OOMKilled, especially when the proxy was configured to log diagnostic information. The proxy also now properly emits `grpc-status` headers when signaling proxy errors to gRPC clients. This release upgrades the proxy's Rust version, the `http` crate dependency to address RUSTSEC-2019-0033 and RUSTSEC-2019-0034, and the `prost` crate dependency has been patched to address RUSTSEC-2020-02. --- * internal: Introduce a locking middleware (linkerd/linkerd2-proxy#408) * Update to Rust 1.40 with new Cargo.lock format (linkerd/linkerd2-proxy#410) * Update http to v0.1.21 (linkerd/linkerd2-proxy#412) * internal: Split retry, http-classify, and http-metrics (linkerd/linkerd2-proxy#409) * Actually update http to v0.1.21 (linkerd/linkerd2-proxy#413) * patch `prost` 0.5 to pick up security fix (linkerd/linkerd2-proxy#414) * metrics: Make Counter & Gauge atomic (linkerd/linkerd2-proxy#415) * Set grpc-status headers on dispatch errors (linkerd/linkerd2-proxy#416) * trace: update `tracing-subscriber` to 0.2.0-alpha.4 (linkerd/linkerd2-proxy#418) * discover: Warn on discovery error (linkerd/linkerd2-proxy#422) * router: Avoid large up-front allocations (linkerd/linkerd2-proxy#421) * errors: Set correct HTTP version on responses (linkerd/linkerd2-proxy#424) * app: initialize tracing prior to parsing env vars (linkerd/linkerd2-proxy#425) * trace: update tracing-subscriber to 0.2.0-alpha.6 (linkerd/linkerd2-proxy#423)
Version 0.0.7 of
sharded-slabcontains a bug where, when theremovemethod is called with the index of a slot that is not being accessed
concurrently, the slot is emptied but not placed on the free list.
This issue meant that, under
tracing-subscriber's usage pattern, whereslab entries are almost always uncontended when reused, allocated slab
pages are almost never reused, resulting in unbounded slab growth over
time (i.e. a memory leak).
This commit updates
tracing-subscriber' to version 0.2.0-alpha.6,which in turn bumps the
sharded-slabdependency to v0.0.8, whichincludes commit hawkw/sharded-slab@dfdd7ae. That commit fixes this bug.
I've empirically verified that, after running
linkerd2-proxyunderload with a global
tracefilter that enables a lot of spans, heapusage remains stable, and the characteristic stair-step heap growth
pattern of doubling slab allocations doesn't occur. This indicates that
freed slots are actually being reused, and (once fully warmed up), the
slab will only grow when the number of active spans in the system
increases.
Closes linkerd/linkerd2#3998
Signed-off-by: Eliza Weisman eliza@buoyant.io