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(userspace/libsinsp): do not suppress zero ptids #1598

Merged
merged 1 commit into from Dec 20, 2023

Conversation

jasondellaluce
Copy link
Contributor

What type of PR is this?

/kind bug

Any specific area of the project related to this PR?

/area libsinsp

Does this PR require a change in the driver versions?

What this PR does / why we need it:

The recent process-based event suppression refactor (cc @gnosek) added a new cache slot for better performance. However, given that the cache slots are likely initialized to zero, we can fall into the case in which we consider a zero TID to be suppressed. The issue with that is that if the zero TID is taken from a PTID of an event (execve, clone, etc...), then we also mark as suppressed the child process. We indeed set PTID to zero in our drivers when we can find no parent for a thread, which in this case would cause a whole hierarchy of processes to have their events ignored.

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

fix(userspace/libsinsp): do not suppress zero ptids

Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
Copy link
Member

@Andreagit97 Andreagit97 left a comment

Choose a reason for hiding this comment

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

The fix makes sense! thank you for this!

@leogr
Copy link
Member

leogr commented Dec 20, 2023

/milestone 0.14.1

@poiana poiana added this to the 0.14.1 milestone Dec 20, 2023
Copy link
Contributor

@incertum incertum left a comment

Choose a reason for hiding this comment

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

/approve

@poiana
Copy link
Contributor

poiana commented Dec 20, 2023

LGTM label has been added.

Git tree hash: 096aa2e2bce7f7fca32d471278136b85e1a80f2e

Copy link
Member

@Andreagit97 Andreagit97 left a comment

Choose a reason for hiding this comment

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

/approve

@poiana
Copy link
Contributor

poiana commented Dec 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, incertum, jasondellaluce

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [Andreagit97,incertum,jasondellaluce]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@FedeDP
Copy link
Contributor

FedeDP commented Dec 20, 2023

There must be some issues with the multi producer single consumer queue:

[ RUN ] mpsc_priority_queue.multi_concurrent_producers
Error: The operation was canceled.

Restarted the test.

@poiana poiana merged commit 12732fe into master Dec 20, 2023
30 of 31 checks passed
@poiana poiana deleted the fix/suppress-zero-ptid branch December 20, 2023 21:12
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.

None yet

6 participants