cuda.core: a fast-path VMM grow leaves its extension unfreeable
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
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ả
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
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NVIDIA/cuda-python
-
bug cuda.core
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
NVIDIA/cuda-python#2886 · 1 bình luận ·
-
triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
NVIDIA/cuda-python#2717 ·
-
triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
NVIDIA/cuda-python#2712 ·
-
[BUG]: LocatedHeaderDir is mutable, so callers can poison the cached header-directory lookup Đang mởtriage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NVIDIA/cuda-python#2646 · 1 reaction ·
-
cuda.core triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
NVIDIA/cuda-python#2435 · 1 bình luận ·
Tất cả issue của NVIDIA/cuda-python
Issue tương tự
-
src/mergeVS-omp/kernels.h: Violates OpenMP restriction (break statement used with OpenMP for loop) Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
[H22] `copyRowsBlockFrom` decides "row starts already registered" from the first row's nonzero count Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
C++ Enhancement Examples
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100