← Back to Pull requests

UCM: Don't call ucs_status_string() from UCM modules #12228

Closed
unknown closed this pull request without merging on Nov 09, 2026 18:41 UTC
View on GitHub
unknown unknown commented on Nov 03, 2026 19:02 UTC
Author

What


  • Print the numeric status code instead of ucs_status_string() in src/ucm/rocm/rocmmem.c and

  • src/ucm/cuda/cudamem.c.
  • Add check_ucm_no_ucs_symbols to buildlib/az-helpers.sh and run it after the build in

  • buildlib/pr/rocm/test_malloc_hook.sh and buildlib/pr/cuda/test_malloc_hook.sh: it fails if a
    UCM module (libucm_.so) has an undefined ucs_ symbol.
  • Document the rule in the ucm entry of src/AGENTS.md.
  • Why


    UCM modules link only libucm. When UCX is loaded with RTLD_LOCAL (for example as an application
    plugin), libucs is not in their scope, so logging through ucs_status_string() kills the process:

    libucm_rocm.so.0: undefined symbol: ucs_status_string
    

    Since #11887 this happens on every start when the bistro hook for the HSA allocator can't be
    installed and UCX falls back to reloc hooks, because that path logs a warning. One such case is the
    HSA runtime bundled with the PyTorch ROCm wheel. libucm_cuda has the same call on a ucm_diag
    path (#8092).

    The check covers only the modules: libucm.so itself references ucs_load_modules and
    ucs_sys_is_dynamic_lib, which is fine because it is loaded together with libucs.

    Testing


  • ROCm, MI355X, PyTorch ROCm wheel, UCX loaded through NIXL: the process no longer exits at startup;

  • the warning is printed and the reloc hooks are installed.
  • ROCm build with contrib/configure-devel as in the CI script: check_ucm_no_ucs_symbols passes;

  • with the two UCM files reverted to master it fails on ucs_status_string.

    Diff: 196 lines (+147 / -49) across 2 files Reviewer: ankith117 Review duration: 8618m
    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 · 196 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.316
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #12228"
    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.2% · Safe to merge
    14.2%
    Repository