Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce leaks in probe endpoint reporter #3661

Merged
merged 2 commits into from
Aug 16, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(probe): Loosen ebpf parameters to reduce restarts
Delay kernel events by up to 0.2ms, to reduce the chance the ebpf
reporter sends them out-of-order, and allow out-of-order events to
happen up to once a minute without giving up on the ebpf reporter.
  • Loading branch information
bboreham committed Aug 13, 2019
commit 6e715d26977a91a4870a65941dbb49e356207c81
4 changes: 2 additions & 2 deletions probe/endpoint/connection_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ func (t *connectionTracker) ReportConnections(rpt *report.Report) {
ebpfLastFailureTime := t.ebpfLastFailureTime
t.ebpfLastFailureTime = time.Now()

if ebpfLastFailureTime.After(time.Now().Add(-5 * time.Minute)) {
// Multiple failures in the last 5 minutes, fall back to proc parsing
if ebpfLastFailureTime.After(time.Now().Add(-1 * time.Minute)) {
// Multiple failures in the last minute, fall back to proc parsing
log.Warnf("ebpf tracker died again, gently falling back to proc scanning")
t.useProcfs()
} else {
Expand Down
1 change: 1 addition & 0 deletions probe/endpoint/ebpf.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ func newEbpfTracker() (*EbpfTracker, error) {
debugBPF = true
}

tracer.TimestampOffset = 200000 // Delay events by 0.2ms to avoid out-of-order reporting
tracker := &EbpfTracker{
debugBPF: debugBPF,
}
Expand Down