Skip to content

Label leaking of thread metrics #11195

@5kbpers

Description

@5kbpers

Bug Report

Here we buffered all labels (thread IDs), then labels can not be dropped even if threads have been exited.

struct Metrics {
cpu_totals: CounterVec,
io_totals: CounterVec,
threads_state: IntGaugeVec,
voluntary_ctxt_switches: IntCounterVec,
nonvoluntary_ctxt_switches: IntCounterVec,
}
/// A collector to collect threads metrics, including CPU usage
/// and threads state.
struct ThreadsCollector {
pid: pid_t,
descs: Vec<Desc>,
metrics: Mutex<Metrics>,
tid_retriever: Mutex<TidRetriever>,
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-4.0This bug affects 4.0.x versions.affects-5.1This bug affects 5.1.x versions.affects-5.2This bug affects 5.2.x versions.report/customerCustomers have encountered this bug.severity/majortype/bugThe issue is confirmed as a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions