Repository navigation
fix(profiling): re-run fast-copy warmup after mid-warmup fork - #21231
vlad-scherbich wants to merge 3 commits into
Conversation
Codeowners resolved asResolved from the full PR diff against |
Dependency direction analysis
|
There was a problem hiding this comment.
🟢 Approval recommended
The focused regression test matches the existing child-sampler restart behavior, and the release note accurately describes the covered fix.
No open issues 🎉
What changed in this PR
This PR adds regression coverage for the existing profiler behavior that restarts fast-copy warmup in a child process forked during warmup. It does not change runtime code.
Changes:
- Adds a subprocess test verifying that the child eventually upgrades to
safe_memcpy. - Expands the release note to include forks during startup warmup.
| File | Description |
|---|---|
tests/profiling/collector/test_copy_memory_stats.py |
Adds regression coverage for fast-copy recovery after a mid-warmup fork. |
releasenotes/notes/profiling-fast-copy-warmup-fork-3f1c8a4d92b7e05a.yaml |
Documents the fork-related fix alongside the existing faulthandler fix. |
Review effort: Balanced
🎉 All green!🧪 All tests passed 🔗 Commit SHA: 025d3bb | Docs | View more details | Give us feedback! |
916a0bb to
ac8f88c
Compare
ac8f88c to
f3c4009
Compare
A child forked during warmup inherited fast_copy_active == false and never upgraded. Prefork workers hit this window. Pin the child upgrade path; the desired-flag mechanism is already on the base branch.
Keep the faulthandler note on the base PR file; claim only the fork delta here.
f3c4009 to
dcea083
Compare
|
Superseded by folding the mid-warmup fork test + reno into #21230. Closing this PR; no human review time was spent on this PR. |
Description
If this PR merges alone on top of PR1: a child forked mid-warmup re-runs the warmup decision and can upgrade to
safe_memcpy, instead of inheritingfast_copy_active == falsefor life (gunicorn/celery prefork shape).Mechanism (
fast_copy_desired) is already on the base branch. This PR adds the regression pin and expands the release note to cover fork during warmup.Testing
Risks
Additional Notes
Stack: 2/4 (base PR1). Next: sticky foreign takeover.
Pre-review checklist
https://datadoghq.atlassian.net/browse/PROF-16018