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(libsinsp): don't filter out procexit events #2171

Merged

Conversation

therealbobo
Copy link
Contributor

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area API-version

/area build

/area CI

/area driver-kmod

/area driver-bpf

/area driver-modern-bpf

/area libscap-engine-bpf

/area libscap-engine-gvisor

/area libscap-engine-kmod

/area libscap-engine-modern-bpf

/area libscap-engine-nodriver

/area libscap-engine-noop

/area libscap-engine-source-plugin

/area libscap-engine-savefile

/area libscap

/area libpman

/area libsinsp

/area tests

/area proposals

Does this PR require a change in the driver versions?

/version driver-API-version-major

/version driver-API-version-minor

/version driver-API-version-patch

/version driver-SCHEMA-version-major

/version driver-SCHEMA-version-minor

/version driver-SCHEMA-version-patch

What this PR does / why we need it:

Currently the suppress logic filters out procexit events causing an accumulation of stale threadinfo in the threadtable. The new logic always process the procexit events.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Copy link

github-actions bot commented Nov 26, 2024

Perf diff from master - unit tests

Warning:
Processed 23851 events and lost 1 chunks!

Check IO/CPU overload!

     3.50%     -1.40%  [.] sinsp_thread_manager::get_thread_ref
     7.85%     -1.33%  [.] sinsp::next
     4.77%     +1.30%  [.] sinsp_evt::get_type
     1.52%     +0.73%  [.] std::_Hashtable<long, std::pair<long const, std::shared_ptr<sinsp_threadinfo> >, std::allocator<std::pair<long const, std::shared_ptr<sinsp_threadinfo> > >, std::__detail::_Select1st, std::equal_to<long>, std::hash<long>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >::_M_find_before_node
     3.62%     +0.73%  [.] sinsp_evt::load_params

Heap diff from master - unit tests

peak heap memory consumption: -982B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Heap diff from master - scap file

peak heap memory consumption: 0B
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B

Benchmarks diff from master

Comparing gbench_data.json to /root/actions-runner/_work/libs/libs/build/gbench_data.json
Benchmark                                                         Time             CPU      Time Old      Time New       CPU Old       CPU New
----------------------------------------------------------------------------------------------------------------------------------------------
BM_sinsp_split_mean                                            +0.0083         +0.0083           149           150           149           150
BM_sinsp_split_median                                          +0.0038         +0.0038           149           150           149           150
BM_sinsp_split_stddev                                          +1.0001         +0.9978             1             2             1             2
BM_sinsp_split_cv                                              +0.9837         +0.9814             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  +0.0439         +0.0439            56            58            56            58
BM_sinsp_concatenate_paths_relative_path_median                +0.0459         +0.0459            55            58            55            58
BM_sinsp_concatenate_paths_relative_path_stddev                -0.5575         -0.5571             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_cv                    -0.5761         -0.5757             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     +0.0305         +0.0305            24            24            24            24
BM_sinsp_concatenate_paths_empty_path_median                   +0.0272         +0.0272            24            24            24            24
BM_sinsp_concatenate_paths_empty_path_stddev                   +2.4485         +2.4534             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       +2.3464         +2.3511             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  +0.0498         +0.0498            57            60            57            60
BM_sinsp_concatenate_paths_absolute_path_median                +0.0490         +0.0489            57            60            57            60
BM_sinsp_concatenate_paths_absolute_path_stddev                -0.0516         -0.0512             1             1             1             1
BM_sinsp_concatenate_paths_absolute_path_cv                    -0.0966         -0.0962             0             0             0             0
BM_sinsp_split_container_image_mean                            -0.0356         -0.0355           392           378           392           378
BM_sinsp_split_container_image_median                          -0.0345         -0.0345           392           379           392           379
BM_sinsp_split_container_image_stddev                          -0.1956         -0.1951             3             2             3             2
BM_sinsp_split_container_image_cv                              -0.1660         -0.1654             0             0             0             0

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.06%. Comparing base (55ff79f) to head (2716c60).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2171      +/-   ##
==========================================
+ Coverage   74.82%   75.06%   +0.24%     
==========================================
  Files         254      255       +1     
  Lines       33510    33552      +42     
  Branches     5746     5736      -10     
==========================================
+ Hits        25073    25186     +113     
+ Misses       8437     8366      -71     
Flag Coverage Δ
libsinsp 75.06% <100.00%> (+0.24%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@therealbobo therealbobo force-pushed the therealbobo-fix-sinsp-suppress branch from da0685d to 2716c60 Compare November 26, 2024 13:50
@FedeDP
Copy link
Contributor

FedeDP commented Nov 26, 2024

/milestone 0.20.0

@poiana poiana added this to the 0.20.0 milestone Nov 26, 2024
FedeDP
FedeDP previously approved these changes Nov 26, 2024
Copy link
Contributor

@FedeDP FedeDP 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 Nov 26, 2024

LGTM label has been added.

Git tree hash: 70389a406fb8745ee53c2518ff0afc9993b7a0a0

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 Nov 26, 2024

LGTM label has been added.

Git tree hash: 5f58f54ad382274228169dc642bfdadb3de211d1

Copy link
Contributor

@FedeDP FedeDP 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 Nov 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, FedeDP, therealbobo

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:

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

@poiana poiana merged commit eb4990c into falcosecurity:master Nov 26, 2024
44 of 47 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.

4 participants