Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-5924

[C++][Plasma] It is not convenient to release a GPU object

    XMLWordPrintableJSON

Details

    Description

      cmake_modules/DefineOptions.cmake
        define_option(ARROW_CUDA "Build the Arrow CUDA extensions (requires CUDA toolkit)" ON)
        define_option(ARROW_PLASMA "Build the plasma object store along with Arrow" ON)

      The corrent sequence is as follow:
      (1) plasma_client.Create(object_id, size, nullptr, 0, &buff, 1);  // where device_num > 0
      (2) plasma_client.Seal(object_id);
      (3) buff = nullptr;
      (4) plasma_client.Release(object_id);
      (5) plasma_client.Delete(object_id);

      To set buff nullptr (step 3) just before release the object (step 4) because CloseIpcBuffer is in its destructor (class CudaBuffer).
      If a user does not do that promptly, CloseIpcBuffer will be blocked.
      Then, the following error may occure when another object created.
          IOError: Cuda Driver API call in /home/zilliz/arrow/cpp/src/arrow/gpu/cuda_context.cc at line 156 failed with code 208: cuIpcOpenMemHandle(&data, *handle, CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS) (nil)

      Attachments

        Activity

          People

            shengjun.li shengjun.li
            shengjun.li shengjun.li
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 5h 50m
                5h 50m