cuda.core: a fast-path VMM grow leaves its extension unfreeable
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
Direção de pesquisa
Comece em _grow_allocation_fast_path e rastreie como Buffer, close() e deallocate(ptr, size) gerenciam reservas, mapeamentos e memória física. Revise o teste existente do fast path e adicione cobertura que detecte que a reserva de extensão continua alocada após close; a tarefa estará concluída quando toda reserva e todo mapeamento pertencentes ao buffer forem liberados.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Cython
- Estrelas
- 3.4k
- Forks
- 329
- Merge médio
- 1d 20h
- PRs com merge (30d)
- 123
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de NVIDIA/cuda-python
-
bug cuda.core
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
NVIDIA/cuda-python#2886 · 1 comentário ·
-
triage
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
NVIDIA/cuda-python#2717 ·
-
triage
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 90/100
NVIDIA/cuda-python#2712 ·
-
triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
NVIDIA/cuda-python#2646 · 1 reação ·
-
cuda.core triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
NVIDIA/cuda-python#2435 · 1 comentário ·
Todas as issues de NVIDIA/cuda-python
Issues semelhantes
-
src/mergeVS-omp/kernels.h: Violates OpenMP restriction (break statement used with OpenMP for loop) Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
[H22] `copyRowsBlockFrom` decides "row starts already registered" from the first row's nonzero count Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 92/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
-
C++ Enhancement Examples
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100