Skip to content

CI: Fail the Jenkins static checks job on analyzer errors - #12167

Open
Alexey-Rivkin wants to merge 3 commits into
openucx:masterfrom
Alexey-Rivkin:ci-jenkins-static-checks
Open

Alexey-Rivkin wants to merge 3 commits into
openucx:masterfrom
Alexey-Rivkin:ci-jenkins-static-checks

Conversation

@Alexey-Rivkin

@Alexey-Rivkin Alexey-Rivkin commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What?

Make the Jenkins static checks job fail when the analyzers report errors, and size its CI builds and test threads by NPROC.

Why?

static_checks.sh reports findings only through the Azure task.complete marker and exits 0, which Jenkins ignores, so the Jenkins job stays green whatever the analyzers find. In a Kubernetes pod nproc reports every host CPU, not the pod's limit.

How?

  • buildlib/tools/static_checks.sh: exit 1 after reporting findings; Azure already fails on the marker.
  • buildlib/tools/static_checks.sh and contrib/test_jenkins.sh (test_init_mt): use ${NPROC}, which common.sh caps on Kubernetes nodes, instead of nproc.
  • .ci/pipeline/static_checks_matrix.yaml: NPROC: "4", so the make jobs match the 4 CPU limit of the pod.

Tested: ucx-static-checks-oss #45, ucx-test-oss #79 (internal NVIDIA links)

HPCINFRA-5037 (Internal link)

@svc-nvidia-pr-review

Copy link
Copy Markdown

🤖 Starting review — findings will be posted here when done.

Comment thread buildlib/tools/static_checks.sh Resolved
@svc-nvidia-pr-review

Copy link
Copy Markdown

buildlib/tools/static_checks.sh

Pre-existing, outside the diff (not blocking): WORKDIR is unset in .ci/pipeline/static_checks_matrix.yaml, so report_dir resolves to /static_check in that job, and cs.err is written to the build dir rather than report_dir, so it is never part of the published artifact. Worth a separate PR if the blossom job is meant to keep reports.

Test expectation per REVIEW.md ("Build/CI changes ... enough validation to show the stated CI behavior changed as intended") is satisfied by the PR's own CI run — the static checks job must be green on this PR to prove no pre-existing findings now block every PR. Please confirm that before merge; CI state could not be read with the available tools.

@Alexey-Rivkin

Copy link
Copy Markdown
Contributor Author

Pre-existing, outside the diff (not blocking): WORKDIR is unset in .ci/pipeline/static_checks_matrix.yaml

Agreed it's pre-existing, I'll keep it out of this PR.

the static checks job must be green on this PR to prove no pre-existing findings now block every PR

It is: ucx-static-checks-oss #40 (internal NVIDIA link) ran on this PR's merge commit with no findings.

@Alexey-Rivkin
Alexey-Rivkin marked this pull request as ready for review November 2, 2026 12:15
@Alexey-Rivkin
Alexey-Rivkin requested a review from a team as a code owner November 2, 2026 12:15
static_checks.sh reports analyzer findings only through Azure logging
commands, which Jenkins ignores, so the Jenkins job passed with
errors. Exit non-zero on findings. Build with NPROC, which common.sh
caps on Kubernetes nodes where nproc reports the whole host.

Signed-off-by: Alexey Rivkin <arivkin@nvidia.com>
test_init_mt sized its thread count with nproc, which reports all host CPUs inside a Kubernetes pod, so the test started far more threads than the pod's CPU limit allows. NPROC, set by common.sh, follows the container limit.

Signed-off-by: Alexey Rivkin <arivkin@nvidia.com>
@Alexey-Rivkin
Alexey-Rivkin force-pushed the ci-jenkins-static-checks branch from fdece3a to 4ef3dbd Compare November 2, 2026 12:15
@svc-nvidia-pr-review

Copy link
Copy Markdown

🤖 Starting review — findings will be posted here when done.

Comment thread buildlib/tools/static_checks.sh Resolved
Comment thread buildlib/tools/static_checks.sh Resolved
@svc-ucx

svc-ucx commented Nov 2, 2026

Copy link
Copy Markdown

🤖 CI Triage Agent — UCX PR (Tests roce on worker 0) · commit 4ef3dbd6

TL;DR: The gtest run failed on a single flaky test, rc/test_ucp_sockaddr_protocols_err.tag_zcopy_64k_unexp/11 (rc_v,cuda_copy,rocm_copy/recv_stop,not_all_devs,mt), which took 181,556 ms versus ~400–700 ms for every sibling variant — i.e. a UCP request never completed after the forced receiver disconnect and the test hit the 180 s ucs::get_deadline() cap. This is a pre-existing RC-verbs/MT error-handling hang unrelated to the CI-only PR, so re-run the job and track the hang in test_tag_send_recv's wait loops rather than touching the PR.

Full analysis

Summary: make test in the "roce on worker 0" job exited 2 because 1 of 8967 gtests failed: rc/test_ucp_sockaddr_protocols_err.tag_zcopy_64k_unexp/11.

Root cause: From the Azure log: [ FAILED ] rc/test_ucp_sockaddr_protocols_err.tag_zcopy_64k_unexp/11, where GetParam() = rc_v,cuda_copy,rocm_copy/recv_stop,not_all_devs,mt and the TOP-20 table showing that same test at 181556 ms while all other test_ucp_sockaddr_protocols_err instances in the same log complete in 418–743 ms. 181.5 s matches almost exactly the gtest wait ceiling: ucs::get_deadline() = min(watchdog_timeout*0.75, test_timeout_in_sec) with test_timeout_in_sec = 180. (test/gtest/common/test_helpers.cc:29, :342-347), used by ucp_test::request_process() (test/gtest/ucp/ucp_test.cc:299-311). So the test was hung, not slow: during the error-handling phase of test_tag_send_recv() (recv_stop → receiver EP force-closed, then requests_wait(reqs) at test/gtest/ucp/ucp_test.cc:329 / test_ucp_sockaddr.cc:2402) a zcopy 64K send/recv request was never completed or purged on the rc_verbs transport with a multi-threaded worker, until request %p did not complete on time fired at the 180 s deadline and the test failed. The errors inside the test are swallowed by wrap_errors_logger, which is why only the summary line survives in the log tail. Nothing in the PR under test (branch ci-jenkins-static-checks, commit 4ef3dbd) touches UCP/UCT datapath code, and no recent commits touch src/uct/ib/rc/verbs/ (latest is 4d0b5b1, 2026-07), so this is a pre-existing flaky hang, not a regression from this PR.

Implicated commit: unknown — no datapath commit implicated; the tested commit [REDACTED:Hex High Entropy String] is CI-only.

File: test/gtest/ucp/test_ucp_sockaddr.cc:2402 (requests_wait(reqs) in test_tag_send_recv), deadline from test/gtest/ucp/ucp_test.cc:299-311 and test/gtest/common/test_helpers.cc:342

Suggested fix:

  1. Re-trigger the job — a single flaky test on an unrelated CI-config PR should not block it; the failure is not reproducible from the PR diff.
  2. To stop losing the root cause next time, bound and instrument the unbounded wait loops in this test so the failure is reported where it hangs rather than 180 s later: do_unexp_recv()'s probe loop while ((message == NULL) && (m_unreachable_err_count == 0)) (test_ucp_sockaddr.cc:2294-2298) and test_ucp_sockaddr_protocols::disconnect()'s while (m_err_count == 0) short_progress_loop(); (test_ucp_sockaddr.cc:2590-2595) have no deadline at all. Add ucs::get_deadline() checks plus a dump of the pending request/EP state on timeout.
  3. For the real bug, investigate purge/completion of RC-verbs zcopy (ZCOPY_THRESH=2k, 64 KB payload) requests when the peer EP is force-closed under UCS_THREAD_MODE_MULTI; a request stuck in the EP's tracked-request list after ucp_ep_close_nbx(FORCE) on the receiver is the most likely culprit, and it should be filed as a standalone flaky-test issue referencing this build (142089).

Related: none found — searches for test_ucp_sockaddr_protocols_err tag_zcopy_64k_unexp timeout, sockaddr_protocols_err flaky hang recv_stop, and request did not complete on time ... rc_v returned no matching issues/PRs.

🛡️ This comment had 1 potential secret(s) redacted (Hex High Entropy String). See request_id 3296bcf0-f156-47f4-8bfa-57da5437ee28 in the triage console for the audit trail.

The static checks pod is limited to 4 CPUs, but the analyzer build ran
with as many make jobs as the node has cores, 256 in a recent run, and
the pod was CPU-throttled in 61% of its scheduler periods over the last
week. With NPROC from common.sh it would still be 8, one per GiB of the
memory limit. Set NPROC to 4 for this job.

Signed-off-by: Alexey Rivkin <arivkin@nvidia.com>
@svc-ucx

svc-ucx commented Nov 23, 2026

Copy link
Copy Markdown

🤖 CI Triage Agent — Blossom-CI · commit aeb5ab7b

TL;DR: The Blossom-CI run never got to the Jenkins static-checks pipeline — the only error in the run's logs is Failed to create new client in the Authorization (OPERATION=AUTH) step, i.e. blossom-ci could not build a Jenkins/CI client because the CI server endpoint/credential isn't available to that job; fix the CI_SERVER wiring/reachability on the blossom runner and re-trigger, no UCX code is implicated.

Full analysis

Summary: Blossom-CI GHA run 45173612986 for PR #12167 (commit aeb5ab7, branch ci-jenkins-static-checks) produced no Jenkins job — Authorization logged "Failed to create new client" and no Start ci job log exists in the run archive.

Root cause: From the fetched run log, both jobs that produced output completed successfully: Authorization passed GPG + NVIDIA SSO for all 3 commits ("All 3 commit(s) on PR #12167 passed GPG + NVIDIA SSO checks") and set the args output; Vulnerability scan ran Black Duck Detect twice with Overall Status: SUCCESS and Black Duck Signature Scanner return code: 0. The single error line in the whole run is at 12:22:20.0935906Z Failed to create new client, emitted by blossom-ci during OPERATION: AUTH. That step is the one that talks to the Jenkins CI server, but in the workflow definition the Authorization job is given only OPERATION, REPO_TOKEN and REPO_KEY_DATA — no CI_SERVER — unlike Job-trigger/Upload-Log. The downstream Start ci job job has no log in the run archive at all, so the Jenkins static-checks pipeline was never started and no Jenkins build exists (all fetch_jenkins_* calls return HTTP 404). There is no timing anomaly (longest gap ≈ 100 s during Black Duck detector search, continuous activity otherwise), so this is not a hang or a timeout. Nothing in the available output points at the PR's own changes (0b0a74fb "CI: Fail the Jenkins static checks job on analyzer errors", aeb5ab7b "CI: Match the static checks make jobs to the pod CPU limit") — the analyzer/static-checks code never executed.

Implicated commit: unknown — CI plumbing/credential issue, not a source commit. (Note the running workflow came from openucx/ucx/.github/workflows/blossom-ci.yml@refs/heads/master and was auto-triggered via pull_request_target, while the branch copy of that file only declares issue_comment/workflow_dispatch — the two versions are out of sync.)

File: .github/workflows/blossom-ci.yml:33-38 (Authorization step env, missing CI_SERVER) and :62-72 (Start ci job, produced no log)

Suggested fix:

  1. Pass the CI server secret to the Authorization job the same way Job-trigger does (add CI_SERVER: ${{ secrets.CI_SERVER }} to the step env), so the AUTH operation can create its client instead of logging "Failed to create new client".
  2. Verify from the self-hosted blossom runner (ci-server / runner-openucx) that the Jenkins endpoint in the CI_SERVER secret is reachable and the stored credential is still valid; if it expired, rotate it in the repository secrets.
  3. Reconcile the master and PR-branch versions of blossom-ci.yml (the pull_request_target auto-trigger exists only in the ran/master copy), then re-trigger with /build to actually exercise the static-checks changes in this PR.

Related: #12167 (and sibling CI PRs #12166, #12168)

@svc-nvidia-pr-review

Copy link
Copy Markdown

🤖 Starting review — findings will be posted here when done.

@svc-ucx

svc-ucx commented Nov 23, 2026

Copy link
Copy Markdown

🤖 CI Triage Agent — UCX PR (AddressSanitizer roce on worker 0) · commit aeb5ab7b

TL;DR: The ASAN gtest shard failed on two tests; the significant one is rcx/test_ucp_fault_tolerance_tf.initiator_failure/11 (rc_x/AM|ALL_LANES_FAILED|MSG_MEDIUM), which burned exactly the 200 s ASAN deadline waiting for an AM that never arrived in token-failover mode (UCX_FAILOVER_MODE=token) and then failed — token failover does not yet fail over AM short/bcopy sends, so the data is silently lost. The fix is to gate/disable the _tf (token) FT variants until token failover is complete (as done upstream by prefixing the fixture with DISABLED_), per PR #12371.

Full analysis

Summary: make -C build-test/test/gtest test exited 1 with 2 failed tests out of 9243: rcx/test_ucp_fault_tolerance_tf.initiator_failure/11 and ib/test_md.alloc/1 (AddressSanitizer "roce on worker 0" job, Azure build 147082).

Root cause:

  • Timing evidence from the log: initiator_failure/11 took 200882 ms and target_failure/11 200856 ms, while every other test in the job ran in ≤20 s. 200 s is exactly ucs::get_deadline(DEFAULT_TIMEOUT_SEC=10.0) under ASAN (test_time_multiplier() = 20, capped by watchdog_timeout*0.75=675 s) — i.e. the test sat in a wait_for_* poll loop for the whole deadline, it was hung, not slow.
  • The only such wait on that path is do_am_send_and_wait() → wait_for_value(&m_am_received, true) (test/gtest/ucp/test_ucp_fault_tolerance.cc:738). Variant 11 is AM|ALL_LANES_FAILED|MSG_MEDIUM run by the _tf fixture, which sets FAILOVER_MODE=token. After all AM BW lanes are invalidated, the AM send/flush completes but the message is never delivered, so m_am_received never becomes true; after 200 s the following mem_buffer::pattern_check(m_am_rbuf.data(), ...) (line 739) compares stale/zeroed data and the test fails. This is the known gap that PR UCP/FT/AM: add token failover support for short and single/bcopy protocols #12371 ("UCP/FT/AM: add token failover support for short and single/bcopy protocols") addresses; the fixture is marked DISABLED_test_ucp_fault_tolerance_tf at HEAD with the comment "Disabled until token failover is complete", which means the suite was still enabled in the tree this build was made from.
  • ib/test_md.alloc/1 (mlx5_1) is an independent failure in the same shard; the per-test assertion text is not in the retrievable 500-line tail. The only failing assertions in that test are in test/gtest/uct/test_md.cc:537-560 (EXPECT_GT(mem.length, 0) / ASSERT_UCS_OK(status) / EXPECT_LT(num_alloc_failures/iterations, 0.5) "Too many OUT_OF_RESOURCE failures"), i.e. MD allocation/mkey-pack pressure on the ASAN runner — unrelated to the FT failure and to this PR.
  • Neither failure can be caused by PR CI: Fail the Jenkins static checks job on analyzer errors #12167 (branch ci-jenkins-static-checks, CI-only change); both are pre-existing/environmental for this shard.

Implicated commit: dd4ed49a "UCP: add UCX_FAILOVER_MODE parameter (#11994)" — Evgeny Leksikov (introduced token failover mode and the *_tf FT fixture); mitigation tracked in PR #12371.

File: test/gtest/ucp/test_ucp_fault_tolerance.cc:738 (wait that consumes the 200 s deadline) and :931-938 (*_tf / FAILOVER_MODE=token fixture); secondary: test/gtest/uct/test_md.cc:537-560

Suggested fix:

  1. Keep/confirm the _tf token-failover FT suite disabled (DISABLED_test_ucp_fault_tolerance_tf) or explicitly skip the TEST_OP_ALL_LANES_FAILED + AM variants in token mode until the AM short/single-bcopy failover support from PR UCP/FT/AM: add token failover support for short and single/bcopy protocols #12371 lands; this removes both the failure and the ~400 s of wasted wall time in the shard.
  2. Make the hang loud instead of a 200 s silent wait: have do_am_send_and_wait() assert on the wait result, e.g. ASSERT_TRUE(wait_for_value_ok(&m_am_received, true, 5.0)) with an explicit short timeout, so a lost AM fails fast with a clear message rather than via a pattern mismatch.
  3. For ib/test_md.alloc/1: re-run/collect the full gtest output for that test (the assertion line is truncated in the console tail). Independently, fix the ordering bug at test_md.cc:537-541 where mem.length/mem.address are read before ASSERT_UCS_OK(status) — on any non-UCS_ERR_NO_MEMORY failure mem is uninitialized, which turns a clean status failure into a confusing one.

Related: #12371 (token failover for AM short/single-bcopy), #11994 (UCX_FAILOVER_MODE), PR under test: #12167

@svc-ucx

svc-ucx commented Nov 23, 2026

Copy link
Copy Markdown

🤖 CI Triage Agent — UCX-OSS/ucx-coverity-oss · commit aeb5ab7b

TL;DR: The build didn't fail on code — both coverity branches could never get a Jenkins agent because the nbu-swx-ucx Kubernetes namespace CPU/memory quota was fully consumed (used ~119100m of a 120-CPU limit), so pod creation was rejected with HTTP 403 for ~30 minutes until the pipeline timeout fired. Fix is on the CI infra side: reduce the 6500m/10Gi per-pod requests (see PR #12420) and/or raise the namespace quota / serialize the coverity job.

Full analysis

Summary: UCX-OSS/ucx-coverity-oss #130 aborted after the Parallel stage (branches x86_64/cov/release and x86_64/cov/devel) spent its entire 90-minute budget failing to launch Kubernetes agent pods, ending with FlowInterruptedException: Timeout has been exceeded.

Root cause: Agent pod creation was repeatedly rejected by the API server:
pods "ucx-coverity-cov-130-*" is forbidden: exceeded quota: resourcequota-nbu-swx-ucx, requested: cpu=6500m,memory=10Gi, used: cpu=116600m,memory=300Gi, limited: cpu=120,memory=300Gi (403 Forbidden).
The namespace was already at 116600m–119100m of its 120 CPU limit and at 300Gi/300Gi memory before this build asked for anything, so neither parallel branch's 6500m/10Gi request could ever be admitted. The kubernetes plugin retried every ~10–20 s (13:49:43 → 13:51:22 in the tail), then went silent until Cancelling nested steps due to timeout / Failed in branch x86_64/cov/release at 14:21:13. The ~30 min silent gap is the plugin's provisioning back-off waiting on quota, not a hang in UCX code — there is zero application output in the whole build after Checkout source code succeeded (83 s). No compile, coverity, or test output exists, so nothing in commit aeb5ab7b was actually exercised.

Implicated commit: No product-code commit. Contributing CI change: aeb5ab7b "CI: Match the static checks make jobs to the pod CPU limit" (Alexey Rivkin, 2026-11-23) — it aligns make parallelism with the pod CPU limit, which keeps the per-pod request high (6500m) and makes these jobs much more likely to be starved when the namespace is busy. The primary cause is namespace-wide quota contention from concurrently running builds.

File: CI pod template resource requests for the coverity job (cpu=6500m, memory=10Gi) — defined in the Jenkins pod template / .ci/jenkins job config for ucx-coverity-oss; the .ci tree at this revision was last touched by aeb5ab7b.

Suggested fix:

  1. Re-run the build — it is an infrastructure flake, not a code failure.
  2. Land/pick up PR CI: Set the Jenkins pod requests from their measured use #12420 ("CI: Set the Jenkins pod requests from their measured use") to lower the 6500m CPU / 10Gi memory requests to actual measured usage; at 6.5 CPU per pod, 120 CPU quota is exhausted by ~18 concurrent agents.
  3. Make the quota condition fail fast instead of burning 90 minutes: cap podRetention/provisioning wait (e.g. kubernetes plugin waitForPodSec or a short timeout around the node block) so the build errors with a clear "quota exceeded" message rather than a generic pipeline timeout.
  4. Optionally throttle the coverity job (lock/disableConcurrentBuilds or a dedicated quota slice) so it isn't competing with the full build matrix for the same 120-CPU namespace.

Related: #12420 (pod requests from measured use), #12167 (this PR), prior CPU-request reduction [REDACTED:Hex High Entropy String] / #11494

🛡️ This comment had 1 potential secret(s) redacted (Hex High Entropy String). See request_id 206e6d0b-995f-456f-a3e4-130d1aef77e3 in the triage console for the audit trail.

@svc-ucx

svc-ucx commented Nov 23, 2026

Copy link
Copy Markdown

🤖 CI Triage Agent — UCX-OSS/ucx-coverity-oss · commit aeb5ab7b

TL;DR: The coverity build never started any work — both matrix pods were rejected by Kubernetes because the nbu-swx-ucx namespace memory quota was already exhausted (303616Mi used of a 300Gi limit), so the two parallel branches sat unscheduled until the 90-minute pipeline timeout aborted them. This is a CI infrastructure/capacity issue, not a code regression in PR #12167.

Full analysis

Summary: UCX-OSS/ucx-coverity-oss #155 failed with FlowInterruptedException: Timeout has been exceeded in the "Parallel" stage after both x86_64/cov/release and x86_64/cov/devel agents failed to be provisioned.

Root cause: At 14:26:40 the Kubernetes plugin got a 403 from the API server: pods "ucx-coverity-cov-155-4mrch-38pm9" is forbidden: exceeded quota: resourcequota-nbu-swx-ucx, requested: memory=10Gi, used: memory=303616Mi, limited: memory=300Gi. The retry wrapper re-queued the node, which then reported All nodes of label 'UCX-OSS_ucx-coverity-oss_155-pkhhl' are offline / Still waiting to schedule task at 14:26:53. After that the log is completely silent for ~90 minutes until Cancelling nested steps due to timeout and Failed in branch ... at 15:56:38 — i.e. the entire runtime was spent waiting for an agent that could never be allocated, not running coverity. Nothing from buildlib/tools/coverity.sh ever executed, and the checked-out diff for PR #12167 (static_checks_matrix.yaml, static_checks.sh, test_jenkins.sh, src/uct/cuda/cuda_ipc/*) does not touch the coverity pipeline config at all, so the PR content is not implicated.

Implicated commit: unknown (no code commit implicated; the namespace quota was already saturated by other concurrently running jobs). Last functional changes to the job config are [REDACTED:Hex High Entropy String] "CI: reduce CPU requests in all CI pipelines (#11494)" by NirWolfer and a346463 by Alexey Rivkin — neither caused this.

File: .ci/pipeline/coverity_matrix.yaml (the kubernetes: block — limits/requests: "{memory: 8Gi, cpu: 6000m}", which with sidecars totals the 10Gi request that was refused)

Suggested fix:

  1. Simply re-run build expose alignemnt requirements for operations and check it #155 — once the namespace frees memory the pods will schedule. This is a transient capacity failure, not a reproducible test failure.
  2. To stop it recurring, make the failure fast and loud instead of a 90-minute silent timeout: wrap the node/pod allocation in a short dedicated timeout (e.g. 10 min) inside the retry, so an unschedulable pod aborts quickly with the quota error rather than consuming the whole timeout_minutes: 90 budget. (Today the outer 90-min timeout in the shared ci-demo matrix library is the only guard.)
  3. Longer term, either raise the resourcequota-nbu-swx-ucx memory limit above 300Gi, or reduce the coverity pod footprint in .ci/pipeline/coverity_matrix.yaml (8Gi × 2 parallel axes) and/or cap concurrency on this namespace so polling-triggered jobs don't pile up against the quota.

Related: none directly (searches for the quota error returned only unrelated open CI PRs: #12418, #12168, #12094)

🛡️ This comment had 1 potential secret(s) redacted (Hex High Entropy String). See request_id ec0e5536-3239-4129-a78b-3fcfbc2c25c5 in the triage console for the audit trail.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants