Skip to content

fix(posix): recover io_uring after I/O failures#1942

Open
lluki wants to merge 1 commit into
ai-dynamo:mainfrom
lluki:enospc-uring-fix
Open

fix(posix): recover io_uring after I/O failures#1942
lluki wants to merge 1 commit into
ai-dynamo:mainfrom
lluki:enospc-uring-fix

Conversation

@lluki

@lluki lluki commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

What?

Fix io_uring submission failures so partial submissions remain in progress and are resubmitted, while complete submission failures cancel and drain all outstanding requests. This is a uring focused version of PR #1697, I'll send follow up PR's for the other POSIX modes.

Why?

A single failed I/O or a single failed io_uring_submit() could leave requests queued indefinitely and disallow the queue to be reused.

How?

Posix Backend changes

Changes to the generic POSIX part that interfaces with a io_engine (aio, uring, ...).

nixlPosixBackendReqH enqueues transfers with completion callbacks, then drives progress through io_queue::post() and poll(). If a transfer fails, nixlPosixBackendReqH calls the newly added cancel(ctx) once to request cancellation of that transfer’s remaining I/Os. Even after all callbacks arrive, hasPendingCleanup() may require continued polling while the queue finishes internal cleanup. io_uring implements both functions because cancellation SQEs and their CQEs must be drained before queue reuse. AIO behavior remains unchanged because its default cancel() is unsupported and hasPendingCleanup() is false, so failures retain their previous immediate-return semantics.

IO_URING changes

There are two failure modes: A failed I/O will cause all the I/Os of that batch to be cancelled, then failure is communicated to the submitter of that batch. If the global io_uring_submit() fails with a permanent failure, all current xfers are cancelled and become failing. This is because the submission ring contains SQEs from different requests. Transient failures report IN_PROG, requesting to be polled again.

Scope of this PR

It is deliberately focused on io_uring. AIO will be treated in a follow up PR, also user invoked cancellation is out of scope (#1955)

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Added cancellation and “pending cleanup” reporting to the POSIX I/O queue APIs.
    • Enhanced io_uring queue lifecycle with explicit cancellation/completion handling.
  • Bug Fixes

    • Improved transfer status tracking by coordinating per-I/O failures, cancellation requests, and queue cleanup.
    • Prevents new I/O submission while cleanup is in progress; ensures appropriate operations are cancelled/unqueued.
  • Tests

    • Added deterministic io_uring submission edge-case tests and improved repost validation.
    • Updated unit test builds/CI and test runner scripts to run with --enable-uring (and re-enabled the POSIX test).

@copy-pr-bot

copy-pr-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions

Copy link
Copy Markdown

👋 Hi lluki! Thank you for contributing to ai-dynamo/nixl.

Your PR reviewers will review your contribution then trigger the CI to test your changes.

🚀

@lluki lluki force-pushed the enospc-uring-fix branch 2 times, most recently from f267f5f to a470f68 Compare July 14, 2026 14:19
@lluki lluki force-pushed the enospc-uring-fix branch from a470f68 to a855016 Compare July 14, 2026 14:30
@lluki lluki marked this pull request as ready for review July 14, 2026 14:35
@lluki lluki requested review from a team, brminich, ofer, vvenkates27 and w1ldptr as code owners July 14, 2026 14:35
@lluki

lluki commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

/build

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Changes

The POSIX I/O queues now expose cancellation and pending-cleanup status. The io_uring implementation separates submission, cancellation, and completion draining, while backend requests propagate failures until cleanup finishes. Tests and CI exercise io_uring submission failures, partial submissions, and repost behavior.

POSIX I/O lifecycle

Layer / File(s) Summary
Queue contract and backend state
src/plugins/posix/io_queue.h, src/plugins/posix/posix_backend.h, src/plugins/posix/posix_backend.cpp
Adds cancellation and cleanup APIs, transfer-failure tracking, and queue-progress coordination.
io_uring submission, cancellation, and reaping
src/plugins/posix/io_uring_io_queue.cpp
Separates SQE preparation, submission, cancellation, CQE reaping, and cleanup termination handling.
io_uring test coverage and build wiring
test/unit/plugins/posix/*, .gitlab/test_cpp.sh, .ci/jenkins/lib/*.yaml
Adds conditional io_uring linking, submit wrappers, runtime tests, repost validation, CLI forwarding, and CI enablement.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant nixlPosixBackendReqH
  participant nixlPosixIOQueueUring
  participant io_uring
  nixlPosixBackendReqH->>nixlPosixIOQueueUring: post or poll transfer
  nixlPosixIOQueueUring->>io_uring: prepare and submit SQEs
  io_uring-->>nixlPosixIOQueueUring: completion CQEs
  nixlPosixBackendReqH->>nixlPosixIOQueueUring: cancel(ctx)
  nixlPosixIOQueueUring->>io_uring: submit cancellation SQEs
  io_uring-->>nixlPosixIOQueueUring: cancellation CQEs
  nixlPosixIOQueueUring-->>nixlPosixBackendReqH: report final cleanup status
Loading

Suggested reviewers: aranadive, colinnv, ovidiusm

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: recovering io_uring after I/O failures in the POSIX path.
Description check ✅ Passed The description includes the required What, Why, and How sections and sufficiently explains the fix.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/unit/plugins/posix/nixl_posix_test.cpp`:
- Line 928: Update the local rlimit variable in the test to be const-qualified,
preserving its existing initialization and use when passed to setrlimit.
- Around line 93-108: Add a null check immediately after
`nixlPosixIOQueue::instantiate` in `UringTest` and fail cleanly if it returns
null, using the test’s existing exception/error-handling convention before any
queue operations occur.
- Around line 916-943: Update the SIGXFSZ handling in the use_uring branch to
save the previous handler returned by signal(SIGXFSZ, SIG_IGN), then restore
that handler after the transfer status check alongside restoring the saved
RLIMIT_FSIZE. Preserve the existing error and short-write behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: f8ad2e16-7983-4b6a-9918-aebbde1a474a

📥 Commits

Reviewing files that changed from the base of the PR and between b594eb0 and a855016.

📒 Files selected for processing (6)
  • src/plugins/posix/io_queue.h
  • src/plugins/posix/io_uring_io_queue.cpp
  • src/plugins/posix/posix_backend.cpp
  • src/plugins/posix/posix_backend.h
  • test/unit/plugins/posix/meson.build
  • test/unit/plugins/posix/nixl_posix_test.cpp

Comment thread test/unit/plugins/posix/nixl_posix_test.cpp
Comment thread test/unit/plugins/posix/nixl_posix_test.cpp
Comment thread test/unit/plugins/posix/nixl_posix_test.cpp
@svc-nixl

Copy link
Copy Markdown
Collaborator

🤖 CI Triage Agentnixl-ci-test-sanitizers · commit 44d66871

TL;DR: Both sanitizer matrix jobs (tsan and asan_ubsan) fail at the nixl_posix_test stage, which aborts instantly with io_uring runtime probe failed: Cannot allocate memory — an ENOMEM from io_uring_setup due to the sanitizer runner's low locked-memory (RLIMIT_MEMLOCK) limit, not a NIXL code bug. Fix by raising the memlock ulimit on the sanitizer container (or letting the POSIX io_uring probe fall back to AIO instead of hard-failing the test).

Full analysis

Summary: The Test Sanitizer stage fails on both the x86_64/tsan and x86_64/asan_ubsan tasks; nixl_posix_test -n 128 -s 1048576 exits with rc=1.

Root cause: nixl_posix_test prints exactly two lines and dies immediately (same wall-clock second — no hang):

NIXL POSIX Plugin Test
io_uring runtime probe failed: Cannot allocate memory

Cannot allocate memory is ENOMEM returned by the io_uring setup path. io_uring rings must be pinned via RLIMIT_MEMLOCK; when that ulimit is too low the kernel returns ENOMEM. This reproduces identically on both sanitizer variants and only in this environment (note nvidia-smi: command not found at the top of both logs — these are the CPU-only sanitizer runners). Every other stage (meson sanitizer suite, ucx_backend_test, agent_example, serdes_test, test_plugin, etc.) passes, so this is an environment/resource-limit issue at the io_uring probe, not a sanitizer finding or a defect in NIXL transfer code. In .gitlab/test_sanitizer.sh:146 this binary is a hard run_stage, so its rc=1 propagates to exit 1 (line 168) and aborts the whole matrix.

Implicated commit: No NIXL code change caused this. The stage was introduced/reshaped by NirWolfer in the sanitizer-CI series ([REDACTED:Hex High Entropy String] "ci: add AddressSanitizer/UBSanitizer/ThreadSanitizer builds" #1709; e0053e8 #1874). The actual trigger is the sanitizer container's memlock limit, not a source commit.

File: .gitlab/test_sanitizer.sh:146 (the nixl_posix_test stage); io_uring probe lives in the POSIX plugin's io_uring queue setup under src/plugins/posix/.

Suggested fix: On the sanitizer CI runners, raise the locked-memory limit for the test container — e.g. run with --ulimit memlock=-1 (or ulimit -l unlimited) as is already done for the RDMA/UCX runners, or add LimitMEMLOCK=infinity in the container spec. Alternatively/additionally, make the POSIX io_uring runtime probe degrade gracefully: on ENOMEM from io_uring_setup, fall back to the AIO/LINUXAIO queue (the fallback path added in #1605) and skip io_uring rather than exiting rc=1, so a constrained sanitizer sandbox doesn't fail the whole job. Confirm the memlock ulimit differs between the sanitizer runners and the normal nixl-ci-test runners where this test passes.

Related: PR #1709 (add sanitizer builds), PR #1874 (sanitizer stage tuning), PR #1605 (POSIX backend queue fallback handling), PR #1577 (liburing wrap).

🛡️ This comment had 1 potential secret(s) redacted (Hex High Entropy String). See request_id 7c515a18-e2e3-4a9f-8480-f7d00aaec575 in the triage console for the audit trail.

@svc-nixl

Copy link
Copy Markdown
Collaborator

🤖 CI Triage Agentnixl-ci-non-gpu · commit 44d66871

TL;DR: The Test CPP stage fails on all x86_64 images at ./bin/nixl_posix_test, which aborts with io_uring runtime probe failed: Cannot allocate memory — a new runtime io_uring probe added by PR #1942 hard-fails on ENOMEM (restricted RLIMIT_MEMLOCK/kernel 5.4 in the CI container) instead of gracefully degrading. Make the probe treat ENOMEM/probe failure as "io_uring unavailable" and fall back (or skip the test) rather than exiting non-zero.

Full analysis

Summary: nixl-ci-non-gpu #2325 failed in the Test CPP stage (x86_64 images 401/414/427) at nixl_posix_test -n 128 -s 1048576, which printed io_uring runtime probe failed: Cannot allocate memory and exited 1.

Root cause: PR #1942 ("fix(posix): recover io_uring after I/O failures") adds a new io_uring runtime probe. In the CI container (kernel 5.4.0-216-generic, no elevated locked-memory limit), io_uring_queue_init/setup returns ENOMEM ("Cannot allocate memory"). The new probe treats this as a fatal error and makes the test exit non-zero, instead of detecting that io_uring is unavailable at runtime and falling back to the default queue (or skipping). This is not a hang — timestamps show continuous activity right up to the immediate failure at 14:49:15.

Implicated commit: PR #1942 by lluki (Lukas Humbel), head commit [REDACTED:Hex High Entropy String]. The io_uring runtime probe failed string is new and not present in prior POSIX plugin history.

File: test/unit/plugins/posix/nixl_posix_test.cpp (runtime-probe / backend-creation path, ~lines 65–95) and the io_uring queue init in the POSIX plugin added by PR #1942 (src/plugins/posix/ io_uring queue implementation).

Suggested fix: Distinguish "io_uring compiled in" from "io_uring usable at runtime." When the runtime probe (io_uring_queue_init) returns ENOMEM/EPERM/ENOSYS, log a warning and fall back to the default (Linux AIO) queue rather than returning a fatal error; in the test, treat an unavailable io_uring runtime as a skip (as has_supported_test_queue() already does at compile time) instead of exit code 1. Alternatively, reduce the probe's requested queue depth so it stays within the container's RLIMIT_MEMLOCK.

Related: PR #1942 (#1942); references prior work PR #1697 and POSIX queue-fallback PR #1605.

🛡️ This comment had 1 potential secret(s) redacted (Hex High Entropy String). See request_id 132f9e95-8567-4d52-a6fd-4ec66604821e in the triage console for the audit trail.

@lluki lluki force-pushed the enospc-uring-fix branch from a855016 to 35cb811 Compare July 15, 2026 07:45
@lluki lluki requested a review from a team as a code owner July 15, 2026 07:45

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/plugins/posix/io_queue.h`:
- Around line 55-64: Document the public virtual APIs cancel and
hasPendingCleanup in io_queue.h with Doxygen-style block comments. Describe
cancel’s cancellation scope, asynchronous cleanup behavior, ctx ownership, and
possible return values; describe hasPendingCleanup’s cleanup-state meaning and
boolean result. Keep the existing implementations unchanged.

In `@src/plugins/posix/io_uring_io_queue.cpp`:
- Around line 60-63: Update hasPendingCleanup() to report pending cleanup when
either submission_failure_draining_ or cancel_sqes_outstanding_ is active.
Preserve the existing const override and ensure cancellation CQEs keep the
backend in cleanup until they are drained.

In `@test/unit/plugins/posix/nixl_posix_test.cpp`:
- Around line 921-924: Bound the polling loop following agent.postXferReq in the
short-write recovery test: limit iterations or enforce a deadline while status
remains NIXL_IN_PROG, then report a test failure when the bound is exceeded.
Preserve the existing getXferStatus polling and success behavior when completion
occurs within the limit.
- Around line 185-190: Update runUringSubmissionTests() and its main() handling
so io_uring initialization errors indicating unavailable support (-ENOMEM,
-EPERM, or -ENOSYS) propagate a distinct skip/fallback result rather than
failure. Reserve the existing failure result for unexpected probe errors,
allowing main() to continue to Linux AIO or skip the io_uring tests.
- Line 59: Rename the Buffers type alias to the repository-compliant lower_case
name with a _t suffix, and update every reference to the alias in the
surrounding test code accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 282eca62-1143-4fe0-8f66-6165582a820e

📥 Commits

Reviewing files that changed from the base of the PR and between a855016 and 35cb811.

📒 Files selected for processing (9)
  • .ci/jenkins/lib/test-dl-matrix.yaml
  • .ci/jenkins/lib/test-matrix.yaml
  • .gitlab/test_cpp.sh
  • src/plugins/posix/io_queue.h
  • src/plugins/posix/io_uring_io_queue.cpp
  • src/plugins/posix/posix_backend.cpp
  • src/plugins/posix/posix_backend.h
  • test/unit/plugins/posix/meson.build
  • test/unit/plugins/posix/nixl_posix_test.cpp

Comment thread src/plugins/posix/io_queue.h Outdated
Comment thread src/plugins/posix/io_uring_io_queue.cpp
Comment thread test/unit/plugins/posix/nixl_posix_test.cpp Outdated
Comment thread test/unit/plugins/posix/nixl_posix_test.cpp
Comment thread test/unit/plugins/posix/nixl_posix_test.cpp
@lluki lluki force-pushed the enospc-uring-fix branch 3 times, most recently from f3962ea to f6166ed Compare July 15, 2026 08:47

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/plugins/posix/io_uring_io_queue.cpp`:
- Around line 136-138: Update the cancellation flow around the io_uring
submission logic and driveSubmissions() to retain cancellation contexts when
io_uring_get_sqe() returns null, then retry those contexts until every matching
in-flight I/O is canceled or completed. Ensure hasPendingCleanup() reports
unprepared cancellation work, and keep cancellation latched while deferred
retries are pending.

In `@src/plugins/posix/posix_backend.cpp`:
- Around line 167-179: Update nixlPosixBackendReqH::queueResult so
NIXL_ERR_NOT_SUPPORTED from requestCancellationOnce() is not returned as a
terminal result while callbacks or outstanding I/Os still require progress.
Continue polling via needsQueueProgress() first, and only return a terminal
backend or queue result once no callbacks remain, preserving existing failure
handling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 095de234-0c79-4000-bb06-eff53096d224

📥 Commits

Reviewing files that changed from the base of the PR and between 35cb811 and 2943b97.

📒 Files selected for processing (9)
  • .ci/jenkins/lib/test-dl-matrix.yaml
  • .ci/jenkins/lib/test-matrix.yaml
  • .gitlab/test_cpp.sh
  • src/plugins/posix/io_queue.h
  • src/plugins/posix/io_uring_io_queue.cpp
  • src/plugins/posix/posix_backend.cpp
  • src/plugins/posix/posix_backend.h
  • test/unit/plugins/posix/meson.build
  • test/unit/plugins/posix/nixl_posix_test.cpp

Comment thread src/plugins/posix/io_uring_io_queue.cpp
Comment thread src/plugins/posix/posix_backend.cpp
@lluki lluki force-pushed the enospc-uring-fix branch from f6166ed to c35426d Compare July 15, 2026 08:54

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
src/plugins/posix/posix_backend.cpp (1)

172-174: ⚠️ Potential issue | 🟠 Major

Still keep polling when cancellation is unsupported but callbacks remain.

requestCancellationOnce() can return NIXL_ERR_NOT_SUPPORTED, but this branch returns a terminal status before checking needsQueueProgress(). If callbacks are still outstanding, the request may be destroyed while ioDoneClb() still references this, causing a use-after-free. Return NIXL_IN_PROG until all I/Os are accounted for.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/plugins/posix/posix_backend.cpp` around lines 172 - 174, Update the
requestCancellationOnce() unsupported path to check needsQueueProgress() before
returning a terminal status. Return NIXL_IN_PROG while callbacks or outstanding
I/O remain, and only preserve the existing queue_result/NIXL_ERR_BACKEND result
after all I/Os are accounted for.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/plugins/posix/io_uring_io_queue.cpp`:
- Around line 198-205: Update the fatal-error path after io_uring_submit in the
submission logic to retire and recreate the io_uring instance instead of calling
beginSubmissionFailureDrain(). Ensure submission_failure_draining_ cannot remain
stuck and return the existing NIXL_ERR_BACKEND result after the ring replacement
attempt.

In `@src/plugins/posix/posix_backend.h`:
- Around line 42-63: Reorder the class declaration containing allIOsAccountedFor
and needsQueueProgress to follow the required layout: place the public section
first, then the private section, with private methods before private data
members. Keep the existing API, fields, and helper implementations unchanged
aside from their declaration order.

---

Duplicate comments:
In `@src/plugins/posix/posix_backend.cpp`:
- Around line 172-174: Update the requestCancellationOnce() unsupported path to
check needsQueueProgress() before returning a terminal status. Return
NIXL_IN_PROG while callbacks or outstanding I/O remain, and only preserve the
existing queue_result/NIXL_ERR_BACKEND result after all I/Os are accounted for.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 0329e8c6-7cc6-4ccb-a5ad-d3614b753785

📥 Commits

Reviewing files that changed from the base of the PR and between 2943b97 and c35426d.

📒 Files selected for processing (9)
  • .ci/jenkins/lib/test-dl-matrix.yaml
  • .ci/jenkins/lib/test-matrix.yaml
  • .gitlab/test_cpp.sh
  • src/plugins/posix/io_queue.h
  • src/plugins/posix/io_uring_io_queue.cpp
  • src/plugins/posix/posix_backend.cpp
  • src/plugins/posix/posix_backend.h
  • test/unit/plugins/posix/meson.build
  • test/unit/plugins/posix/nixl_posix_test.cpp

Comment thread src/plugins/posix/io_uring_io_queue.cpp
Comment thread src/plugins/posix/posix_backend.h Outdated
@lluki lluki force-pushed the enospc-uring-fix branch from c35426d to 9a7009e Compare July 15, 2026 09:18

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/plugins/posix/io_uring_io_queue.cpp`:
- Around line 84-85: Rename the private members in
src/plugins/posix/io_uring_io_queue.cpp lines 84-85 to
submissionFailureDraining_ and cancelSqesOutstanding_, updating all references;
also rename the corresponding fields and usages in
src/plugins/posix/posix_backend.cpp lines 133-134 to transferFailed_ and
cancellationRequested_ to satisfy the required camelBack trailing-underscore
convention.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 7864ef7d-0962-4389-8866-5010589329ed

📥 Commits

Reviewing files that changed from the base of the PR and between c35426d and 9a7009e.

📒 Files selected for processing (9)
  • .ci/jenkins/lib/test-dl-matrix.yaml
  • .ci/jenkins/lib/test-matrix.yaml
  • .gitlab/test_cpp.sh
  • src/plugins/posix/io_queue.h
  • src/plugins/posix/io_uring_io_queue.cpp
  • src/plugins/posix/posix_backend.cpp
  • src/plugins/posix/posix_backend.h
  • test/unit/plugins/posix/meson.build
  • test/unit/plugins/posix/nixl_posix_test.cpp

Comment thread src/plugins/posix/io_uring_io_queue.cpp
@lluki

lluki commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 9a7009e

@lluki

lluki commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

/build

@svc-nixl

Copy link
Copy Markdown
Collaborator

🤖 CI Triage Agentnixl-ci-gpu · commit 3e38e667

TL;DR: The "Run CPP tests" gtest stage failed because UCX could not open the RDMA device (mlx5_0:1: "there is no valid pkey to use") and, more fundamentally, the test binary can't load libcudart.so.13 — every UCX/CUDA gtest exits 127. Root cause is an environment/image mismatch (CUDA 13 runtime not on the loader path / no RDMA fabric on node mizu03), not a code bug; fix the test-container CUDA runtime + IB fabric setup.

Full analysis

Summary: Both nixl-ci-gpu #2757 "Run CPP tests" stages (nodes 220 and 242) failed: gtest returned exit code 127 for 64/154 tests because ./bin/gtest: error while loading shared libraries: libcudart.so.13: cannot open shared object file, preceded by UCX backend-creation failures.

Root cause: Two coupled environment problems on GPU node mizu03, not application logic:

  • UCX cannot create a worker: ib_iface.c:1207 UCX ERROR there is no valid pkey to use on mlx5_0:1/IBuct_iface_open(rc_verbs/mlx5_0:1) failed: No such elementFailed to create UCX workercreateBackend: backend creation failed for 'UCX'. Also scandir(/sys/class/net) failed and Failed to scan PCI devices directory, indicating the container has no visibility into the network/PCI fabric. This makes ucx/TestTransfer.RandomSizes and the error-handling tests fail (status -3, backend_handle NULL), and the threadpool cases then SIGSEGV because they dereference the NULL backend handle.
  • After the SIGSEGV, every subsequent gtest shard aborts with exit 127: libcudart.so.13: cannot open shared object file. The CUDA 13 runtime library is not resolvable by the dynamic loader in the test container (image is ...cuda13.3...), so all remaining CUDA-linked tests can't even start. Stage 220 shows the same class of failure (./bin/gtest ... No such file or directory / ./bin/test_plugin: required file not found) after the container/export step.

These are symptoms of a broken test image/runtime environment (missing libcudart.so.13 on LD_LIBRARY_PATH and no usable IB pkey/fabric), not of PR #1942's code — the POSIX/GUSLI/agent smoke tests earlier in the same stage passed.

Implicated commit: unknown (no code commit implicated; this is an environment/image regression on node mizu03). The most recent CI-script change touching this path is e286b8f7 (NirWolfer, "ci: export container on test failure", #1800), which only added the post-failure enroot export seen at the end of the log.

File: test/gtest/error_handling.cpp:52-53 (where EXPECT_EQ(NIXL_SUCCESS, status)/EXPECT_NE(nullptr, backend_handle) fire) and .gitlab/test_cpp.sh (test harness); underlying issue is the container's CUDA-13 runtime path and IB fabric, not these files.

Suggested fix:

  1. Fix the CUDA runtime availability in the GPU test image: ensure libcudart.so.13 is installed and on the loader path (e.g. ldconfig / LD_LIBRARY_PATH includes the CUDA 13.3 libs) so ./bin/gtest can start. This alone unblocks the 60+ exit-127 tests.
  2. Fix the IB/RDMA environment on mizu03: provision a valid pkey on mlx5_0:1 and pass /sys/class/net + PCI devices into the container, or configure UCX to fall back cleanly (e.g. restrict UCX_TLS/UCX_NET_DEVICES) so TestErrorHandling/TestTransfer don't fail worker creation.
  3. Defensively, harden the threadpool error-handling test so a failed createBackend (NULL backend_handle) does not SIGSEGV — bail out after the EXPECT_NE(nullptr, backend_handle) instead of dereferencing it.

Related: none found.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants