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

Enable clone3 #1971

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Enable clone3 #1971

wants to merge 2 commits into from

Conversation

erthalion
Copy link
Contributor

@erthalion erthalion commented Nov 26, 2024

Description

Originally we've excluded clone3, which wasn't present on some older
platforms. But now it's getting used by newer glibc, which means that
we're missing information about threads. It plays some visible role only
when threads are exiting, e.g. in a weird situation if a thread will do
exec, all the threads in the thread group are going to be stopped,
leaving only one running exec. This is visible in the resolved file path
for the event.

Checklist

  • Investigated and inspected CI test results
  • Updated documentation accordingly

Automated testing

  • Added unit tests
  • Added integration tests
  • Added regression tests

Testing Performed

Local testing to verify which event we receive with clone and clone3.

@erthalion erthalion requested a review from a team as a code owner November 26, 2024 11:10
@erthalion erthalion marked this pull request as draft November 26, 2024 11:11
@erthalion erthalion changed the title Fix/clone3 Enable clone3 Nov 26, 2024
@erthalion erthalion force-pushed the fix/clone3 branch 2 times, most recently from f9ddeb5 to 6adb950 Compare November 26, 2024 14:06
// instead of an exec target we should see the parent file path.
func (s *ThreadsTestSuite) TestThreadExec() {
image := config.Images().QaImageByKey("qa-thread-exec")
containerID, err := s.Executor().StartContainer(
Copy link
Collaborator

Choose a reason for hiding this comment

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

You might need to pass this containerID by the common.ContainerShortID() for the mock sensor to work correctly with it, see here for an example:

s.serverContainer = common.ContainerShortID(containerID)

Originally we've excluded clone3, which wasn't present on some older
platforms. But now it's getting used by newer glibc, which means that
we're missing information about threads. It plays some visible role only
when threads are exiting, e.g. in a weird situation if a thread will do
exec, all the threads in the thread group are going to be stopped,
leaving only one running exec. This is visible in the resolved file path
for the event.
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