Skip to content

fix: strippedGoExeCache (sync.Map) grows unbounded #214

Description

@mayankpande88

Problem

The strippedGoExeCache in ebpftracer/tls.go is a sync.Map that caches paths of stripped Go binaries to avoid repeated uprobe attach attempts. It has no eviction policy.

On nodes running many short-lived Go processes (CI/CD runners, batch jobs, CronJobs), this map grows indefinitely as each unique binary path is cached forever.

Fix

Replace sync.Map with an LRU cache (e.g., hashicorp/golang-lru already in deps) capped at ~1000 entries, or add periodic eviction in the GC cycle.

Impact

Low — slow memory growth on CI/CD nodes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions