← Back to Pull requests

test: skip core dumps in tests that crash on purpose #21684

Closed
unknown closed this pull request without merging on Nov 12, 2026 04:58 UTC
View on GitHub
unknown unknown commented on Nov 11, 2026 19:38 UTC
Author

Description

Since #21097, CI collects every core dump from test jobs and uploads it as an artifact. Tests that crash on purpose fill this with noise: test_faulthandler_traceback_on_segfault leaves a 30-40 MB core on most profiling shards, and the crashtracker suite leaves about 1.2 GB per run.

This sets RLIMIT_CORE to 0 in each process right before it crashes on purpose, so any core left in core-dumps/ points to an unexpected crash. The parent test process keeps its limit.

  • tests/crashtracker/test_crashtracker.py: the forked children and subprocess scripts that segfault or raise SIGSEGV/SIGBUS. Forked children call a new disable_core_dumps() helper in tests/crashtracker/utils.py.

  • tests/profiling/test_faulthandler.py::test_faulthandler_traceback_on_segfault.
  • The core limit doesn't change signal handling, so faulthandler output, crash reports and exit codes stay the same. CI collection scripts and coredump_smoke are untouched.

    Testing

    Local testrunner container (ulimit -c unlimited, core_pattern=core), Python 3.12, scripts/run-tests:

  • Before: test_crashtracker_simple* and test_faulthandler_traceback_on_segfault each leave a core (46 MB and 37 MB).

  • After: the full crashtracker suite (38 passed) and test_faulthandler.py (19 passed) leave no core.
  • Risks

    None, test-only.

    Additional Notes

    Jira: PROF-16192

    [PROF-16192]: https://datadoghq.atlassian.net/browse/PROF-16192?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

    Diff: 199 lines (+149 / -50) across 2 files Reviewer: gyuheon0h Review duration: 560m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 199 lines diff across 2 files
    0.36
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.317
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #21684"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.1% (MEDIUM) · Higher = larger blast radius
    36.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.3% · Safe to merge
    14.3%