Skip to content

ARROW-5186 [Plasma] Fix crash caused by improper free on CUDA memory#4177

Closed
shengjun1985 wants to merge 2 commits intoapache:masterfrom
shengjun1985:master
Closed

ARROW-5186 [Plasma] Fix crash caused by improper free on CUDA memory#4177
shengjun1985 wants to merge 2 commits intoapache:masterfrom
shengjun1985:master

Conversation

@shengjun1985
Copy link

No description provided.

@codecov-io
Copy link

codecov-io commented Apr 19, 2019

Codecov Report

Merging #4177 into master will increase coverage by 1.41%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4177      +/-   ##
==========================================
+ Coverage   87.77%   89.18%   +1.41%     
==========================================
  Files         758      617     -141     
  Lines       92346    82204   -10142     
  Branches     1251        0    -1251     
==========================================
- Hits        81060    73317    -7743     
+ Misses      11169     8887    -2282     
+ Partials      117        0     -117
Impacted Files Coverage Δ
cpp/src/plasma/test/client_tests.cc 100% <ø> (ø) ⬆️
cpp/src/plasma/store.h 100% <ø> (ø) ⬆️
cpp/src/plasma/store.cc 91.28% <100%> (+0.02%) ⬆️
cpp/src/arrow/python/common.h 98.78% <0%> (-1.22%) ⬇️
python/pyarrow/compat.py 90% <0%> (-0.48%) ⬇️
python/pyarrow/tests/test_table.py 99.61% <0%> (-0.39%) ⬇️
cpp/src/arrow/python/io.cc 95.38% <0%> (-0.38%) ⬇️
cpp/src/parquet/arrow/arrow-reader-writer-test.cc 95.31% <0%> (-0.17%) ⬇️
cpp/src/arrow/python/flight.cc 0.79% <0%> (-0.09%) ⬇️
python/pyarrow/_plasma.pyx 91.27% <0%> (-0.06%) ⬇️
... and 164 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b5add5...f384a94. Read the comment docs.

AssertCudaRead(object_buffers[0].metadata, {42});
}

TEST_F(TestPlasmaStore, DeleteObjectsGUPTest) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

#ifdef PLASMA_CUDA
std::shared_ptr<CudaContext> context_;
manager_->GetContext(object->device_num - 1, &context_);
context_->Free(object->pointer, object->data_size + object->metadata_size);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unchecked Status here (this would fail CI if we had GPU-enabled builds). Seems that EraseFromObjectTable will need to return Status now?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Status is checked.

@wesm wesm changed the title ARROW-5186 [Plasma] fix carsh on delete gpu memory ARROW-5186 [Plasma] Fix crash caused by improper free on CUDA memory Apr 24, 2019
@wesm
Copy link
Member

wesm commented Apr 25, 2019

I'll wait for @pcmoritz to review

@wesm
Copy link
Member

wesm commented Apr 29, 2019

@pcmoritz can you review?

@pcmoritz
Copy link
Contributor

Yes, I'm looking at it now!

Copy link
Contributor

@pcmoritz pcmoritz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me!

I'll also test it on a CUDA enabled machine, feel free to merge if that has already been done.

@pcmoritz
Copy link
Contributor

pcmoritz commented Apr 29, 2019

Tests are passing! Thanks for the contribution :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants