NVIDIA / NVIDIA/cudf

[FEA] Leak tracking for Java Scalar instances

Open
#8,227 2 comments 0 reactions 0 assignees View on GitHub
feature request Java Spark
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

**Is your feature request related to a problem? Please describe.**
The Java bindings require explicit `close()` calls by the caller to prevent GPU OOM errors if garbage collection doesn't kick in often enough to free unreferenced Java objects wrapping GPU resources in a timely manner. We currently have leaked object tracking via weak reference collection events for most GPU resources, but that does not currently cover `Scalar` instances which wrap `cudf::scalar`.

**Describe the solution you'd like**
The same leak tracking and debugging done for `ColumnVector` should be applied to `Scalar`. Although `Scalar` instances are not very large in practice (excluding the corner cases of nested type scalars), they can fragment the GPU memory pool drastically if there are enough of these tiny allocations leaked, causing GPU OOM errors much earlier than one would expect.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.