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

tetragon: fix hang on error in tetragonExecute #1770

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Changes from all commits
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
6 changes: 3 additions & 3 deletions cmd/tetragon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,6 @@ func tetragonExecute() error {
if err := obs.InitSensorManager(sensorMgWait); err != nil {
return err
}
defer func() {
observer.RemoveSensors(ctx)
}()

/* Remove any stale programs, otherwise feature set change can cause
* old programs to linger resulting in undefined behavior. And because
Expand Down Expand Up @@ -472,6 +469,9 @@ func tetragonExecute() error {
close(sensorMgWait)
sensorMgWait = nil
observer.GetSensorManager().LogSensorsAndProbes(ctx)
defer func() {
observer.RemoveSensors(ctx)
}()

err = loadTpFromDir(ctx, option.Config.TracingPolicyDir)
if err != nil {
Expand Down
Loading