Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

cuda.core: a fast-path VMM grow leaves its extension unfreeable

Đang mở
#2,887 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
hpc

Hướng nghiên cứu

Bắt đầu tại _grow_allocation_fast_path và theo dõi cách Buffer, close() và deallocate(ptr, size) quản lý các vùng dự trữ, ánh xạ và bộ nhớ vật lý. Xem lại bài kiểm thử fast path hiện có, sau đó bổ sung phạm vi kiểm thử để phát hiện vùng dự trữ mở rộng vẫn được cấp phát sau close; hoàn thành nghĩa là mọi vùng dự trữ và ánh xạ do buffer sở hữu đều được giải phóng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug cuda.core

Summary

_grow_allocation_fast_path maps a new chunk into a second, adjacent VA reservation and updates buf._size in place. The Buffer's deleter captured the original size when the buffer was created, so close() calls deallocate(ptr, original_size) and frees only the first reservation. The extension's reservation, mapping, and physical memory leak with no warning.

No deallocate(ptr, size) call can fix this: cuMemAddressFree frees a reservation only when ptr and size match exactly one reservation, so a range that spans two reservations cannot be freed in one call. The buffer needs to own each reservation and mapping it consists of.

Status

Today the fast path is unreachable (#2388 defect 2). #2237 and #2407 make it live and would expose this leak, so they should wait for this fix. The existing fast-path test mocks the driver and cannot catch it.

Refs: #2388, #2237, #2407, #2882.

Ngôn ngữ chính
Cython
Star
3.4k
Fork
329
Merge trung bình
1 ngày 20 giờ
Pull request đã merge (30 ngày)
123

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NVIDIA/cuda-python

Tất cả issue của NVIDIA/cuda-python

Issue tương tự

Thêm issue về HPC

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.