[BUG] Segfault when a device_buffer
is released as its memory resource has already been released
#943
Labels
? - Needs Triage
Need team to review and classify
bug
Something isn't working
Python
Related to RMM Python API
Describe the bug
A segfault is triggered when a
device_buffer
is released as its memory resource has already been released.Steps/Code to reproduce bug
UpstreamResourceAdaptor
)UpstreamResourceAdaptor
)Explanation :
A pointer to the
logging_resource_adaptor
will be saved in thedevice_buffer
instance. However, whereas RMM's Python classes retain a reference to the memory resource preventing its deletion, the native code doesn't. Because of this, thelogging_resource_adaptor
can be released before thedevice_buffer
is, making its proper release impossible.Expected behavior
No segfault should be observed.
Note:
Collecting the garbage collector before disabling the RMM logging seems to fix the issue. However, it doesn't look like a very good long term solution.
The text was updated successfully, but these errors were encountered: