diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-13 09:58:13 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-13 09:58:13 +0300 |
| commit | 7dd508503595b023de03d78de487b4f52c7a98f0 (patch) | |
| tree | 37a84992aca5710710944a2773d4ff6d9b53bacd /internal/eventloop_comm.go | |
| parent | 8b586811571a9a3935a73deb47e6f37bb0c9bcbf (diff) | |
fix: add 30s startup timeout to startTraceCmd to prevent indefinite hang on BPF attach failure
If kernel lock contention or another issue causes BPF probe attachment to
stall, the TUI previously remained in the 'Attaching tracepoints...' spinner
state forever. startTraceCmdWithTimeout now races the starter goroutine against
a configurable deadline (defaultStartupTimeout = 30s) and returns a
TracingErrorMsg with a clear message when the deadline expires. The stuck
goroutine is cleaned up when the caller cancels the trace context on the next
user action (e.g. traceLifecycle.stop). Two new tests cover the timeout and
context-cancel paths.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/eventloop_comm.go')
0 files changed, 0 insertions, 0 deletions
