-
Notifications
You must be signed in to change notification settings - Fork 9
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
Test for zombie processes in crashtracking #3364
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- This PR is very large, I would have preferred to have divided it into several parts, for example, by language.
- There are lint failures
- There are failures on gitlab
- I propose not to create a new scenario, but to use the existing scenario “INSTALLER_AUTO_INJECTION”. This new test case will be executed together with other tests. The condition is after breaking the application, restore it.
tests/auto_inject/utils.py
Outdated
vm_port = virtual_machine.deffault_open_port | ||
warmup_weblog(f"http://{vm_ip}:{vm_port}/") | ||
|
||
def get_child_pids(self, virtual_machine) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not add this methods to the weblog interface?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -651,6 +651,14 @@ def all_endtoend_scenarios(test_object): | |||
github_workflow="libinjection", | |||
) | |||
|
|||
container_auto_injection_install_script_crashtracking = InstallerAutoInjectionScenario( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I advocate for using the existing scenario "INSTALLER_AUTO_INJECTION" . And after break the app, restore the app
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Motivation
https://datadoghq.atlassian.net/browse/APMLP-289 and https://datadoghq.atlassian.net/browse/APMLP-290
Changes
Adds an injection test validating that crashtracking:
To look for child processes, the weblog exposes a
/child_pids
endpoint that browses the/proc
folder to find the parent processes. It doesn't rely onps
because it's not available in some containers.To look for zombie processes, the weblog exposes a
/fork_and_crash
that spawns a copy of the process (using fork whenever possible, or just manually starting a process on Java and .NET) then have it crash. We need a child process for this because if we crash the main process then the container will be teared down and we won't be able to observe any zombie.The tests currently fail on Ruby, I think it runs without the crashtracking fix.
Workflow
codeowners
file quickly.🚀 Once your PR is reviewed, you can merge it!
🛟 #apm-shared-testing 🛟
Reviewer checklist
[<language>]
, double-check that only<language>
is impacted by the changebuild-XXX-image
label is present