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/falco): timer_delete() workaround due to bug in older GLIBC #2851

Merged
merged 4 commits into from Oct 6, 2023

Conversation

incertum
Copy link
Contributor

@incertum incertum commented Oct 4, 2023

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

/kind release

Any specific area of the project related to this PR?

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

/area build

/area engine

/area tests

/area proposals

/area CI

What this PR does / why we need it:

Workaround for older GLIBC versions (< 2.35), where calling timer_delete() with an invalid timer ID not returned by timer_create() causes a segfault because of a bug in GLIBC (https://sourceware.org/bugzilla/show_bug.cgi?id=28257).

See also https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1940296.

Also verified it on:

[vagrant@centos7 ~]$ uname -r
5.14.15-1.el7.elrepo.x86_64
ldd --version
ldd (GNU libc) 2.17
[vagrant@amazonlinux2 ~]$ uname -r
4.14.314-237.533.amzn2.x86_64
ldd --version
ldd (GNU libc) 2.26

and discovered it via backtracing using gdb debugger.

Impact: High for adopters using the metrics feature on a system with impacted GLIBC version.

@FedeDP @Andreagit97 @jasondellaluce curious, would you have a better workaround idea? Also couldn't come up with a good unit testing idea other than adding a test to the falco testing repo falcosecurity/testing#30.

Which issue(s) this PR fixes:

Fixes #2850

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

fix(userspace/falco): timer_delete() workaround due to bug in older GLIBC

…LIBC

Workaround for older GLIBC versions (< 2.35), where calling timer_delete()
with an invalid timer ID not returned by timer_create() causes a segfault because of
a bug in GLIBC (https://sourceware.org/bugzilla/show_bug.cgi?id=28257).

Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
@incertum
Copy link
Contributor Author

incertum commented Oct 4, 2023

Can address the codespell issues at the end.

@FedeDP
Copy link
Contributor

FedeDP commented Oct 4, 2023

Hey melissa, incidentally i just fixed that yesterday: #2850
Do you like my approach?

@FedeDP
Copy link
Contributor

FedeDP commented Oct 4, 2023

I was going to push the branch and open the PR today :D

FedeDP
FedeDP previously approved these changes Oct 4, 2023
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

poiana commented Oct 4, 2023

LGTM label has been added.

Git tree hash: 2fd75e3605c80666ace4832dbdc796595582ae99

@FedeDP
Copy link
Contributor

FedeDP commented Oct 4, 2023

/milestone 0.37.0

@poiana poiana added this to the 0.37.0 milestone Oct 4, 2023
…round

Co-authored-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
FedeDP
FedeDP previously approved these changes Oct 4, 2023
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

poiana commented Oct 4, 2023

LGTM label has been added.

Git tree hash: f8706bd784115d2f7071c018b86431632112bf92

Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
@poiana poiana removed the lgtm label Oct 4, 2023
@poiana poiana requested a review from FedeDP October 4, 2023 14:30
FedeDP
FedeDP previously approved these changes Oct 4, 2023
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 poiana added the lgtm label Oct 4, 2023
@poiana
Copy link

poiana commented Oct 4, 2023

LGTM label has been added.

Git tree hash: cd405e18c83a09ff200eacb2ba0defe8e086bc51

…down

Co-authored-by: Andrea Terzolo <andreaterzolo3@gmail.com>
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
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 poiana added the lgtm label Oct 5, 2023
@poiana
Copy link

poiana commented Oct 5, 2023

LGTM label has been added.

Git tree hash: f7ed3ff93d71840db0a90131e6627e7d706f0972

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

poiana commented Oct 6, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

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,incertum]

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 32b7ccd into falcosecurity:master Oct 6, 2023
17 checks passed
@leogr
Copy link
Member

leogr commented Oct 6, 2023

/milestone 0.36.1

@poiana poiana modified the milestones: 0.37.0, 0.36.1 Oct 6, 2023
This was referenced Oct 13, 2023
@incertum incertum deleted the fix-timer branch March 5, 2024 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Falco 0.36 and later segfaults on startup when metrics are enabled
5 participants