paleolimbot opened a new issue, #34897:
URL: https://github.com/apache/arrow/issues/34897

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   As described and reproduced nicely in 
https://github.com/rpy2/rpy2-arrow/issues/11
   
   This is almost certainly a result of 
https://github.com/apache/arrow/pull/34489 since it seems to involve fully 
materialized arrays. Otherwise, I'm not sure exactly what would cause this 
specific to shipping arrays over the C Data interface. The traceback reported 
is below (I will try to reproduce as well):
   
   I suspect this might have to do with the fact that the session shutting down 
might lead to some things happening with the GIL and R is trying to release 
that memory at a very inconvenient time.
   
   ```
   Thread 1 "python" received signal SIGSEGV, Segmentation fault.
   0x00005555557868b0 in new_threadstate (interp=0x0, init=1) at 
../Python/pystate.c:616
   616  ../Python/pystate.c: No such file or directory.
   (gdb) up
   #1  0x00005555557a4ee2 in PyThreadState_New (interp=<optimized out>)
       at ../Python/pystate.c:684
   684  ../Python/pystate.c: No such file or directory.
   (gdb) up
   #2  PyGILState_Ensure () at ../Python/pystate.c:1504
   1504 in ../Python/pystate.c
   (gdb) up
   #3  0x00007fffe0ee6003 in arrow::py::NumPyBuffer::~NumPyBuffer() ()
      from 
/opt/software/python/py310_env/lib/python3.10/site-packages/pyarrow/libarrow_python.so
   (gdb) up
   #4  0x00007fffe0ecb56d in std::_Sp_counted_ptr_inplace<arrow::ArrayData, 
std::allocator<arrow::ArrayData>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() ()
      from 
/opt/software/python/py310_env/lib/python3.10/site-packages/pyarrow/libarrow_python.so
   (gdb) up
   #5  0x00007fffe0ecb4d5 in std::_Sp_counted_ptr_inplace<arrow::ArrayData, 
std::allocator<arrow::ArrayData>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() ()
      from 
/opt/software/python/py310_env/lib/python3.10/site-packages/pyarrow/libarrow_python.so
   (gdb) up
   #6  0x00007fffde32f04a in 
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() ()
      from 
/opt/software/python/py310_env/lib/python3.10/site-packages/pyarrow/libarrow.so.1100
   (gdb) up
   #7  0x00007fffdee02a4c in arrow::(anonymous 
namespace)::ReleaseExportedArray(ArrowArray*) ()
      from 
/opt/software/python/py310_env/lib/python3.10/site-packages/pyarrow/libarrow.so.1100
   (gdb) up
   #8  0x00007fffd0aab6f7 in std::_Sp_counted_ptr_inplace<arrow::(anonymous 
namespace)::ImportedArrayData, std::allocator<arrow::(anonymous 
namespace)::ImportedArrayData>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() ()
      from /usr/local/packages/R/4.2/lib/R/library/arrow/libs/arrow.so
   (gdb) up
   #9  0x00007fffd04eda4a in 
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release 
(this=0x55555c8b2a70)
       at /usr/include/c++/11/bits/shared_ptr_base.h:168
   168              _M_dispose();
   (gdb) 
   ```
   
   ### Component(s)
   
   R


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to