Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Deleting PackedColumns doesn't deallocate GPU memory #8935

Closed
charlesbluca opened this issue Aug 3, 2021 · 0 comments · Fixed by #8936
Closed

[BUG] Deleting PackedColumns doesn't deallocate GPU memory #8935

charlesbluca opened this issue Aug 3, 2021 · 0 comments · Fixed by #8936
Assignees
Labels
bug Something isn't working Python Affects Python cuDF API.

Comments

@charlesbluca
Copy link
Member

Describe the bug
When a dataframe is packed (creating a PackedColumns object) GPU memory usage goes up, reflecting the underlying rmm::device_buffer of the cudf::packed_columns. However, when the PackedColumns object is deleted (del packed), the memory usage consistently remains the same, implying that somewhere down the line, something is not being destroyed properly.

Steps/Code to reproduce bug
The dataframe size / number of runs here will vary on the amount of GPU memory available, but this gives me a MemoryError on a 32GB V100:

import cudf
import cupy
from cudf._lib.copying import pack

df = cudf.DataFrame(cupy.zeros((16_000_000, 100), dtype=int))

for _ in range(5):
    pack(df)

Expected behavior
Python garbage collection should eventually handle any unreferenced PackedColumns objects and free up the GPU memory they use.

Environment overview (please complete the following information)

  • Environment location: dgx12
  • Method of cuDF install: from source

Environment details

Click here to see environment details
 **git***
 commit 90c74b754f87aafb3cac2f74afbfbab9db2d1a42 (HEAD -> packed-columns-serialization, origin/packed-columns-serialization)
 Merge: 7438282eb8 5ba3ed552a
 Author: Charles Blackmon-Luca <[email protected]>
 Date:   Mon Aug 2 08:11:38 2021 -0700
 
 Merge remote-tracking branch 'upstream/branch-21.10' into packed-columns-serialization
 **git submodules***
 
 ***OS Information***
 DGX_NAME="DGX Server"
 DGX_PRETTY_NAME="NVIDIA DGX Server"
 DGX_SWBUILD_DATE="2020-03-04"
 DGX_SWBUILD_VERSION="4.4.0"
 DGX_COMMIT_ID="ee09ebc"
 DGX_PLATFORM="DGX Server for DGX-1"
 DGX_SERIAL_NUMBER="QTFCOU8220028"
 DISTRIB_ID=Ubuntu
 DISTRIB_RELEASE=18.04
 DISTRIB_CODENAME=bionic
 DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS"
 NAME="Ubuntu"
 VERSION="18.04.4 LTS (Bionic Beaver)"
 ID=ubuntu
 ID_LIKE=debian
 PRETTY_NAME="Ubuntu 18.04.4 LTS"
 VERSION_ID="18.04"
 HOME_URL="https://www.ubuntu.com/"
 SUPPORT_URL="https://help.ubuntu.com/"
 BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
 PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
 VERSION_CODENAME=bionic
 UBUNTU_CODENAME=bionic
 Linux dgx12 4.15.0-76-generic #86-Ubuntu SMP Fri Jan 17 17:24:28 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
 
 ***GPU Information***
 Tue Aug  3 09:09:34 2021
 +-----------------------------------------------------------------------------+
 | NVIDIA-SMI 460.39       Driver Version: 460.39       CUDA Version: 11.2     |
 |-------------------------------+----------------------+----------------------+
 | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
 | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
 |                               |                      |               MIG M. |
 |===============================+======================+======================|
 |   0  Tesla V100-SXM2...  On   | 00000000:06:00.0 Off |                    0 |
 | N/A   34C    P0    55W / 300W |    668MiB / 32510MiB |      0%      Default |
 |                               |                      |                  N/A |
 +-------------------------------+----------------------+----------------------+
 |   1  Tesla V100-SXM2...  On   | 00000000:07:00.0 Off |                    0 |
 | N/A   30C    P0    42W / 300W |      3MiB / 32510MiB |      0%      Default |
 |                               |                      |                  N/A |
 +-------------------------------+----------------------+----------------------+
 |   2  Tesla V100-SXM2...  On   | 00000000:0A:00.0 Off |                    0 |
 | N/A   28C    P0    41W / 300W |      3MiB / 32510MiB |      0%      Default |
 |                               |                      |                  N/A |
 +-------------------------------+----------------------+----------------------+
 |   3  Tesla V100-SXM2...  On   | 00000000:0B:00.0 Off |                    0 |
 | N/A   28C    P0    41W / 300W |      3MiB / 32510MiB |      0%      Default |
 |                               |                      |                  N/A |
 +-------------------------------+----------------------+----------------------+
 |   4  Tesla V100-SXM2...  On   | 00000000:85:00.0 Off |                    0 |
 | N/A   30C    P0    42W / 300W |      3MiB / 32510MiB |      0%      Default |
 |                               |                      |                  N/A |
 +-------------------------------+----------------------+----------------------+
 |   5  Tesla V100-SXM2...  On   | 00000000:86:00.0 Off |                    0 |
 | N/A   30C    P0    41W / 300W |      3MiB / 32510MiB |      0%      Default |
 |                               |                      |                  N/A |
 +-------------------------------+----------------------+----------------------+
 |   6  Tesla V100-SXM2...  On   | 00000000:89:00.0 Off |                    0 |
 | N/A   32C    P0    43W / 300W |      3MiB / 32510MiB |      0%      Default |
 |                               |                      |                  N/A |
 +-------------------------------+----------------------+----------------------+
 |   7  Tesla V100-SXM2...  On   | 00000000:8A:00.0 Off |                    0 |
 | N/A   29C    P0    41W / 300W |      3MiB / 32510MiB |      0%      Default |
 |                               |                      |                  N/A |
 +-------------------------------+----------------------+----------------------+
 
 +-----------------------------------------------------------------------------+
 | Processes:                                                                  |
 |  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
 |        ID   ID                                                   Usage      |
 |=============================================================================|
 |    0   N/A  N/A     31218      C   ....2/envs/rapids/bin/python      665MiB |
 +-----------------------------------------------------------------------------+
 
 ***CPU***
 Architecture:        x86_64
 CPU op-mode(s):      32-bit, 64-bit
 Byte Order:          Little Endian
 CPU(s):              80
 On-line CPU(s) list: 0-79
 Thread(s) per core:  2
 Core(s) per socket:  20
 Socket(s):           2
 NUMA node(s):        2
 Vendor ID:           GenuineIntel
 CPU family:          6
 Model:               79
 Model name:          Intel(R) Xeon(R) CPU E5-2698 v4 @ 2.20GHz
 Stepping:            1
 CPU MHz:             3457.078
 CPU max MHz:         3600.0000
 CPU min MHz:         1200.0000
 BogoMIPS:            4389.83
 Virtualization:      VT-x
 L1d cache:           32K
 L1i cache:           32K
 L2 cache:            256K
 L3 cache:            51200K
 NUMA node0 CPU(s):   0-19,40-59
 NUMA node1 CPU(s):   20-39,60-79
 Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti intel_ppin ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap intel_pt xsaveopt cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts md_clear flush_l1d
 
 ***CMake***
 /raid/charlesb/miniconda3/envs/dask-distributed/bin/cmake
 cmake version 3.21.1
 
 CMake suite maintained and supported by Kitware (kitware.com/cmake).
 
 ***g++***
 /raid/charlesb/miniconda3/envs/dask-distributed/bin/g++
 g++ (crosstool-NG 1.24.0.133_b0863d8_dirty) 9.3.0
 Copyright (C) 2019 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 
 ***nvcc***
 /usr/local/cuda/bin/nvcc
 nvcc: NVIDIA (R) Cuda compiler driver
 Copyright (c) 2005-2021 NVIDIA Corporation
 Built on Sun_Feb_14_21:12:58_PST_2021
 Cuda compilation tools, release 11.2, V11.2.152
 Build cuda_11.2.r11.2/compiler.29618528_0
 
 ***Python***
 /raid/charlesb/miniconda3/envs/dask-distributed/bin/python
 Python 3.8.10
 
 ***Environment Variables***
 PATH                            : /home/nfs/charlesb/.vscode-server/bin/c3f126316369cd610563c75b1b1725e0679adfb3/bin:/raid/charlesb/miniconda3/envs/dask-distributed/bin:/raid/charlesb/miniconda3/condabin:/usr/local/cuda/bin:/opt/bin:/home/nfs/charlesb/.vscode-server/bin/c3f126316369cd610563c75b1b1725e0679adfb3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
 LD_LIBRARY_PATH                 :
 NUMBAPRO_NVVM                   :
 NUMBAPRO_LIBDEVICE              :
 CONDA_PREFIX                    : /raid/charlesb/miniconda3/envs/dask-distributed
 PYTHON_PATH                     :
 
 ***conda packages***
 /raid/charlesb/miniconda3/condabin/conda
 # packages in environment at /raid/charlesb/miniconda3/envs/dask-distributed:
 #
 # Name                    Version                   Build  Channel
 _libgcc_mutex             0.1                 conda_forge    conda-forge
 _openmp_mutex             4.5                      1_llvm    conda-forge
 abseil-cpp                20210324.2           h9c3ff4c_0    conda-forge
 aiohttp                   3.7.4.post0      py38h497a2fe_0    conda-forge
 alabaster                 0.7.12                     py_0    conda-forge
 appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
 argon2-cffi               20.1.0           py38h497a2fe_2    conda-forge
 arrow-cpp                 4.0.1           py38hf0991f3_4_cuda    conda-forge
 arrow-cpp-proc            3.0.0                      cuda    conda-forge
 asciitree                 0.3.3                      py_2    conda-forge
 asn1crypto                1.4.0              pyh9f0ad1d_0    conda-forge
 async-timeout             3.0.1                   py_1000    conda-forge
 async_generator           1.10                       py_0    conda-forge
 asyncssh                  2.7.0              pyhd8ed1ab_1    conda-forge
 atk-1.0                   2.36.0               h3371d22_4    conda-forge
 attrs                     21.2.0             pyhd8ed1ab_0    conda-forge
 autoconf                  2.69            pl5320h36c2ea0_10    conda-forge
 automake                  1.16.2          pl5320ha770c72_3    conda-forge
 aws-c-cal                 0.5.11               h95a6274_0    conda-forge
 aws-c-common              0.6.2                h7f98852_0    conda-forge
 aws-c-event-stream        0.2.7               h3541f99_13    conda-forge
 aws-c-io                  0.10.5               hfb6a706_0    conda-forge
 aws-checksums             0.1.11               ha31a3da_7    conda-forge
 aws-sam-translator        1.38.0             pyhd8ed1ab_0    conda-forge
 aws-sdk-cpp               1.8.186              hb4091e7_3    conda-forge
 aws-xray-sdk              2.8.0              pyhd8ed1ab_0    conda-forge
 babel                     2.9.1              pyh44b312d_0    conda-forge
 backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
 backports                 1.0                        py_2    conda-forge
 backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
 bcolz                     1.2.1           py38hb3f55d8_1001    conda-forge
 bcrypt                    3.2.0            py38h497a2fe_1    conda-forge
 binutils                  2.36.1               hdd6e379_2    conda-forge
 binutils_impl_linux-64    2.36.1               h193b22a_2    conda-forge
 binutils_linux-64         2.36                hf3e587d_33    conda-forge
 black                     19.10b0                  py38_0    conda-forge
 bleach                    3.3.1              pyhd8ed1ab_0    conda-forge
 blosc                     1.21.0               h9c3ff4c_0    conda-forge
 bokeh                     2.3.3            py38h578d9bd_0    conda-forge
 boto3                     1.18.9             pyhd8ed1ab_0    conda-forge
 botocore                  1.21.9             pyhd8ed1ab_0    conda-forge
 brotli                    1.0.9                h7f98852_5    conda-forge
 brotli-bin                1.0.9                h7f98852_5    conda-forge
 brotlipy                  0.7.0           py38h497a2fe_1001    conda-forge
 brunsli                   0.1                  h9c3ff4c_0    conda-forge
 bzip2                     1.0.8                h7f98852_4    conda-forge
 c-ares                    1.17.1               h7f98852_1    conda-forge
 c-compiler                1.2.0                h7f98852_0    conda-forge
 ca-certificates           2021.5.30            ha878542_0    conda-forge
 cached-property           1.5.2                hd8ed1ab_1    conda-forge
 cached_property           1.5.2              pyha770c72_1    conda-forge
 cachetools                4.2.2              pyhd8ed1ab_0    conda-forge
 cachey                    0.2.1              pyh9f0ad1d_0    conda-forge
 cairo                     1.16.0            h6cf1ce9_1008    conda-forge
 certifi                   2021.5.30        py38h578d9bd_0    conda-forge
 cffi                      1.14.6           py38ha65f79e_0    conda-forge
 cfgv                      3.3.0              pyhd8ed1ab_0    conda-forge
 cfitsio                   3.470                hb418390_7    conda-forge
 cfn-lint                  0.52.0           py38h578d9bd_0    conda-forge
 cftime                    1.5.0            py38hb5d20a5_0    conda-forge
 chardet                   4.0.0            py38h578d9bd_1    conda-forge
 charls                    2.2.0                h9c3ff4c_0    conda-forge
 charset-normalizer        2.0.0              pyhd8ed1ab_0    conda-forge
 chest                     0.2.3                      py_2    conda-forge
 click                     8.0.1            py38h578d9bd_0    conda-forge
 cloudpickle               1.6.0                      py_0    conda-forge
 cmake                     3.21.1               h8897547_0    conda-forge
 cmake_setuptools          0.1.3                      py_0    rapidsai
 colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
 commonmark                0.9.1                      py_0    conda-forge
 coverage                  5.5              py38h497a2fe_0    conda-forge
 cramjam                   2.3.1            py38h497a2fe_1    conda-forge
 crick                     0.0.3           py38hab2c0dc_1001    conda-forge
 cryptography              3.4.7            py38ha5dfef3_0    conda-forge
 cudatoolkit               11.2.72              h2bc3f7f_0    nvidia
 cudf                      21.10.0a0+139.gd6692f8c4a.dirty          pypi_0    pypi
 cupy                      9.2.0            py38ha69542f_0    conda-forge
 curl                      7.78.0               hea6ffbf_0    conda-forge
 cxx-compiler              1.2.0                h4bd325d_0    conda-forge
 cycler                    0.10.0                     py_2    conda-forge
 cython                    0.29.24          py38h709712a_0    conda-forge
 cytoolz                   0.11.0           py38h497a2fe_3    conda-forge
 dask                      2021.7.1+7.g5fbbf90a           dev_0    <develop>
 dask-core                 2021.7.1           pyhd8ed1ab_0    conda-forge
 dask-cuda                 21.10.0a0+18.ge3f0fb5           dev_0    <develop>
 dask-cudf                 21.10.0a0+148.g90c74b754f          pypi_0    pypi
 dataclasses               0.8                pyhc8e2a94_1    conda-forge
 debugpy                   1.4.1            py38h709712a_0    conda-forge
 decorator                 4.4.2                      py_0    conda-forge
 defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
 distlib                   0.3.2              pyhd8ed1ab_0    conda-forge
 distributed               2021.7.1+11.g048ec743.dirty           dev_0    <develop>
 dlpack                    0.5                  h9c3ff4c_0    conda-forge
 docker-py                 5.0.0            py38h578d9bd_0    conda-forge
 docker-pycreds            0.4.0                      py_0    conda-forge
 docutils                  0.16             py38h578d9bd_3    conda-forge
 double-conversion         3.1.5                h9c3ff4c_2    conda-forge
 ecdsa                     0.17.0             pyhd8ed1ab_0    conda-forge
 editdistance-s            1.0.0            py38h1fd1430_1    conda-forge
 entrypoints               0.3             py38h32f6830_1002    conda-forge
 execnet                   1.9.0              pyhd8ed1ab_0    conda-forge
 expat                     2.4.1                h9c3ff4c_0    conda-forge
 fastavro                  1.4.4            py38h497a2fe_0    conda-forge
 fasteners                 0.16               pyhd8ed1ab_0    conda-forge
 fastparquet               0.7.0            py38hb5d20a5_1    conda-forge
 fastrlock                 0.6              py38h709712a_1    conda-forge
 filelock                  3.0.12             pyh9f0ad1d_0    conda-forge
 filesystem-spec           0.2.0                      py_0    conda-forge
 flake8                    3.8.3                      py_1    conda-forge
 flask                     2.0.1              pyhd8ed1ab_0    conda-forge
 flask_cors                3.0.10             pyhd3deb0d_0    conda-forge
 font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
 font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
 font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
 font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
 fontconfig                2.13.1            hba837de_1005    conda-forge
 fonts-conda-ecosystem     1                             0    conda-forge
 fonts-conda-forge         1                             0    conda-forge
 freetype                  2.10.4               h0708190_1    conda-forge
 fribidi                   1.0.10               h36c2ea0_0    conda-forge
 fsspec                    2021.7.0           pyhd8ed1ab_0    conda-forge
 future                    0.18.2           py38h578d9bd_3    conda-forge
 gcc_impl_linux-64         9.3.0               h70c0ae5_19    conda-forge
 gcc_linux-64              9.3.0               hf25ea35_33    conda-forge
 gdk-pixbuf                2.42.6               h04a7f16_0    conda-forge
 gettext                   0.19.8.1          h0b5b191_1005    conda-forge
 gflags                    2.2.2             he1b5a44_1004    conda-forge
 giflib                    5.2.1                h36c2ea0_2    conda-forge
 glog                      0.5.0                h48cff8f_0    conda-forge
 gmp                       6.2.1                h58526e2_0    conda-forge
 graphite2                 1.3.13            h58526e2_1001    conda-forge
 graphviz                  2.48.0               h85b4f2f_0    conda-forge
 grpc-cpp                  1.38.1               h36ce80c_0    conda-forge
 gtk2                      2.24.33              h539f30e_1    conda-forge
 gts                       0.7.6                h64030ff_2    conda-forge
 gxx_impl_linux-64         9.3.0               hd87eabc_19    conda-forge
 gxx_linux-64              9.3.0               h3fbe746_33    conda-forge
 h5py                      3.3.0           nompi_py38h9915d05_100    conda-forge
 harfbuzz                  2.8.2                h83ec7ef_0    conda-forge
 hdf4                      4.2.15               h10796ff_3    conda-forge
 hdf5                      1.10.6          nompi_h6a2412b_1114    conda-forge
 heapdict                  1.0.1                      py_0    conda-forge
 httpretty                 1.1.3              pyhd8ed1ab_0    conda-forge
 huggingface_hub           0.0.14             pyhd8ed1ab_0    conda-forge
 hypothesis                6.14.5             pyhd8ed1ab_0    conda-forge
 icu                       68.1                 h58526e2_0    conda-forge
 identify                  2.2.11             pyhd8ed1ab_0    conda-forge
 idna                      2.10               pyh9f0ad1d_0    conda-forge
 imagecodecs               2021.6.8         py38hf154af1_0    conda-forge
 imageio                   2.9.0                      py_0    conda-forge
 imagesize                 1.2.0                      py_0    conda-forge
 importlib-metadata        4.6.1            py38h578d9bd_0    conda-forge
 importlib_metadata        4.6.1                hd8ed1ab_0    conda-forge
 inflection                0.5.1              pyh9f0ad1d_0    conda-forge
 iniconfig                 1.1.1              pyh9f0ad1d_0    conda-forge
 ipykernel                 6.0.3            py38hd0cf306_0    conda-forge
 ipython                   7.25.0           py38hd0cf306_1    conda-forge
 ipython_genutils          0.2.0                      py_1    conda-forge
 ipywidgets                7.6.3              pyhd3deb0d_0    conda-forge
 isort                     5.6.4                      py_0    conda-forge
 itsdangerous              2.0.1              pyhd8ed1ab_0    conda-forge
 jbig                      2.1               h7f98852_2003    conda-forge
 jedi                      0.18.0           py38h578d9bd_2    conda-forge
 jinja2                    3.0.1              pyhd8ed1ab_0    conda-forge
 jmespath                  0.10.0             pyh9f0ad1d_0    conda-forge
 joblib                    1.0.1              pyhd8ed1ab_0    conda-forge
 jpeg                      9d                   h36c2ea0_0    conda-forge
 jsondiff                  1.2.0                      py_1    conda-forge
 jsonpatch                 1.24                       py_0    conda-forge
 jsonpointer               2.0                        py_0    conda-forge
 jsonschema                3.2.0            py38h32f6830_1    conda-forge
 junit-xml                 1.9                pyh9f0ad1d_0    conda-forge
 jupyter_client            6.1.12             pyhd8ed1ab_0    conda-forge
 jupyter_core              4.7.1            py38h578d9bd_0    conda-forge
 jupyterlab_pygments       0.1.2              pyh9f0ad1d_0    conda-forge
 jupyterlab_widgets        1.0.0              pyhd8ed1ab_1    conda-forge
 jxrlib                    1.1                  h7f98852_2    conda-forge
 keras                     2.4.3                    pypi_0    pypi
 kernel-headers_linux-64   2.6.32              he073ed8_14    conda-forge
 kiwisolver                1.3.1            py38h1fd1430_1    conda-forge
 krb5                      1.19.2               hcc1bbae_0    conda-forge
 lcms2                     2.12                 hddcbb42_0    conda-forge
 ld_impl_linux-64          2.36.1               hea4e1c9_2    conda-forge
 lerc                      2.2.1                h9c3ff4c_0    conda-forge
 libaec                    1.0.5                h9c3ff4c_0    conda-forge
 libblas                   3.9.0                     8_mkl    conda-forge
 libbrotlicommon           1.0.9                h7f98852_5    conda-forge
 libbrotlidec              1.0.9                h7f98852_5    conda-forge
 libbrotlienc              1.0.9                h7f98852_5    conda-forge
 libcblas                  3.9.0                     8_mkl    conda-forge
 libcurl                   7.78.0               h2574ce0_0    conda-forge
 libdeflate                1.7                  h7f98852_5    conda-forge
 libedit                   3.1.20191231         he28a2e2_2    conda-forge
 libev                     4.33                 h516909a_1    conda-forge
 libevent                  2.1.10               hcdb4288_3    conda-forge
 libffi                    3.3                  h58526e2_2    conda-forge
 libgcc-devel_linux-64     9.3.0               h7864c58_19    conda-forge
 libgcc-ng                 11.1.0               hc902ee8_2    conda-forge
 libgd                     2.3.2                h78a0170_0    conda-forge
 libgfortran-ng            9.4.0                h69a702a_0    conda-forge
 libgfortran5              9.4.0                h62347ff_0    conda-forge
 libglib                   2.68.3               h3e27bee_0    conda-forge
 libgomp                   11.1.0               hc902ee8_2    conda-forge
 libhwloc                  2.5.0                h6746aa3_0    conda-forge
 libiconv                  1.16                 h516909a_0    conda-forge
 liblapack                 3.9.0                     8_mkl    conda-forge
 libllvm10                 10.0.1               he513fc3_3    conda-forge
 libnetcdf                 4.8.0           nompi_hcd642e3_103    conda-forge
 libnghttp2                1.43.0               h812cca2_0    conda-forge
 libpng                    1.6.37               h21135ba_2    conda-forge
 libprotobuf               3.16.0               h780b84a_0    conda-forge
 librmm                    21.10.00a210728 cuda11.2_g561be10_16    rapidsai-nightly
 librsvg                   2.50.7               hc3c00ef_0    conda-forge
 libsodium                 1.0.18               h36c2ea0_1    conda-forge
 libssh2                   1.9.0                ha56f1ee_6    conda-forge
 libstdcxx-devel_linux-64  9.3.0               hb016644_19    conda-forge
 libstdcxx-ng              11.1.0               h56837e0_2    conda-forge
 libthrift                 0.14.2               he6d91bd_1    conda-forge
 libtiff                   4.3.0                hf544144_1    conda-forge
 libtool                   2.4.6             h58526e2_1007    conda-forge
 libutf8proc               2.6.1                h7f98852_0    conda-forge
 libuuid                   2.32.1            h7f98852_1000    conda-forge
 libuv                     1.42.0               h7f98852_0    conda-forge
 libwebp                   1.2.0                h3452ae3_0    conda-forge
 libwebp-base              1.2.0                h7f98852_2    conda-forge
 libxcb                    1.13              h7f98852_1003    conda-forge
 libxml2                   2.9.12               h72842e0_0    conda-forge
 libxslt                   1.1.33               h15afd5d_2    conda-forge
 libzip                    1.8.0                h4de3113_0    conda-forge
 libzopfli                 1.0.3                h9c3ff4c_0    conda-forge
 llvm-openmp               12.0.1               h4bd325d_1    conda-forge
 llvmlite                  0.36.0           py38h4630a5e_0    conda-forge
 locket                    0.2.0                      py_2    conda-forge
 lxml                      4.6.3            py38hf1fe3a4_0    conda-forge
 lz4                       3.1.3            py38hebdc3cf_0    conda-forge
 lz4-c                     1.9.3                h9c3ff4c_0    conda-forge
 lzo                       2.10              h516909a_1000    conda-forge
 m4                        1.4.18            h516909a_1001    conda-forge
 make                      4.3                  hd18ef5c_1    conda-forge
 markdown                  3.3.4              pyhd8ed1ab_0    conda-forge
 markupsafe                2.0.1            py38h497a2fe_0    conda-forge
 matplotlib-base           3.4.2            py38hcc49a3a_0    conda-forge
 matplotlib-inline         0.1.2              pyhd8ed1ab_2    conda-forge
 mccabe                    0.6.1                      py_1    conda-forge
 mimesis                   4.0.0              pyh9f0ad1d_0    conda-forge
 mistune                   0.8.4           py38h497a2fe_1004    conda-forge
 mkl                       2020.4             h726a3e6_304    conda-forge
 mmh3                      3.0.0            py38h709712a_0    conda-forge
 mock                      4.0.3            py38h578d9bd_1    conda-forge
 monotonic                 1.5                        py_0    conda-forge
 more-itertools            8.8.0              pyhd8ed1ab_0    conda-forge
 moto                      2.2.0              pyhd8ed1ab_0    conda-forge
 msgpack-python            1.0.2            py38h1fd1430_1    conda-forge
 multidict                 5.1.0            py38h497a2fe_1    conda-forge
 mypy                      0.782                      py_0    conda-forge
 mypy_extensions           0.4.3            py38h578d9bd_3    conda-forge
 nbclient                  0.5.3              pyhd8ed1ab_0    conda-forge
 nbconvert                 6.1.0            py38h578d9bd_0    conda-forge
 nbformat                  5.1.3              pyhd8ed1ab_0    conda-forge
 nbsphinx                  0.8.6              pyhd8ed1ab_1    conda-forge
 ncurses                   6.2                  h58526e2_4    conda-forge
 nest-asyncio              1.5.1              pyhd8ed1ab_0    conda-forge
 netcdf4                   1.5.7           nompi_py38h5e9db54_100    conda-forge
 networkx                  2.6.2              pyhd8ed1ab_0    conda-forge
 ninja                     1.10.2               h4bd325d_0    conda-forge
 nodeenv                   1.6.0              pyhd8ed1ab_0    conda-forge
 notebook                  6.4.0              pyha770c72_0    conda-forge
 numba                     0.53.1           py38h8b71fd7_1    conda-forge
 numcodecs                 0.8.0            py38h709712a_0    conda-forge
 numexpr                   2.7.3            py38h51da96c_0    conda-forge
 numpy                     1.21.1           py38h9894fe3_0    conda-forge
 numpydoc                  1.1.0                      py_1    conda-forge
 nvtx                      0.2.3            py38h497a2fe_0    conda-forge
 olefile                   0.46               pyh9f0ad1d_1    conda-forge
 openjpeg                  2.4.0                hb52868f_1    conda-forge
 openssl                   1.1.1k               h7f98852_0    conda-forge
 orc                       1.6.9                h58a87f1_0    conda-forge
 packaging                 21.0               pyhd8ed1ab_0    conda-forge
 pandas                    1.2.5            py38h1abd341_0    conda-forge
 pandoc                    1.19.2                        0    conda-forge
 pandocfilters             1.4.2                      py_1    conda-forge
 pango                     1.48.7               hb8ff022_0    conda-forge
 paramiko                  2.7.2              pyh9f0ad1d_0    conda-forge
 parquet-cpp               1.5.1                         1    conda-forge
 parso                     0.8.2              pyhd8ed1ab_0    conda-forge
 partd                     1.2.0              pyhd8ed1ab_0    conda-forge
 pathspec                  0.9.0              pyhd8ed1ab_0    conda-forge
 pcre                      8.45                 h9c3ff4c_0    conda-forge
 perl                      5.32.1          0_h7f98852_perl5    conda-forge
 pexpect                   4.8.0            py38h32f6830_1    conda-forge
 pickleshare               0.7.5           py38h32f6830_1002    conda-forge
 pillow                    8.3.1            py38h8e6f84c_0    conda-forge
 pip                       21.2.1             pyhd8ed1ab_0    conda-forge
 pixman                    0.40.0               h36c2ea0_0    conda-forge
 pkg-config                0.29.2            h36c2ea0_1008    conda-forge
 pluggy                    0.13.1           py38h578d9bd_4    conda-forge
 pooch                     1.4.0              pyhd8ed1ab_0    conda-forge
 pre-commit                2.13.0           py38h578d9bd_0    conda-forge
 pre_commit                2.13.0               hd8ed1ab_0    conda-forge
 prometheus_client         0.11.0             pyhd8ed1ab_0    conda-forge
 prompt-toolkit            3.0.19             pyha770c72_0    conda-forge
 prompt_toolkit            3.0.19               hd8ed1ab_0    conda-forge
 protobuf                  3.16.0           py38h709712a_0    conda-forge
 psutil                    5.8.0            py38h497a2fe_1    conda-forge
 pthread-stubs             0.4               h36c2ea0_1001    conda-forge
 ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
 py                        1.10.0             pyhd3deb0d_0    conda-forge
 py-cpuinfo                8.0.0              pyhd8ed1ab_0    conda-forge
 pyarrow                   4.0.1           py38hb53058b_4_cuda    conda-forge
 pyasn1                    0.4.8                      py_0    conda-forge
 pycodestyle               2.6.0              pyh9f0ad1d_0    conda-forge
 pycparser                 2.20               pyh9f0ad1d_2    conda-forge
 pyflakes                  2.2.0              pyh9f0ad1d_0    conda-forge
 pygments                  2.9.0              pyhd8ed1ab_0    conda-forge
 pynacl                    1.4.0            py38h497a2fe_2    conda-forge
 pynvml                    11.0.0             pyhd8ed1ab_0    conda-forge
 pyopenssl                 20.0.1             pyhd8ed1ab_0    conda-forge
 pyorc                     0.4.0                    pypi_0    pypi
 pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
 pyrsistent                0.17.3           py38h497a2fe_2    conda-forge
 pysocks                   1.7.1            py38h578d9bd_3    conda-forge
 pytables                  3.6.1            py38hc386592_3    conda-forge
 pytest                    6.2.4            py38h578d9bd_0    conda-forge
 pytest-asyncio            0.12.0           py38h32f6830_2    conda-forge
 pytest-benchmark          3.4.1              pyhd8ed1ab_0    conda-forge
 pytest-cov                2.12.1             pyhd8ed1ab_0    conda-forge
 pytest-faulthandler       2.0.1                      py_0    conda-forge
 pytest-forked             1.3.0              pyhd3deb0d_0    conda-forge
 pytest-repeat             0.8.0                      py_0    conda-forge
 pytest-rerunfailures      10.1               pyhd8ed1ab_0    conda-forge
 pytest-timeout            1.4.2              pyh9f0ad1d_0    conda-forge
 pytest-xdist              2.3.0              pyhd8ed1ab_0    conda-forge
 python                    3.8.10          h49503c6_1_cpython    conda-forge
 python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
 python-graphviz           0.17               pyhaef67bd_0    conda-forge
 python-gssapi             1.6.14           py38hacac60f_0    conda-forge
 python-jose               3.3.0              pyh6c4a22f_1    conda-forge
 python-snappy             0.6.0            py38h49bdff1_0    conda-forge
 python-xxhash             2.0.2            py38h497a2fe_0    conda-forge
 python_abi                3.8                      2_cp38    conda-forge
 pytorch                   1.9.0           cpu_py38h91ab35c_0    conda-forge
 pytz                      2021.1             pyhd8ed1ab_0    conda-forge
 pywavelets                1.1.1            py38h5c078b8_3    conda-forge
 pyyaml                    5.4.1            py38h497a2fe_0    conda-forge
 pyzmq                     22.1.0           py38h2035c66_0    conda-forge
 rapidjson                 1.1.0             he1b5a44_1002    conda-forge
 re2                       2021.06.01           h9c3ff4c_0    conda-forge
 readline                  8.1                  h46c0cb4_0    conda-forge
 recommonmark              0.7.1              pyhd8ed1ab_0    conda-forge
 regex                     2021.7.6         py38h497a2fe_0    conda-forge
 requests                  2.26.0             pyhd8ed1ab_0    conda-forge
 responses                 0.13.3             pyhd8ed1ab_0    conda-forge
 rhash                     1.4.1                h7f98852_0    conda-forge
 rmm                       21.10.00a210728 cuda_11.2_py38_g561be10_16    rapidsai-nightly
 rsa                       4.7.2              pyh44b312d_0    conda-forge
 s2n                       1.0.10               h9b69904_0    conda-forge
 s3fs                      0.4.2                      py_0    conda-forge
 s3transfer                0.5.0              pyhd8ed1ab_0    conda-forge
 sacremoses                0.0.43             pyh9f0ad1d_0    conda-forge
 scikit-image              0.18.2           py38h1abd341_0    conda-forge
 scikit-learn              0.24.2           py38hdc147b9_0    conda-forge
 scipy                     1.7.0            py38h7b17777_1    conda-forge
 send2trash                1.7.1              pyhd8ed1ab_0    conda-forge
 setuptools                49.6.0           py38h578d9bd_3    conda-forge
 six                       1.16.0             pyh6c4a22f_0    conda-forge
 sleef                     3.5.1                h7f98852_1    conda-forge
 snappy                    1.1.8                he1b5a44_3    conda-forge
 snowballstemmer           2.1.0              pyhd8ed1ab_0    conda-forge
 sortedcollections         2.1.0              pyhd8ed1ab_0    conda-forge
 sortedcontainers          2.4.0              pyhd8ed1ab_0    conda-forge
 spdlog                    1.8.5                h4bd325d_0    conda-forge
 sphinx                    4.1.2              pyh6c4a22f_1    conda-forge
 sphinx-copybutton         0.4.0              pyhd8ed1ab_0    conda-forge
 sphinx-markdown-tables    0.0.15             pyhd3deb0d_0    conda-forge
 sphinx_rtd_theme          0.5.2              pyhd8ed1ab_1    conda-forge
 sphinxcontrib-applehelp   1.0.2                      py_0    conda-forge
 sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
 sphinxcontrib-htmlhelp    2.0.0              pyhd8ed1ab_0    conda-forge
 sphinxcontrib-jsmath      1.0.1                      py_0    conda-forge
 sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
 sphinxcontrib-serializinghtml 1.1.5              pyhd8ed1ab_0    conda-forge
 sphinxcontrib-websupport  1.2.4              pyh9f0ad1d_0    conda-forge
 sqlalchemy                1.3.23           py38h497a2fe_0    conda-forge
 sqlite                    3.36.0               h9cd32fc_0    conda-forge
 sshpubkeys                3.1.0                      py_0    conda-forge
 streamz                   0.6.2              pyh44b312d_0    conda-forge
 sysroot_linux-64          2.12                he073ed8_14    conda-forge
 tblib                     1.7.0              pyhd8ed1ab_0    conda-forge
 terminado                 0.10.1           py38h578d9bd_0    conda-forge
 testpath                  0.5.0              pyhd8ed1ab_0    conda-forge
 threadpoolctl             2.2.0              pyh8a188c0_0    conda-forge
 thrift                    0.13.0           py38h709712a_2    conda-forge
 tifffile                  2021.7.2           pyhd8ed1ab_0    conda-forge
 tiledb                    2.3.2                he87e0bf_0    conda-forge
 tiledb-py                 0.9.4            py38hb3697fb_0    conda-forge
 tk                        8.6.10               h21135ba_1    conda-forge
 tokenizers                0.10.1           py38hb63a372_0    conda-forge
 toml                      0.10.2             pyhd8ed1ab_0    conda-forge
 toolz                     0.11.1                     py_0    conda-forge
 tornado                   6.1              py38h497a2fe_1    conda-forge
 tqdm                      4.61.2             pyhd8ed1ab_1    conda-forge
 traitlets                 5.0.5                      py_0    conda-forge
 transformers              4.9.0              pyhd8ed1ab_0    conda-forge
 typed-ast                 1.4.3            py38h497a2fe_0    conda-forge
 typing-extensions         3.10.0.0             hd8ed1ab_0    conda-forge
 typing_extensions         3.10.0.0           pyha770c72_0    conda-forge
 ucx-py                    0.22.0a0+13.gb804d1a           dev_0    <develop>
 urllib3                   1.26.6             pyhd8ed1ab_0    conda-forge
 virtualenv                20.4.7           py38h578d9bd_0    conda-forge
 wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
 webencodings              0.5.1                      py_1    conda-forge
 websocket-client          0.57.0           py38h578d9bd_4    conda-forge
 werkzeug                  2.0.1              pyhd8ed1ab_0    conda-forge
 wheel                     0.36.2             pyhd3deb0d_0    conda-forge
 widgetsnbextension        3.5.1            py38h578d9bd_4    conda-forge
 wrapt                     1.12.1           py38h497a2fe_3    conda-forge
 xarray                    0.19.0             pyhd8ed1ab_1    conda-forge
 xmltodict                 0.12.0                     py_0    conda-forge
 xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
 xorg-libice               1.0.10               h7f98852_0    conda-forge
 xorg-libsm                1.2.3             hd9c2040_1000    conda-forge
 xorg-libx11               1.7.2                h7f98852_0    conda-forge
 xorg-libxau               1.0.9                h7f98852_0    conda-forge
 xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
 xorg-libxext              1.3.4                h7f98852_1    conda-forge
 xorg-libxrender           0.9.10            h7f98852_1003    conda-forge
 xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
 xorg-xextproto            7.3.0             h7f98852_1002    conda-forge
 xorg-xproto               7.0.31            h7f98852_1007    conda-forge
 xxhash                    0.8.0                h7f98852_3    conda-forge
 xz                        5.2.5                h516909a_1    conda-forge
 yaml                      0.2.5                h516909a_0    conda-forge
 yarl                      1.6.3            py38h497a2fe_2    conda-forge
 zarr                      2.8.3              pyhd8ed1ab_0    conda-forge
 zeromq                    4.3.4                h9c3ff4c_0    conda-forge
 zfp                       0.5.5                h9c3ff4c_5    conda-forge
 zict                      2.0.0                      py_0    conda-forge
 zipp                      3.5.0              pyhd8ed1ab_0    conda-forge
 zlib                      1.2.11            h516909a_1010    conda-forge
 zstandard                 0.15.2           py38h497a2fe_0    conda-forge
 zstd                      1.5.0                ha95c52a_0    conda-forge

Additional context
After discussion with @brandon-b-miller and @shwina, it looks like we are encountering cython/cython#3226 here - because a member of cdef class _CPackedColumns is the cdef struct packed_columns, when we delete a _CPackedColumns object this struct isn't actually destroyed, leaving behind the device buffer taking up memory.

As discussed in the issue, a workaround for this is to instead use a cdef cppclass packed_columns, but ultimately a fix was made for this in Cython 3.0 with cython/cython#3228. I'm going to ask if this fix can be backported to 0.29.x, which would make our current implementation work, but in the meantime I'll submit a PR using the workaround. This issue will track the progress on our backport request.

@charlesbluca charlesbluca added bug Something isn't working Python Affects Python cuDF API. labels Aug 3, 2021
@charlesbluca charlesbluca self-assigned this Aug 3, 2021
@rapids-bot rapids-bot bot closed this as completed in #8936 Aug 3, 2021
rapids-bot bot pushed a commit that referenced this issue Aug 3, 2021
Closes #8935

Defines `packed_columns` in Cython as a `cppclass` instead of a `struct`, so that it is actually destroyed when a containing `PackedColumns` object is no longer referenced; see cython/cython#3226.

Authors:
  - Charles Blackmon-Luca (https://github.com/charlesbluca)

Approvers:
  - https://github.com/brandon-b-miller

URL: #8936
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant