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

cleanup(libsinsp): remove assert that may trigger under normal circumstances #2213

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

LucaGuerra
Copy link
Contributor

@LucaGuerra LucaGuerra commented Dec 20, 2024

What type of PR is this?

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

/kind cleanup

Any specific area of the project related to this PR?

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

/area libsinsp

Does this PR require a change in the driver versions?

No

What this PR does / why we need it:

This does happen. The reasons for it may be a normal operation on UNIX sockets or a potential issue in the driver (or an expected failure if the userspace buffer could not be retrieved) but it's unconfirmed. Since the assert wasn't specific and nothing bad happens I think it can be safely removed, otherwise debug builds will be useless for everyone.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Copy link

Perf diff from master - unit tests

     2.08%     +0.50%  [.] 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
     1.37%     +0.47%  [.] sinsp::fetch_next_event
    10.24%     +0.46%  [.] sinsp_parser::reset
     1.97%     -0.46%  [.] next
    11.03%     -0.40%  [.] sinsp::next
     2.92%     -0.40%  [.] is_conversion_needed
     0.89%     -0.32%  [.] std::vector<sinsp_evt_param, std::allocator<sinsp_evt_param> >::emplace_back<sinsp_evt*, unsigned int&, char const*, unsigned long&>
     3.29%     -0.32%  [.] sinsp_thread_manager::find_thread
     5.84%     -0.30%  [.] next_event_from_file
     4.10%     -0.25%  [.] gzfile_read

Heap diff from master - unit tests

peak heap memory consumption: 0B
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.0205         +0.0205           146           149           146           149
BM_sinsp_split_median                                          +0.0193         +0.0193           146           149           146           149
BM_sinsp_split_stddev                                          +0.7702         +0.7694             1             1             1             1
BM_sinsp_split_cv                                              +0.7346         +0.7338             0             0             0             0
BM_sinsp_concatenate_paths_relative_path_mean                  +0.0306         +0.0306            55            57            55            57
BM_sinsp_concatenate_paths_relative_path_median                +0.0239         +0.0239            56            57            56            57
BM_sinsp_concatenate_paths_relative_path_stddev                +1.2164         +1.2168             0             1             0             1
BM_sinsp_concatenate_paths_relative_path_cv                    +1.1506         +1.1510             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_mean                     +0.0724         +0.0724            23            25            23            25
BM_sinsp_concatenate_paths_empty_path_median                   +0.0718         +0.0718            23            25            23            25
BM_sinsp_concatenate_paths_empty_path_stddev                   +1.6000         +1.6009             0             0             0             0
BM_sinsp_concatenate_paths_empty_path_cv                       +1.4245         +1.4253             0             0             0             0
BM_sinsp_concatenate_paths_absolute_path_mean                  +0.0244         +0.0244            56            57            56            57
BM_sinsp_concatenate_paths_absolute_path_median                +0.0245         +0.0245            56            57            56            57
BM_sinsp_concatenate_paths_absolute_path_stddev                -0.6868         -0.6870             1             0             1             0
BM_sinsp_concatenate_paths_absolute_path_cv                    -0.6943         -0.6945             0             0             0             0
BM_sinsp_split_container_image_mean                            +0.0141         +0.0141           390           395           390           395
BM_sinsp_split_container_image_median                          +0.0127         +0.0127           390           395           390           395
BM_sinsp_split_container_image_stddev                          +0.6216         +0.6228             3             4             3             4
BM_sinsp_split_container_image_cv                              +0.5991         +0.6003             0             0             0             0

Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.43%. Comparing base (9ee57c8) to head (58c5307).
Report is 10 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2213      +/-   ##
==========================================
+ Coverage   75.38%   75.43%   +0.04%     
==========================================
  Files         264      265       +1     
  Lines       34014    34043      +29     
  Branches     5805     5800       -5     
==========================================
+ Hits        25642    25680      +38     
+ Misses       8372     8363       -9     
Flag Coverage Δ
libsinsp 75.43% <ø> (+0.04%) ⬆️

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.

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 Dec 20, 2024

LGTM label has been added.

Git tree hash: 9c0f92e008b7a42bb6a9b35feabd70bdecbd606b

@FedeDP
Copy link
Contributor

FedeDP commented Dec 20, 2024

/milestone 0.20.0

@poiana poiana added this to the 0.20.0 milestone Dec 20, 2024
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, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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,FedeDP,LucaGuerra]

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 7b9e76f into falcosecurity:master Dec 20, 2024
48 of 49 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