The following causes a segfault.
First start a plasma store with
plasma_store -s /tmp/store -m10000000000
Then run the following in Python.
importpyarrow.plasmaasplasmaimportnumpyasnpclient = plasma.connect('/tmp/store', '', 0)
object_id = client.put(np.zeros(3))
buf = client.get(object_id)
delclientdelbuf # Thissegfaults.The backtrace is
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stopreason = EXC_BAD_ACCESS (code=1, address=0xfffffffffffffffc)
* frame #0: 0x00000001056deaeelibplasma.0.dylib`plasma::PlasmaClient::Release(plasma::UniqueIDconst&) + 142frame #1: 0x00000001056de9e9libplasma.0.dylib`plasma::PlasmaBuffer::~PlasmaBuffer() + 41frame #2: 0x00000001056dec9flibplasma.0.dylib`arrow::Buffer::~Buffer() + 63frame #3: 0x0000000106206661lib.cpython-36m-darwin.so`std::__1::shared_ptr<arrow::Buffer>::~shared_ptr() [inlined] std::__1::__shared_count::__release_shared(this=0x00000001019b7d20) atmemory:3444frame #4: 0x0000000106206617lib.cpython-36m-darwin.so`std::__1::shared_ptr<arrow::Buffer>::~shared_ptr() [inlined] std::__1::__shared_weak_count::__release_shared(this=0x00000001019b7d20) atmemory:3486frame #5: 0x0000000106206617lib.cpython-36m-darwin.so`std::__1::shared_ptr<arrow::Buffer>::~shared_ptr(this=0x0000000100791780) atmemory:4412frame #6: 0x0000000106002b35lib.cpython-36m-darwin.so`std::__1::shared_ptr<arrow::Buffer>::~shared_ptr(this=0x0000000100791780) atmemory:4410frame #7: 0x00000001061052c5lib.cpython-36m-darwin.so`void__Pyx_call_destructor<std::__1::shared_ptr<arrow::Buffer> >(x=std::__1::shared_ptr<arrow::Buffer>::element_type@0x00000001019b7d38strong=0weak=1) atlib.cxx:486frame #8: 0x0000000106104f93lib.cpython-36m-darwin.so`__pyx_tp_dealloc_7pyarrow_3lib_Buffer(o=0x0000000100791768) atlib.cxx:107704frame #9: 0x00000001069fcd54multiarray.cpython-36m-darwin.so`array_dealloc + 292frame #10: 0x00000001000e8daflibpython3.6m.dylib`_PyDict_DelItem_KnownHash + 463frame #11: 0x0000000100171899libpython3.6m.dylib`_PyEval_EvalFrameDefault + 13321frame #12: 0x00000001001791eflibpython3.6m.dylib`_PyEval_EvalCodeWithName + 2447frame #13: 0x000000010016e3d4libpython3.6m.dylib`PyEval_EvalCode + 100frame #14: 0x00000001001a3bd6libpython3.6m.dylib`PyRun_InteractiveOneObject + 582frame #15: 0x00000001001a350elibpython3.6m.dylib`PyRun_InteractiveLoopFlags + 222frame #16: 0x00000001001a33fclibpython3.6m.dylib`PyRun_AnyFileExFlags + 60frame #17: 0x00000001001bc835libpython3.6m.dylib`Py_Main + 3829frame #18: 0x0000000100000df8python`main + 232frame #19: 0x00007fff6cd80015libdyld.dylib`start + 1frame #20: 0x00007fff6cd80015libdyld.dylib`start + 1
Basically, the issue is that when the buffer goes out of scope, it calls Release on the plasma client, but the client has already been deallocated.
Reporter: Robert Nishihara / @robertnishihara
Assignee: Philipp Moritz / @pcmoritz
Related issues:
PRs and other links:
Note: This issue was originally created as ARROW-2448. Please see the migration documentation for further details.
The following causes a segfault.
First start a plasma store with
Then run the following in Python.
The backtrace is
Basically, the issue is that when the buffer goes out of scope, it calls
Releaseon the plasma client, but the client has already been deallocated.Reporter: Robert Nishihara / @robertnishihara
Assignee: Philipp Moritz / @pcmoritz
Related issues:
PRs and other links:
Note: This issue was originally created as ARROW-2448. Please see the migration documentation for further details.