Skip to content

Commit 5c806a5

Browse files
fix(engine):disable feedback
commit: 77d211e (main), cherry-pick
1 parent 651ff83 commit 5c806a5

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

pkg/signatures/engine/engine.go

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"fmt"
66
"sync"
77

8-
"github.com/aquasecurity/tracee/pkg/events/findings"
98
"github.com/aquasecurity/tracee/pkg/logger"
109
"github.com/aquasecurity/tracee/pkg/signatures/metrics"
1110
"github.com/aquasecurity/tracee/types/detect"
@@ -147,17 +146,23 @@ func (engine *Engine) unloadAllSignatures() {
147146
func (engine *Engine) matchHandler(res *detect.Finding) {
148147
_ = engine.stats.Detections.Increment()
149148
engine.output <- res
150-
if !engine.config.Enabled {
151-
return
152-
// next section is relevant only for engine-in-pipeline and analyze
153-
}
154-
e, err := findings.FindingToEvent(res)
155-
if err != nil {
156-
logger.Errorw("Failed to convert finding to event, will not feedback", "err", err)
157-
return
158-
}
159-
prot := e.ToProtocol()
160-
engine.inputs.Tracee <- prot
149+
// TODO: the feedback is disabled for now, as it was causing a deadlock
150+
// when the engine was blocked on sending a new event to the feedbacking signature.
151+
// This is because the engine would eventually block on trying to to send
152+
// a new event to the feedbacking signature. This would cause a deadlock
153+
// there - propagating back to the engine and pipeline in general.
154+
// We should keep it here for reference until we find a better solution.
155+
// if !engine.config.Enabled {
156+
// return
157+
// // next section is relevant only for engine-in-pipeline and analyze
158+
// }
159+
// e, err := findings.FindingToEvent(res)
160+
// if err != nil {
161+
// logger.Errorw("Failed to convert finding to event, will not feedback", "err", err)
162+
// return
163+
// }
164+
// prot := e.ToProtocol()
165+
// engine.inputs.Tracee <- prot
161166
}
162167

163168
// checkCompletion is a function that runs at the end of each input source

0 commit comments

Comments
 (0)