Skip to content

Conversation

NDStrahilevitz
Copy link
Collaborator

@NDStrahilevitz NDStrahilevitz commented Jun 23, 2025

1. Explain what the PR does

5fdc7f3 PR #4803: fix(engine):disable feedback

fix(engine):disable feedback (#4803)

commit: 77d211e79996f (main), cherry-pick

2. Explain how to test it

3. Other comments

@Copilot Copilot AI review requested due to automatic review settings June 23, 2025 14:54
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR temporarily disables the engine’s feedback mechanism to avoid a deadlock when sending events back into the pipeline.

  • Removes the findings import.
  • Comments out the feedback conversion and send logic with a TODO explaining the deadlock.
Comments suppressed due to low confidence (2)

pkg/signatures/engine/engine.go:152

  • There's a duplicated 'to' in this comment ("trying to to send"). Consider removing the extra 'to' for clarity.
	//       a new event to the feedbacking signature. This would cause a deadlock

pkg/signatures/engine/engine.go:150

  • [nitpick] The term "feedbacking signature" is unclear; consider rephrasing to "feedback signature" or "signature receiving feedback" for clarity.
	//       when the engine was blocked on sending a new event to the feedbacking signature.

@NDStrahilevitz NDStrahilevitz force-pushed the backport_23_no_feedback branch from c59f4c4 to 5c806a5 Compare June 23, 2025 14:59
@NDStrahilevitz NDStrahilevitz marked this pull request as draft June 23, 2025 15:05
Feedback from findings back into the rules engine could cause a deadlock.
This is because the engine would eventually block on trying to to send
a new event to the feedbacking signature. This would cause a deadlock
there - propagating back to the engine and pipeline in general.
This does not occur in analyze mode - likely due to less stress in that
mode.

Introduce a mode field to the engine config to allow distinction between
tracee-rules, single binary and analyze modes. The feedback logic which
is implemented in the engine is only relevant for analyze mode. In
single binary mode, we rely on the pipeline to handle the feedback.

commit a86e656 (main), cherry-pick
Avoid deadlocks by writing first into a from file channel buffer, then into the engine.

commit d71aff0 (main), cherry-pick
@NDStrahilevitz NDStrahilevitz force-pushed the backport_23_no_feedback branch from 5c806a5 to d298dfe Compare June 24, 2025 13:31
@NDStrahilevitz NDStrahilevitz changed the title [v0.23.2] PR #4803: fix(engine): disable feedback [v0.23.2] PR #4803: fix(engine): feedback deadlock issues Jun 24, 2025
@NDStrahilevitz NDStrahilevitz marked this pull request as ready for review June 24, 2025 13:31
@geyslan geyslan merged commit 105c6d1 into aquasecurity:release-v0.23.0 Jun 30, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants