Skip to content

Add delay timer when attaching go tls uprobes to a process#326

Open
vishnukumarkvs wants to merge 1 commit into
coroot:mainfrom
vishnukumarkvs:add-tls-uprobe-instrumentation-delay-1
Open

Add delay timer when attaching go tls uprobes to a process#326
vishnukumarkvs wants to merge 1 commit into
coroot:mainfrom
vishnukumarkvs:add-tls-uprobe-instrumentation-delay-1

Conversation

@vishnukumarkvs

Copy link
Copy Markdown
Contributor

Added TlsInstrumentationDelay flag (default 5s) to skip TLS uprobe attachment for short-lived processes (e.g., exec probes). When a process is younger than the timeperiod, uprobe attachment is delayed instead of running immediately.

This way, we can skip attaching uprobes for short process like liveliness/readiness probes

@def

def commented Jul 1, 2026

Copy link
Copy Markdown
Member

I like the general approach, but there's a concurrency issue. c.attachTlsUprobes was only ever called from the event loop, so it could safely access shared state like c.processes without locking. Running it from a timer goroutine breaks that invariant and can cause panics (concurrent map access).

I don't have a concrete alternative yet, I need to look at the code more closely, but I think we should aim to keep the attach on the event-loop goroutine rather than introducing a separate timer/goroutine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants