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

fix(probe/ebpf): feed initial connections synchronously on restart #3712

Merged
merged 2 commits into from
Oct 22, 2019

Commits on Oct 14, 2019

  1. fix(probe/ebpf): feed initial connections synchronously on restart

    If we run `getInitialState()` async there is some chance we will see
    another ebpf failure and call `useProcfs()` before `getInitialState()`
    gets to the last line, whereupon it will crash on nil pointer.
    
    Also it seems pointless to call `performEbpfTrack()` without waiting
    for something to feed in, so I suspect this is what the original
    author had in mind.
    
    It will slow down this one `Report()` on machines with a lot of
    processes or connections, but ebpfTracker restart is supposed to be a
    rare event.
    bboreham committed Oct 14, 2019
    Configuration menu
    Copy the full SHA
    ae83c65 View commit details
    Browse the repository at this point in the history
  2. refactor(probe/ebpf): make ebpf setup safer

    It was possible for `t.ebpfTracker` to change underneath this code
    while running on a background goroutine, so change it to take
    `ebpfTracker` as a parameter.
    
    While we're here, rename the functions to better match what they do.
    bboreham committed Oct 14, 2019
    Configuration menu
    Copy the full SHA
    b9f10e9 View commit details
    Browse the repository at this point in the history