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

Catch pids that are off a parent and not quite ready #581

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

grcevski
Copy link
Contributor

@grcevski grcevski commented Jan 26, 2024

When we match processes by open port, it's possible that a child subprocess (Python, C++) is created, but the kernel hasn't associated yet their PID with the inode of the parent open port. There's a small time window when this can happen, us finding the child process but not seeing as matching by open port.

This PR adds an additional check that if we discover a child process and it doesn't match our criteria, but it's parent did, we'll start tracking the child process.

TODO:

  • unit tests (integration tests are hard to make)

@codecov-commenter
Copy link

codecov-commenter commented Jan 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1b9bbd7) 79.26% compared to head (8a8f252) 45.04%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #581       +/-   ##
===========================================
- Coverage   79.26%   45.04%   -34.23%     
===========================================
  Files          70       68        -2     
  Lines        5907     5737      -170     
===========================================
- Hits         4682     2584     -2098     
- Misses       1001     3000     +1999     
+ Partials      224      153       -71     
Flag Coverage Δ
integration-test ?
unittests 45.04% <100.00%> (+0.25%) ⬆️

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.

@grcevski grcevski merged commit f1bdbf8 into grafana:main Jan 29, 2024
4 checks passed
@grcevski grcevski deleted the fix_for_http1.0 branch January 29, 2024 14:22
@grcevski
Copy link
Contributor Author

Thanks Mario!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants