← Back to Pull requests

debug-tools: Install rocgdb's sanitizer suppression files #10166

Open
lumachad opened this pull request with 76 lines diff across 3 files
View on GitHub
lumachad lumachad commented on Nov 20, 2026 10:17 UTC
Author

Motivation

The rocgdb testsuite reads sanitizer suppression files that the rocgdb test artifact does not install:

  • gdb/testsuite/lib/gdb.exp sets TSAN_OPTIONS=suppressions=$srcdir/../tsan-suppressions.txt, which resolves to tests/rocgdb/gdb/tsan-suppressions.txt in the installed tree. ThreadSanitizer aborts at startup when a suppressions file it was told to use cannot be read, so with a TSan-instrumented rocgdb no test can start rocgdb (ERROR: (eof) GDB never initialized.).

  • test_rocgdb.py adds suppressions=<file> to <SANITIZER>_OPTIONS for the files in a sanitizers directory next to it, if they exist. Nothing installs them, so they have never been used.
  • Technical Details

    All changes are in debug-tools/rocgdb/CMakeLists.txt, plus the option description and README text.

  • Install gdb/tsan-suppressions.txt to tests/rocgdb/gdb/, and .github/scripts/sanitizers/.supp to tests/rocgdb/sanitizers/. The existing tests/* rule in artifact-rocgdb.toml already packages them.

  • When test_rocgdb.py and the other CI scripts are missing from the rocgdb source tree and THEROCK_ROCGDB_DOWNLOAD_CI_SCRIPT is ON, download the suppression files with them, from the same amd-staging commit, so they match the test_rocgdb.py that reads them. A failed download is a configure error, like for the scripts. A source tree that has the scripts but not the suppression files installs without them. curl gets --create-dirs so the sanitizers directory is created.
  • Related: ROCm/ROCgdb#480 adds the ncurses suppression from gdb/tsan-suppressions.txt to sanitizers/tsan.supp. TSan reads a single suppressions file, and the runner's file takes precedence over the one gdb.exp adds, so that ROCgdb change should land first, or together with this one.

    Test Plan

  • Re-configured the rocgdb subproject in an existing debug-tools build tree (external ROCgdb source) and ran cmake --install --component tests into a scratch prefix.

  • Ran _rocgdb_download_ci_scripts on its own against amd-staging with the three scripts and the six suppression files, into an empty directory.

  • pre-commit run --files on the changed files.
  • Test Result

  • All six .supp files and tsan-suppressions.txt install to the expected locations, and match the ROCgdb source.

  • The download fetched all nine files from one amd-staging commit and created sanitizers/.

  • pre-commit passes.

  • Not tested yet: a full TSan testsuite run against a tree built with this change (an earlier TSan run only worked after copying tsan-suppressions.txt in by hand), and the full download path with a rocgdb source tree that lacks the CI scripts.
  • Submission Checklist

  • Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/CONTRIBUTING.md.
  • 🤖 Generated with Claude Code

    JIRA ID : AIROCGDB-683

    Diff: 76 lines (+61 / -15) across 3 files Reviewer: lancesix Review duration: 20865m
    All Vouch review confidence checks passed
    Residual risk 0.03 = Change Risk (0.32) × (1 − Review Confidence (0.91)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.32 · 76 lines diff across 3 files
    0.32
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.91 · 5 substantive comment(s)
    0.91
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    91%
    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.260
    Real PR Conversation Timeline
    9 items
    therock-pr-bot[bot] therock-pr-bot[bot] commented on Nov 20, 2026 10:17 UTC
    Bot

    <!-- therock-pr-bot-policy-check -->

    ✅ All Checks Passed — Ready for Review

    | Check | Status | Details |
    |---|:---:|---|
    | 📝 PR Description | ✅ Pass | — |
    | ⛔ Forbidden Files | ✅ Pass | — |
    | 🧪 Unit Test | ✅ Pass | PR does not contain code files — Unit Test auto-passed |
    | 🔎 pre-commit | ✅ Pass | — |
    | 🚫 Draft PR | 🔜 To Be Enabled | — |
    | 🚩 Feature Flag | 🔜 To Be Enabled | — |
    | 📊 Code Coverage | 🔜 To Be Enabled | — |
    | 🤖 therock-pr-bot | ✅ Pass | — |

    🎉 All checks passed! This PR is ready for review.

    📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

    🙋 Wish to Override Policy?

    therock-pr-bot[bot] therock-pr-bot[bot] commented on Nov 20, 2026 10:17 UTC
    Bot

    <!-- therock-pr-bot-fix-policies -->
    🎉 All checks passed! This PR is ready for review.

    lancesix lancesix approved these changes on Dec 03, 2026 11:45 UTC
    Approved Reviewer

    Looks reasonable. Thanks.

    geomin12 geomin12 commented on code on Dec 03, 2026 14:04 UTC
    Code Review
    debug-tools/rocgdb/CMakeLists.txt:1
    @@ -878,6 +895,23 @@ if(BUILD_TESTING)
         message(WARNING "rocgdb tests: xfails ignore list not found at "
           "${ROCGDB_SOURCE_DIR}/.github/scripts/rocgdb_ignore_list.json; skipping installation.")
       endif()
    +
    +  # Install the sanitizer suppression files that test_rocgdb.py picks up from
    +  # a "sanitizers" directory next to it (<sanitizer>.supp, passed through
    +  # <SANITIZER>_OPTIONS=suppressions=).  They come from the same place as the
    +  # scripts: the source tree, or the download above.  They are optional for

    The "optional" files are mandatory to download. debug-tools/rocgdb/CMakeLists.txt:837-840 says they "are not
    required, so they do not make the configuration fail when missing" — but line 864 passes them into
    _rocgdb_download_ci_scripts, which hard-fails per file at line 142. So the real semantics are: missing from the
    source tree is fine; missing from amd-staging is a FATAL_ERROR that breaks configure for everyone with
    DOWNLOAD_CI_SCRIPT=ON. The six names are hardcoded, so renaming or dropping any one .supp in ROCgdb becomes a
    TheRock build break. Either download these best-effort (separate loop, message(WARNING) instead of fatal) or
    keep the coupling and drop the "not required" framing, because the code doesn't believe it.

    geomin12 geomin12 approved these changes on Dec 03, 2026 14:05 UTC
    Approved Reviewer

    lgtm, i asked claude for review and added one comment

    lumachad lumachad commented on code on Dec 03, 2026 15:03 UTC
    Code Review
    debug-tools/rocgdb/CMakeLists.txt:1
    @@ -878,6 +895,23 @@ if(BUILD_TESTING)
         message(WARNING "rocgdb tests: xfails ignore list not found at "
           "${ROCGDB_SOURCE_DIR}/.github/scripts/rocgdb_ignore_list.json; skipping installation.")
       endif()
    +
    +  # Install the sanitizer suppression files that test_rocgdb.py picks up from
    +  # a "sanitizers" directory next to it (<sanitizer>.supp, passed through
    +  # <SANITIZER>_OPTIONS=suppressions=).  They come from the same place as the
    +  # scripts: the source tree, or the download above.  They are optional for

    Indeed. I've updated the commit to make them best-effort. Please let me know what you think.

    ScottTodd ScottTodd commented on Dec 03, 2026 15:07 UTC
    Contributor
    lumachad lumachad commented on Dec 03, 2026 15:12 UTC
    Author

    Related: #10296, see discussion with @rkayaith at #10296 (comment)

    @ScottTodd Thanks for the heads up. Do we have any TheRock-wide initiative for these suppression files? This particular PR attempts to deal with our own corner so we can run debug-tools tests against a sanitizer-built tree.

    If we do decide to go with TheRock-wide settings, I don't see a lot of difficulty merging our debug-tools suppression requirements there though.

    Reviewers
    Assignees
    lumachad lumachad
    Labels
    risk: low confidence: 91.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: 31.9% (LOW) · Higher = larger blast radius
    31.9%
    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: 91.5% · Lower = rushed or shallow review
    91.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: 2.7% · Safe to merge
    2.7%
    Repository