Skip to content

fix(core): reject IPC registration without IPC state - #2591

Closed
aryanputta wants to merge 1 commit into
NVIDIA:mainfrom
aryanputta:fix/ipc-register-disabled
Closed

fix(core): reject IPC registration without IPC state#2591
aryanputta wants to merge 1 commit into
NVIDIA:mainfrom
aryanputta:fix/ipc-register-disabled

Conversation

@aryanputta

Copy link
Copy Markdown
Contributor

Fixes #2568.

DeviceMemoryResource.register() and PinnedMemoryResource.register() can reach MP_register without IPC enabled. The current implementation dereferences self._ipc_data, causing a process-level segmentation fault instead of a Python exception.

This change:

  • raises RuntimeError("Memory resource is not IPC-enabled") before the dereference;
  • preserves the existing-resource fast path;
  • adds coverage for both device and pinned memory resources;
  • adds a release note.

Validation:

  • Ruff check and format passed.
  • Cython lint passed.
  • Focused pytest collection was blocked on macOS because the CUDA test helper requires Linux libc.so.6.
  • Lychee was blocked by sandbox network access to existing external links.

@copy-pr-bot

copy-pr-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

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 github-actions Bot added the cuda.core Everything related to the cuda.core module label Aug 10, 2026
@lijinf2

lijinf2 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution!

This looks like a duplicate of #2569, which was opened by the issue author to address the same bug in #2568. Both PRs raise RuntimeError("Memory resource is not IPC-enabled") when register() is called on a non-IPC memory resource.

@aryanputta aryanputta closed this Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.core Everything related to the cuda.core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: DeviceMemoryResource.register() segfaults when IPC is not enabled

2 participants