← Back to Pull requests

hpx::tolerate_node_faults: use the runtime configuration's setting #8297

Open
unknown opened this pull request with 278 lines diff across 3 files
View on GitHub
unknown unknown commented on Nov 29, 2026 05:00 UTC
Author

hpx::tolerate_node_faults() read hpx.enable_fault_tolerance on every call and ignored util::runtime_configuration::tolerate_node_faults(bool), which force_disconnect, supervision_observer_force_disconnect and locality_removed call to tolerate the localities they disconnect or kill. The parcel layer, the device conduit, packaged_action and the TCP parcelport all ask hpx::tolerate_node_faults(), so these tests ran without fault tolerance.

This is what made tests.unit.modules.device_conduit_ucx.locality_removed time out in "Linux (Debug, all tests)" on several branches. In CI's containers UCX moves data between localities on one node over TCP, so the conduit's sends to the killed worker fail with "Connection reset by remote peer". Since the destination isn't tolerated, the conduit reports the failed send with hpx::report_error. That call comes from background work while the worker's state is not running, so report_error treats it as an error outside the runtime and stops the runtime while hpx_main is still running. The stop then waits forever for the pending threads (hpx_main among them), which no worker runs any more.

With this change hpx::tolerate_node_faults() returns the runtime configuration's setting. That is hpx.enable_fault_tolerance unless the application has changed it, and false without a runtime, as before. locality_removed also flushes its progress messages, so a run that doesn't finish shows how far it got.

Testing, in CI's image (stellargroup/build_env:19, clang, CI's configuration and UCX 1.23.0) with UCX limited to TCP and loopback as in CI: without the change locality_removed hung in 40 of 175 runs, with it 220 of 220 passed. The tests of device_conduit_ucx, init_runtime, supervision, parcelset and async_distributed pass there (60 tests), and with GCC 14 on rostam (56 tests, without async_distributed).

Two things this doesn't change: hpx::report_error stops the runtime when it is called on an HPX thread whose worker isn't running (an idle worker in pre_sleep or sleeping), and a stop started that way can leave threads that are pending after the workers have left. Both only matter for errors that aren't tolerated.

Diff: 278 lines (+208 / -70) across 3 files Reviewer: coderabbitai[bot] Review duration: 5m
All Vouch review confidence checks passed
Residual risk 0.40 = Change Risk (0.63) × (1 − Review Confidence (0.36)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.63 · 278 lines diff across 3 files
0.63
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 81% · Reviewer familiarity: 35%
35%
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
Shallow Review Depth shallow_review_depth
0.344
Diff Size diff_size
0.337
Sensitive Paths sensitive_paths
0.063
Real PR Conversation Timeline
1 comments
"Review active on #8297"
general weight: 0.35
Assignees
Unassigned
Labels
risk: medium confidence: 35.8% reviewed sensitive_module
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: 62.8% (MEDIUM) · Higher = larger blast radius
62.8%
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: 35.8% · Lower = rushed or shallow review
35.8%
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: 40.3% · Moderate risk
40.3%