Skip to content

[golang] Find the tracer process in the Go process discovery tests - #8578

Open
kakkoyun wants to merge 2 commits into
mainfrom
fix/go-process-discovery-supervisor
Open

kakkoyun wants to merge 2 commits into
mainfrom
fix/go-process-discovery-supervisor

Conversation

@kakkoyun

Copy link
Copy Markdown
Member

Motivation

The Go crashtracker in dd-trace-go moves from a child crash monitor to a supervisor: the original process stays the supervisor and runs the application as its child (DataDog/dd-trace-go#5905). After that change, the direct child of PID 1 in the Go parametric container is the supervisor, which does not run the tracer, so test_process_discovery finds no tracer memfd there.

Changes

For Go, the test now checks the direct children of PID 1 and their children, and uses the one process that holds the tracer memfd. It asserts that exactly one process holds it.

Checked locally with ./run.sh PARAMETRIC -L golang tests/parametric/test_process_discovery.py: 2 passed with golang@2.12.0 (child monitor) and 2 passed with the dd-trace-go#5905 branch (supervisor).

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Tests, manifest, weblog are modified -> you'll need a review from system-tests-reviewers: ask to one of youre co-worker familiar with the tested feature.
    • Framework is modified, or non obvious usage of it -> get a review from system-tests-core (slack)

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

With dd-trace-go's crash supervisor, the direct child of PID 1 in the Go
parametric container is the supervisor, which does not run the tracer.
Look at the children of PID 1 and their children, and use the one process
that holds the tracer memfd.
@github-actions

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

tests/parametric/test_process_discovery.py                              @DataDog/system-tests-reviewers

@kakkoyun kakkoyun added the go Pull requests that update Go code label Nov 18, 2026
@kakkoyun
kakkoyun marked this pull request as ready for review November 18, 2026 17:55
@kakkoyun
kakkoyun requested a review from a team as a code owner November 18, 2026 17:55
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T18:05:58.844344Z 135492e Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

A failed pgrep or find looked the same as a process without children or
without a tracer memfd, so a real holder could drop out of the search.
Treat only pgrep's no-match exit code as empty, assert on every other
failure, and show the candidates when the holder count is wrong. Scan
each candidate's memfds once.
@darccio

darccio commented Nov 19, 2026

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 135492e5b2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants